add app snippet-box

This commit is contained in:
2024-06-19 12:46:21 +10:00
parent ea4f919568
commit 456384df7d
7 changed files with 94 additions and 0 deletions

View File

@@ -8,5 +8,6 @@ resources:
- ./homer/homer.yaml
- ./podinfo/podinfo.yaml
- ./postgresql/postgresql.yaml
- ./snippet-box/snippet-box.yaml
- ./uptime-kuma/uptime-kuma.yaml
- ./weave-gitops/weave-gitops.yaml

View File

@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: snippet-box
namespace: snippet-box
labels:
app.kubernetes.io/name: snippet-box
spec:
selector:
matchLabels:
app.kubernetes.io/name: snippet-box
template:
metadata:
labels:
app.kubernetes.io/name: snippet-box
spec:
containers:
- name: snippet-box
image: pawelmalak/snippet-box:arm
ports:
- protocol: TCP
containerPort: 5000
name: snippet-box-port
env:
- name: TZ
value: Australia/Sydney
volumeMounts:
- name: snippet-box-data
mountPath: /app/data
volumes:
- name: snippet-box-data
hostPath:
path: /mnt/nfs/AppData/snippet-box
type: Directory

View File

@@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: snippet-box-ingress
namespace: snippet-box
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
ingressClassName: nginx
rules:
- host: "snippet-box.cluster.edward.sydney"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: snippet-box
port:
number: 5000

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: snippet-box
namespace: snippet-box
labels:
app.kubernetes.io/name: snippet-box
spec:
selector:
app.kubernetes.io/name: snippet-box
type: ClusterIP
internalTrafficPolicy: Cluster
ports:
- protocol: TCP
port: 5000
targetPort: 5000
name: snippet-box-port

View File

@@ -0,0 +1,16 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: snippet-box
namespace: snippet-box
spec:
interval: 10m
timeout: 1m30s
retryInterval: 30s
targetNamespace: flux-system
path: ./kubernetes/apps/snippet-box/app
prune: true
sourceRef:
kind: GitRepository
namespace: flux-system
name: flux-system

View File

@@ -10,6 +10,7 @@ resources:
- ./namespaces/podinfo.yaml
- ./namespaces/postgresql.yaml
- ./namespaces/prometheus-operator.yaml
- ./namespaces/snippet-box.yaml
- ./namespaces/uptime-kuma.yaml
- ./repositories/repositories.yaml
# - ./cilium/cilium.yaml

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: snippet-box