add app nextcloud

This commit is contained in:
2024-07-23 21:33:54 +10:00
parent 84655ecce0
commit ac182ec587
8 changed files with 133 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud
namespace: nextcloud
labels:
app.kubernetes.io/name: nextcloud
spec:
selector:
matchLabels:
app.kubernetes.io/name: nextcloud
template:
metadata:
labels:
app.kubernetes.io/name: nextcloud
spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
containers:
- name: nextcloud
image: nextcloud/all-in-one
securityContext:
allowPrivilegeEscalation: false
ports:
- protocol: TCP
containerPort: 80
name: 80-tcp
- protocol: TCP
containerPort: 8080
name: 8080-tcp
- protocol: TCP
containerPort: 8443
name: 8443-tcp
- protocol: TCP
containerPort: 3478
name: 3478-tcp
- protocol: UDP
containerPort: 3478
name: 3478-udp
volumeMounts:
- name: nextcloud_aio_mastercontainer
mountPath: /mnt/docker-aio-config
- name: docker-socket
mountPath: /var/run/docker.sock
readOnly: true
volumes:
- name: nextcloud_aio_mastercontainer
hostPath:
path: /mnt/nfs/AppData/nextcloud
type: Directory
- name: docker-socket
hostPath:
path: /var/run/docker.sock
type: Socket

View File

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

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,25 @@
apiVersion: v1
kind: Service
metadata:
name: nextcloud
namespace: nextcloud
labels:
app.kubernetes.io/name: nextcloud
spec:
selector:
app.kubernetes.io/name: nextcloud
type: ClusterIP
internalTrafficPolicy: Cluster
ports:
- protocol: TCP
port: 80
targetPort: 80
name: 80-tcp
- protocol: TCP
port: 8080
targetPort: 8080
name: 8080-tcp
- protocol: TCP
port: 8443
targetPort: 8443
name: 8443-tcp

View File

@@ -0,0 +1,12 @@
{
"appName": "nextcloud",
"userGivenName": "nextcloud",
"namespace": "nextcloud",
"destNamespace": "nextcloud",
"destServer": "https://kubernetes.default.svc",
"srcPath": "apps/nextcloud/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