Initial commit.
This commit is contained in:
7
apps/README.md
Normal file
7
apps/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Apps
|
||||
|
||||
This will be the primary place for Sovereign Cloud-maintained apps to be included.
|
||||
|
||||
## Status
|
||||
|
||||
Currently none are functional.
|
249
apps/ghost/manifests/deployment.yaml
Normal file
249
apps/ghost/manifests/deployment.yaml
Normal file
@@ -0,0 +1,249 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: ghost
|
||||
namespace: ghost
|
||||
uid: d01c62ff-68a6-456a-a630-77c730bffc9b
|
||||
resourceVersion: '2772014'
|
||||
generation: 1
|
||||
creationTimestamp: '2025-04-27T02:01:30Z'
|
||||
labels:
|
||||
app.kubernetes.io/component: ghost
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Sovereign
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/version: 5.118.1
|
||||
annotations:
|
||||
deployment.kubernetes.io/revision: '1'
|
||||
meta.helm.sh/release-name: ghost
|
||||
meta.helm.sh/release-namespace: ghost
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: ghost
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app.kubernetes.io/component: ghost
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Sovereign
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/version: 5.118.1
|
||||
annotations:
|
||||
checksum/secrets: b1cef92e7f73650dddfb455a7519d7b2bcf051c9cb9136b34f504ee120c63ae6
|
||||
spec:
|
||||
volumes:
|
||||
- name: empty-dir
|
||||
emptyDir: {}
|
||||
- name: ghost-secrets
|
||||
projected:
|
||||
sources:
|
||||
- secret:
|
||||
name: ghost-mysql
|
||||
- secret:
|
||||
name: ghost
|
||||
defaultMode: 420
|
||||
- name: ghost-data
|
||||
persistentVolumeClaim:
|
||||
claimName: ghost
|
||||
initContainers:
|
||||
- name: prepare-base-dir
|
||||
image: docker.io/bitnami/ghost:5.118.1-debian-12-r0
|
||||
command:
|
||||
- /bin/bash
|
||||
args:
|
||||
- '-ec'
|
||||
- >
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
. /opt/bitnami/scripts/liblog.sh
|
||||
|
||||
|
||||
info "Copying base dir to empty dir"
|
||||
|
||||
# In order to not break the application functionality (such as
|
||||
upgrades or plugins) we need
|
||||
|
||||
# to make the base directory writable, so we need to copy it to an
|
||||
empty dir volume
|
||||
|
||||
cp -r --preserve=mode /opt/bitnami/ghost /emptydir/app-base-dir
|
||||
resources:
|
||||
limits:
|
||||
cpu: 375m
|
||||
ephemeral-storage: 2Gi
|
||||
memory: 384Mi
|
||||
requests:
|
||||
cpu: 250m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- name: empty-dir
|
||||
mountPath: /emptydir
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
privileged: false
|
||||
seLinuxOptions: {}
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: ghost
|
||||
image: docker.io/bitnami/ghost:5.118.1-debian-12-r0
|
||||
ports:
|
||||
- name: https
|
||||
containerPort: 2368
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: 'false'
|
||||
- name: ALLOW_EMPTY_PASSWORD
|
||||
value: 'yes'
|
||||
- name: GHOST_DATABASE_HOST
|
||||
value: ghost-mysql
|
||||
- name: GHOST_DATABASE_PORT_NUMBER
|
||||
value: '3306'
|
||||
- name: GHOST_DATABASE_NAME
|
||||
value: ghost
|
||||
- name: GHOST_DATABASE_USER
|
||||
value: ghost
|
||||
- name: GHOST_DATABASE_PASSWORD_FILE
|
||||
value: /opt/bitnami/ghost/secrets/mysql-password
|
||||
- name: GHOST_HOST
|
||||
value: blog.cloud.payne.io/
|
||||
- name: GHOST_PORT_NUMBER
|
||||
value: '2368'
|
||||
- name: GHOST_USERNAME
|
||||
value: admin
|
||||
- name: GHOST_PASSWORD_FILE
|
||||
value: /opt/bitnami/ghost/secrets/ghost-password
|
||||
- name: GHOST_EMAIL
|
||||
value: paul@payne.io
|
||||
- name: GHOST_BLOG_TITLE
|
||||
value: User's Blog
|
||||
- name: GHOST_ENABLE_HTTPS
|
||||
value: 'yes'
|
||||
- name: GHOST_EXTERNAL_HTTP_PORT_NUMBER
|
||||
value: '80'
|
||||
- name: GHOST_EXTERNAL_HTTPS_PORT_NUMBER
|
||||
value: '443'
|
||||
- name: GHOST_SKIP_BOOTSTRAP
|
||||
value: 'no'
|
||||
resources:
|
||||
limits:
|
||||
cpu: 375m
|
||||
ephemeral-storage: 2Gi
|
||||
memory: 384Mi
|
||||
requests:
|
||||
cpu: 250m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- name: empty-dir
|
||||
mountPath: /opt/bitnami/ghost
|
||||
subPath: app-base-dir
|
||||
- name: empty-dir
|
||||
mountPath: /.ghost
|
||||
subPath: app-tmp-dir
|
||||
- name: empty-dir
|
||||
mountPath: /tmp
|
||||
subPath: tmp-dir
|
||||
- name: ghost-data
|
||||
mountPath: /bitnami/ghost
|
||||
- name: ghost-secrets
|
||||
mountPath: /opt/bitnami/ghost/secrets
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 2368
|
||||
initialDelaySeconds: 120
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: https
|
||||
scheme: HTTP
|
||||
httpHeaders:
|
||||
- name: x-forwarded-proto
|
||||
value: https
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 3
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
privileged: false
|
||||
seLinuxOptions: {}
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
dnsPolicy: ClusterFirst
|
||||
serviceAccountName: ghost
|
||||
serviceAccount: ghost
|
||||
automountServiceAccountToken: false
|
||||
securityContext:
|
||||
fsGroup: 1001
|
||||
fsGroupChangePolicy: Always
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: ghost
|
||||
topologyKey: kubernetes.io/hostname
|
||||
schedulerName: default-scheduler
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 25%
|
||||
maxSurge: 25%
|
||||
revisionHistoryLimit: 10
|
||||
progressDeadlineSeconds: 600
|
||||
status:
|
||||
observedGeneration: 1
|
||||
replicas: 1
|
||||
updatedReplicas: 1
|
||||
unavailableReplicas: 1
|
||||
conditions:
|
||||
- type: Available
|
||||
status: 'False'
|
||||
lastUpdateTime: '2025-04-27T02:01:30Z'
|
||||
lastTransitionTime: '2025-04-27T02:01:30Z'
|
||||
reason: MinimumReplicasUnavailable
|
||||
message: Deployment does not have minimum availability.
|
||||
- type: Progressing
|
||||
status: 'False'
|
||||
lastUpdateTime: '2025-04-27T02:11:32Z'
|
||||
lastTransitionTime: '2025-04-27T02:11:32Z'
|
||||
reason: ProgressDeadlineExceeded
|
||||
message: ReplicaSet "ghost-586bbc6ddd" has timed out progressing.
|
29
apps/ghost/manifests/ingress.yaml
Normal file
29
apps/ghost/manifests/ingress.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ghost
|
||||
namespace: {{ .Values.namespace }}
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "traefik"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
external-dns.alpha.kubernetes.io/target: "cloud.payne.io"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
traefik.ingress.kubernetes.io/redirect-entry-point: https
|
||||
spec:
|
||||
rules:
|
||||
- host: {{ .Values.ghost.host }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: ghost
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.ghost.host }}
|
||||
secretName: ghost-tls
|
0
apps/ghost/manifests/kustomization.yaml
Normal file
0
apps/ghost/manifests/kustomization.yaml
Normal file
26
apps/ghost/manifests/networkpolicy.yaml
Normal file
26
apps/ghost/manifests/networkpolicy.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
# Source: ghost/templates/networkpolicy.yaml
|
||||
kind: NetworkPolicy
|
||||
apiVersion: networking.k8s.io/v1
|
||||
metadata:
|
||||
name: ghost
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Sovereign
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/version: 5.118.1
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: ghost
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
egress:
|
||||
- {}
|
||||
ingress:
|
||||
- ports:
|
||||
- port: 2368
|
||||
- port: 2368
|
20
apps/ghost/manifests/pdb.yaml
Normal file
20
apps/ghost/manifests/pdb.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
# Source: ghost/templates/pdb.yaml
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: ghost
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Sovereign
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/version: 5.118.1
|
||||
app.kubernetes.io/component: ghost
|
||||
spec:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/component: ghost
|
15
apps/ghost/manifests/secrets.yaml
Normal file
15
apps/ghost/manifests/secrets.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
# Source: ghost/templates/secrets.yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: ghost
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Sovereign
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/version: 5.118.1
|
||||
type: Opaque
|
||||
data:
|
||||
ghost-password: "NnhXejdkNm9KTw=="
|
14
apps/ghost/manifests/service-account.yaml
Normal file
14
apps/ghost/manifests/service-account.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
# Source: ghost/templates/service-account.yaml
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: ghost
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Sovereign
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/version: 5.118.1
|
||||
app.kubernetes.io/component: ghost
|
||||
automountServiceAccountToken: false
|
26
apps/ghost/manifests/svc.yaml
Normal file
26
apps/ghost/manifests/svc.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
# Source: ghost/templates/svc.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ghost
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Sovereign
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/version: 5.118.1
|
||||
app.kubernetes.io/component: ghost
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
externalTrafficPolicy: "Cluster"
|
||||
sessionAffinity: None
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: ghost
|
||||
app.kubernetes.io/component: ghost
|
31
apps/mysql/maniifests/networkpolicy.yaml
Normal file
31
apps/mysql/maniifests/networkpolicy.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
# Source: ghost/charts/mysql/templates/networkpolicy.yaml
|
||||
kind: NetworkPolicy
|
||||
apiVersion: networking.k8s.io/v1
|
||||
metadata:
|
||||
name: ghost-mysql
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
egress:
|
||||
- {}
|
||||
ingress:
|
||||
# Allow connection from other cluster pods
|
||||
- ports:
|
||||
- port: 3306
|
47
apps/mysql/maniifests/primary/configmap.yaml
Normal file
47
apps/mysql/maniifests/primary/configmap.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
# Source: ghost/charts/mysql/templates/primary/configmap.yaml
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ghost-mysql
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
||||
data:
|
||||
my.cnf: |-
|
||||
[mysqld]
|
||||
authentication_policy='* ,,'
|
||||
skip-name-resolve
|
||||
explicit_defaults_for_timestamp
|
||||
basedir=/opt/bitnami/mysql
|
||||
plugin_dir=/opt/bitnami/mysql/lib/plugin
|
||||
port=3306
|
||||
mysqlx=0
|
||||
mysqlx_port=33060
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
datadir=/bitnami/mysql/data
|
||||
tmpdir=/opt/bitnami/mysql/tmp
|
||||
max_allowed_packet=16M
|
||||
bind-address=*
|
||||
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||
log-error=/opt/bitnami/mysql/logs/mysqld.log
|
||||
character-set-server=UTF8
|
||||
slow_query_log=0
|
||||
long_query_time=10.0
|
||||
|
||||
[client]
|
||||
port=3306
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
default-character-set=UTF8
|
||||
plugin_dir=/opt/bitnami/mysql/lib/plugin
|
||||
|
||||
[manager]
|
||||
port=3306
|
||||
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
23
apps/mysql/maniifests/primary/pdb.yaml
Normal file
23
apps/mysql/maniifests/primary/pdb.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
# Source: ghost/charts/mysql/templates/primary/pdb.yaml
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: ghost-mysql
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
||||
spec:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
241
apps/mysql/maniifests/primary/statefulset.yaml
Normal file
241
apps/mysql/maniifests/primary/statefulset.yaml
Normal file
@@ -0,0 +1,241 @@
|
||||
---
|
||||
# Source: ghost/charts/mysql/templates/primary/statefulset.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: ghost-mysql
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
||||
spec:
|
||||
replicas: 1
|
||||
podManagementPolicy: ""
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
||||
serviceName: ghost-mysql-headless
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/configuration: 959b0f76ba7e6be0aaaabf97932398c31b17bc9f86d3839a26a3bbbc48673cd9
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
||||
spec:
|
||||
serviceAccountName: ghost-mysql
|
||||
|
||||
automountServiceAccountToken: false
|
||||
affinity:
|
||||
podAffinity:
|
||||
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: mysql
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 1
|
||||
nodeAffinity:
|
||||
|
||||
securityContext:
|
||||
fsGroup: 1001
|
||||
fsGroupChangePolicy: Always
|
||||
supplementalGroups: []
|
||||
sysctls: []
|
||||
initContainers:
|
||||
- name: preserve-logs-symlinks
|
||||
image: docker.io/bitnami/mysql:8.4.5-debian-12-r0
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1001
|
||||
seLinuxOptions: {}
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
resources:
|
||||
limits:
|
||||
cpu: 750m
|
||||
ephemeral-storage: 2Gi
|
||||
memory: 768Mi
|
||||
requests:
|
||||
cpu: 500m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 512Mi
|
||||
command:
|
||||
- /bin/bash
|
||||
args:
|
||||
- -ec
|
||||
- |
|
||||
#!/bin/bash
|
||||
|
||||
. /opt/bitnami/scripts/libfs.sh
|
||||
# We copy the logs folder because it has symlinks to stdout and stderr
|
||||
if ! is_dir_empty /opt/bitnami/mysql/logs; then
|
||||
cp -r /opt/bitnami/mysql/logs /emptydir/app-logs-dir
|
||||
fi
|
||||
volumeMounts:
|
||||
- name: empty-dir
|
||||
mountPath: /emptydir
|
||||
containers:
|
||||
- name: mysql
|
||||
image: docker.io/bitnami/mysql:8.4.5-debian-12-r0
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1001
|
||||
seLinuxOptions: {}
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: "false"
|
||||
- name: MYSQL_ROOT_PASSWORD_FILE
|
||||
value: /opt/bitnami/mysql/secrets/mysql-root-password
|
||||
- name: MYSQL_ENABLE_SSL
|
||||
value: "no"
|
||||
- name: MYSQL_USER
|
||||
value: "bn_ghost"
|
||||
- name: MYSQL_PASSWORD_FILE
|
||||
value: /opt/bitnami/mysql/secrets/mysql-password
|
||||
- name: MYSQL_PORT
|
||||
value: "3306"
|
||||
- name: MYSQL_DATABASE
|
||||
value: "bitnami_ghost"
|
||||
envFrom:
|
||||
ports:
|
||||
- name: mysql
|
||||
containerPort: 3306
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||
fi
|
||||
mysqladmin status -uroot -p"${password_aux}"
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||
fi
|
||||
mysqladmin ping -uroot -p"${password_aux}" | grep "mysqld is alive"
|
||||
startupProbe:
|
||||
failureThreshold: 10
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||
fi
|
||||
mysqladmin ping -uroot -p"${password_aux}" | grep "mysqld is alive"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 750m
|
||||
ephemeral-storage: 2Gi
|
||||
memory: 768Mi
|
||||
requests:
|
||||
cpu: 500m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/mysql
|
||||
- name: empty-dir
|
||||
mountPath: /tmp
|
||||
subPath: tmp-dir
|
||||
- name: empty-dir
|
||||
mountPath: /opt/bitnami/mysql/conf
|
||||
subPath: app-conf-dir
|
||||
- name: empty-dir
|
||||
mountPath: /opt/bitnami/mysql/tmp
|
||||
subPath: app-tmp-dir
|
||||
- name: empty-dir
|
||||
mountPath: /opt/bitnami/mysql/logs
|
||||
subPath: app-logs-dir
|
||||
- name: config
|
||||
mountPath: /opt/bitnami/mysql/conf/my.cnf
|
||||
subPath: my.cnf
|
||||
- name: mysql-credentials
|
||||
mountPath: /opt/bitnami/mysql/secrets/
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: ghost-mysql
|
||||
- name: mysql-credentials
|
||||
secret:
|
||||
secretName: ghost-mysql
|
||||
items:
|
||||
- key: mysql-root-password
|
||||
path: mysql-root-password
|
||||
- key: mysql-password
|
||||
path: mysql-password
|
||||
- name: empty-dir
|
||||
emptyDir: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/component: primary
|
||||
spec:
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
resources:
|
||||
requests:
|
||||
storage: "8Gi"
|
27
apps/mysql/maniifests/primary/svc-headless.yaml
Normal file
27
apps/mysql/maniifests/primary/svc-headless.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
# Source: ghost/charts/mysql/templates/primary/svc-headless.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ghost-mysql-headless
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- name: mysql
|
||||
port: 3306
|
||||
targetPort: mysql
|
||||
selector:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/component: primary
|
29
apps/mysql/maniifests/primary/svc.yaml
Normal file
29
apps/mysql/maniifests/primary/svc.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
# Source: ghost/charts/mysql/templates/primary/svc.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ghost-mysql
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
||||
spec:
|
||||
type: ClusterIP
|
||||
sessionAffinity: None
|
||||
ports:
|
||||
- name: mysql
|
||||
port: 3306
|
||||
protocol: TCP
|
||||
targetPort: mysql
|
||||
nodePort: null
|
||||
selector:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/part-of: mysql
|
||||
app.kubernetes.io/component: primary
|
18
apps/mysql/maniifests/secrets.yaml
Normal file
18
apps/mysql/maniifests/secrets.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
# Source: ghost/charts/mysql/templates/secrets.yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: ghost-mysql
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
type: Opaque
|
||||
data:
|
||||
mysql-root-password: "SnVOdks2T2tDdA=="
|
||||
mysql-password: "eGllcFBUZWJabw=="
|
17
apps/mysql/maniifests/serviceaccount.yaml
Normal file
17
apps/mysql/maniifests/serviceaccount.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
# Source: ghost/charts/mysql/templates/serviceaccount.yaml
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: ghost-mysql
|
||||
namespace: "default"
|
||||
labels:
|
||||
app.kubernetes.io/instance: ghost
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: mysql
|
||||
app.kubernetes.io/version: 8.4.5
|
||||
helm.sh/chart: mysql-12.3.4
|
||||
app.kubernetes.io/part-of: mysql
|
||||
automountServiceAccountToken: false
|
||||
secrets:
|
||||
- name: ghost-mysql
|
Reference in New Issue
Block a user