From 422033024576c4bbbedbc3cb91a715c602d42822 Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Thu, 11 Dec 2025 23:53:08 +0100 Subject: [PATCH] add drip --- apps/charts/drip.disabled/Chart.yaml | 3 + .../drip.disabled/templates/deployment.yaml | 80 +++++++++++++++++++ .../templates/external-http-service.yaml | 11 +++ apps/charts/drip.disabled/templates/pvc.yaml | 11 +++ .../drip.disabled/templates/secret.yaml | 9 +++ .../drip.disabled/templates/service.yaml | 20 +++++ .../templates/virtual-service.yaml | 18 +++++ apps/charts/drip.disabled/values.yaml | 27 +++++++ 8 files changed, 179 insertions(+) create mode 100644 apps/charts/drip.disabled/Chart.yaml create mode 100644 apps/charts/drip.disabled/templates/deployment.yaml create mode 100644 apps/charts/drip.disabled/templates/external-http-service.yaml create mode 100644 apps/charts/drip.disabled/templates/pvc.yaml create mode 100644 apps/charts/drip.disabled/templates/secret.yaml create mode 100644 apps/charts/drip.disabled/templates/service.yaml create mode 100644 apps/charts/drip.disabled/templates/virtual-service.yaml create mode 100644 apps/charts/drip.disabled/values.yaml diff --git a/apps/charts/drip.disabled/Chart.yaml b/apps/charts/drip.disabled/Chart.yaml new file mode 100644 index 0000000..cf7c9e4 --- /dev/null +++ b/apps/charts/drip.disabled/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +version: 1.0.0 +name: drip diff --git a/apps/charts/drip.disabled/templates/deployment.yaml b/apps/charts/drip.disabled/templates/deployment.yaml new file mode 100644 index 0000000..e8d8273 --- /dev/null +++ b/apps/charts/drip.disabled/templates/deployment.yaml @@ -0,0 +1,80 @@ +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: + containers: + - name: "{{ .Release.Name }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: "{{ .Values.image.pullPolicy }}" + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + - name: tcp-tunnel-min + containerPort: {{ .Values.service.tcpPortMin }} + protocol: TCP + - name: tcp-tunnel-max + containerPort: {{ .Values.service.tcpPortMax }} + protocol: TCP + + volumeMounts: + - mountPath: /app/data + name: data + env: + - name: TZ + value: UTC + - name: AUTH_TOKEN + valueFrom: + secretKeyRef: + name: "{{ .Release.Name }}-secrets" + key: authtoken + - name: DOMAIN + value: "{{ .Values.subdomain }}.{{ .Values.globals.environment }}" + command: + - drip-server + - --domain + - "{{ .Values.subdomain }}.{{ .Values.globals.environment }}" + - --port + - "{{ .Values.service.port }}" + - --token + - "$(AUTH_TOKEN)" + - --tcp-port-min + - "{{ .Values.service.tcpPortMin }}" + - --tcp-port-max + - "{{ .Values.service.tcpPortMax }}" + livenessProbe: + exec: + command: {{ .Values.healthcheck.test }} + initialDelaySeconds: {{ .Values.healthcheck.startPeriod | default 0 | trimSuffix "s" | int }} + periodSeconds: {{ .Values.healthcheck.interval | default 10 | trimSuffix "s" | int }} + timeoutSeconds: {{ .Values.healthcheck.timeout | default 1 | trimSuffix "s" | int }} + failureThreshold: {{ .Values.healthcheck.retries | default 3 }} + readinessProbe: + exec: + command: {{ .Values.healthcheck.test }} + initialDelaySeconds: {{ .Values.healthcheck.startPeriod | default 0 | trimSuffix "s" | int }} + periodSeconds: {{ .Values.healthcheck.interval | default 10 | trimSuffix "s" | int }} + timeoutSeconds: {{ .Values.healthcheck.timeout | default 1 | trimSuffix "s" | int }} + failureThreshold: {{ .Values.healthcheck.retries | default 3 }} + + resources: + limits: + cpu: "{{ .Values.resources.limits.cpu }}" + memory: "{{ .Values.resources.limits.memory }}" + volumes: + - name: data + persistentVolumeClaim: + claimName: "{{ .Release.Name }}-data" diff --git a/apps/charts/drip.disabled/templates/external-http-service.yaml b/apps/charts/drip.disabled/templates/external-http-service.yaml new file mode 100644 index 0000000..3a0fd00 --- /dev/null +++ b/apps/charts/drip.disabled/templates/external-http-service.yaml @@ -0,0 +1,11 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: ExternalHttpService +metadata: + name: '{{ .Release.Name }}' +spec: + environment: '{{ .Values.globals.environment }}' + subdomain: '{{ .Values.subdomain }}' + destination: + host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local' + port: + number: {{ .Values.service.port }} diff --git a/apps/charts/drip.disabled/templates/pvc.yaml b/apps/charts/drip.disabled/templates/pvc.yaml new file mode 100644 index 0000000..f25de98 --- /dev/null +++ b/apps/charts/drip.disabled/templates/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: "{{ .Release.Name }}-data" +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: '{{ .Values.globals.environment }}' diff --git a/apps/charts/drip.disabled/templates/secret.yaml b/apps/charts/drip.disabled/templates/secret.yaml new file mode 100644 index 0000000..3f8b5f1 --- /dev/null +++ b/apps/charts/drip.disabled/templates/secret.yaml @@ -0,0 +1,9 @@ +apiVersion: homelab.mortenolsen.pro/v1 +kind: GenerateSecret +metadata: + name: "{{ .Release.Name }}-secrets" +spec: + fields: + - name: authtoken + encoding: hex + length: 64 diff --git a/apps/charts/drip.disabled/templates/service.yaml b/apps/charts/drip.disabled/templates/service.yaml new file mode 100644 index 0000000..bf0b74f --- /dev/null +++ b/apps/charts/drip.disabled/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Release.Name }}" +spec: + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.tcpPortMin }} + targetPort: tcp-tunnel-min + protocol: TCP + name: tcp-tunnel-min + - port: {{ .Values.service.tcpPortMax }} + targetPort: tcp-tunnel-max + protocol: TCP + name: tcp-tunnel-max + selector: + app: "{{ .Release.Name }}" diff --git a/apps/charts/drip.disabled/templates/virtual-service.yaml b/apps/charts/drip.disabled/templates/virtual-service.yaml new file mode 100644 index 0000000..0af9b24 --- /dev/null +++ b/apps/charts/drip.disabled/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/drip.disabled/values.yaml b/apps/charts/drip.disabled/values.yaml new file mode 100644 index 0000000..2485f68 --- /dev/null +++ b/apps/charts/drip.disabled/values.yaml @@ -0,0 +1,27 @@ +image: + repository: ghcr.io/gouryella/drip + tag: latest + pullPolicy: IfNotPresent +subdomain: drip + +service: + port: 443 + tcpPortMin: 20000 + tcpPortMax: 20100 + +resources: + limits: + cpu: 1 + memory: 512Mi + +healthcheck: + test: + - wget + - --no-verbose + - --tries=1 + - --spider + - http://localhost:443/health + interval: 30s + timeout: 3s + retries: 3 + startPeriod: 10s