From d968cce2800ddf15cacd66d9df57e908ae7350ff Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Mon, 16 May 2022 20:38:45 +0200 Subject: [PATCH] fix: decouple service from drone config --- templates/deployment.yaml | 8 ++++---- templates/service.yaml | 4 ++-- values.yaml | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 6956b74..2534c15 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -28,9 +28,9 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} livenessProbe: httpGet: - scheme: {{ .Values.config.DRONE_SERVER_PROTO | upper | default "HTTP" }} + scheme: HTTP path: /healthz - port: {{ .Values.config.DRONE_SERVER_PROTO | default "http" }} + port: http ports: - name: http containerPort: 80 @@ -40,9 +40,9 @@ spec: protocol: TCP readinessProbe: httpGet: - scheme: {{ .Values.config.DRONE_SERVER_PROTO | upper | default "HTTP" }} + scheme: HTTP path: /healthz - port: {{ .Values.config.DRONE_SERVER_PROTO | default "http" }} + port: http resources: {{- toYaml .Values.resources | nindent 12 }} {{- if .Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3" }} diff --git a/templates/service.yaml b/templates/service.yaml index 72ef0bf..f1da91a 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -29,8 +29,8 @@ spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} - targetPort: {{ .Values.config.DRONE_SERVER_PROTO | default "http" }} + targetPort: {{ .Values.service.targetPort }} protocol: TCP - name: {{ .Values.config.DRONE_SERVER_PROTO | default "http" }} + name: {{ .Values.service.name }} selector: {{- include "drone.selectorLabels" . | nindent 4 }} diff --git a/values.yaml b/values.yaml index e78db7e..f6891fb 100644 --- a/values.yaml +++ b/values.yaml @@ -533,6 +533,8 @@ service: # loadBalancerIP: "" # loadBalancerSourceRanges: [] # internalTrafficPolicy: "Cluster" + name: http + targetPort: 80 type: ClusterIP port: 80