diff --git a/apps/charts/esphome/templates/http-service.yaml b/apps/charts/esphome/templates/http-service.yaml deleted file mode 100644 index 15b1989..0000000 --- a/apps/charts/esphome/templates/http-service.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: homelab.mortenolsen.pro/v1 -kind: HttpService -metadata: - name: "{{ .Release.Name }}" -spec: - environment: "{{ .Values.globals.environment }}" - subdomain: "{{ .Values.subdomain }}" - destination: - host: "{{ .Release.Name }}" - port: - number: 80 diff --git a/apps/charts/uptime-kuma/Chart.yaml b/apps/charts/uptime-kuma/Chart.yaml new file mode 100644 index 0000000..5a7d9ab --- /dev/null +++ b/apps/charts/uptime-kuma/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +version: 1.0.0 +name: uptime-kuma diff --git a/apps/charts/uptime-kuma/templates/deployment.yaml b/apps/charts/uptime-kuma/templates/deployment.yaml new file mode 100644 index 0000000..af93efa --- /dev/null +++ b/apps/charts/uptime-kuma/templates/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}" +spec: + strategy: + type: Recreate + replicas: 1 + revisionHistoryLimit: 0 + selector: + matchLabels: + app: "{{ .Release.Name }}" + template: + metadata: + labels: + app: "{{ .Release.Name }}" + spec: + hostNetwork: true + containers: + - name: "{{ .Release.Name }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + ports: + - name: http + containerPort: 3001 + protocol: TCP + livenessProbe: + tcpSocket: + port: http + readinessProbe: + tcpSocket: + port: http + env: + - name: TZ + value: "{{ .Values.globals.timezone }}" + volumeMounts: + - mountPath: /app/data + name: data + + volumes: + - name: data + persistentVolumeClaim: + claimName: "{{ .Release.Name }}-data" diff --git a/apps/charts/uptime-kuma/templates/pvc.yaml b/apps/charts/uptime-kuma/templates/pvc.yaml new file mode 100644 index 0000000..bc1d0a6 --- /dev/null +++ b/apps/charts/uptime-kuma/templates/pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: '{{ .Release.Name }}-data' +spec: + accessModes: + - 'ReadWriteOnce' + resources: + requests: + storage: '1Gi' + storageClassName: '{{ .Values.globals.environment }}' diff --git a/apps/charts/uptime-kuma/templates/service.yaml b/apps/charts/uptime-kuma/templates/service.yaml new file mode 100644 index 0000000..02d8d20 --- /dev/null +++ b/apps/charts/uptime-kuma/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Release.Name }}" + labels: + app: "{{ .Release.Name }}" +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 3001 + protocol: TCP + name: http + selector: + app: "{{ .Release.Name }}" diff --git a/apps/charts/uptime-kuma/templates/virtual-service.yaml b/apps/charts/uptime-kuma/templates/virtual-service.yaml new file mode 100644 index 0000000..0af9b24 --- /dev/null +++ b/apps/charts/uptime-kuma/templates/virtual-service.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: "{{ .Release.Name }}" + namespace: "{{ .Release.Namespace }}" +spec: + gateways: + - "{{ .Values.globals.istio.gateway }}" + - mesh + hosts: + - "{{ .Values.subdomain }}.{{ .Values.globals.domain }}" + - mesh + http: + - route: + - destination: + host: "{{ .Release.Name }}" + port: + number: 80 diff --git a/apps/charts/uptime-kuma/values.yaml b/apps/charts/uptime-kuma/values.yaml new file mode 100644 index 0000000..bcd96d0 --- /dev/null +++ b/apps/charts/uptime-kuma/values.yaml @@ -0,0 +1,5 @@ +image: + repository: louislam/uptime-kuma + tag: 2 + pullPolicy: IfNotPresent +subdomain: uptime-kuma