commit ce36b33bacdd49bc1031fa81b99ebe01f665364a Author: Jim Nicholson Date: Wed Dec 1 21:38:58 2021 -0800 Init project diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..5d27ad6 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: heimdall # < name of the deployment + namespace: heimdall # < namespace where place the deployment and pods + labels: + app: heimdall # < label for tagging and reference +spec: + replicas: 1 # < number of pods to deploy + selector: + matchLabels: + app: heimdall + strategy: + rollingUpdate: + maxSurge: 0 # < The number of pods that can be created above the desired amount of pods during an update + maxUnavailable: 1 # < The number of pods that can be unavailable during the update process + type: RollingUpdate # < New pods are added gradually, and old pods are terminated gradually + template: + metadata: + labels: + app: heimdall + spec: + volumes: + - name: heimdall-data + persistentVolumeClaim: + claimName: heimdall-claim + containers: + - image: ghcr.io/linuxserver/heimdall # < the name of the docker image we will use + name: heimdall # < name of container + imagePullPolicy: Always # < always use the latest image when creating container/pod + env: # < the environment variables required (see container documentation) + - name: PGID + value: "1000" + - name: PUID + value: "1000" + - name: TZ + value: "America/Los_Angeles" + ports: # < the ports required (see container documentation) + - containerPort: 80 + name: http-80 + protocol: TCP + volumeMounts: # < the volume mount in the container. Look at the relation volumelabel->pvc->pv + - mountPath: /config # < mount location in the container + name: heimdall-data # < volumelabel configured earlier in the yaml file diff --git a/ingress.yaml b/ingress.yaml new file mode 100644 index 0000000..91ae2b9 --- /dev/null +++ b/ingress.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: heimdall-ingress + namespace: heimdall + annotations: + kubernetes.io/ingress.class: "traefik" +spec: + rules: + - host: heimdall.home.thejimnicholson.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: heimdall + port: + number: 80 \ No newline at end of file diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..a267cfe --- /dev/null +++ b/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- namespace.yaml +- volume.yaml +- deployment.yaml +- service.yaml +- ingress.yaml \ No newline at end of file diff --git a/namespace.yaml b/namespace.yaml new file mode 100644 index 0000000..c042b6b --- /dev/null +++ b/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: heimdall diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..b45b189 --- /dev/null +++ b/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: heimdall + namespace: heimdall +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 80 + selector: + app: heimdall + \ No newline at end of file diff --git a/volume.yaml b/volume.yaml new file mode 100644 index 0000000..9a72d37 --- /dev/null +++ b/volume.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: heimdall-claim + namespace: heimdall +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 1Gi