add app snippet-box

This commit is contained in:
2024-07-16 13:44:16 +10:00
parent 05ea86b038
commit eac0bdaa9e
6 changed files with 93 additions and 0 deletions

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
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,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./deployment.yaml
- ./service.yaml
- ./ingress.yaml

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

View File

@@ -0,0 +1,11 @@
{
"appName": "snippet-box",
"userGivenName": "snippet-box",
"destNamespace": "snippet-box",
"destServer": "https://kubernetes.default.svc",
"srcPath": "apps/snippet-box/env/k3s-cluster",
"srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git",
"srcTargetRevision": "",
"labels": null,
"annotations": null
}

View File

@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base