From 3dccc23dcfcd2af21657cde4cb14a6c5e862394c Mon Sep 17 00:00:00 2001 From: Cyril Tovena Date: Fri, 3 Mar 2023 10:45:51 +0100 Subject: [PATCH] Add headless svc for all workload --- .../helm/phlare/rendered/micro-services.yaml | 126 ++++++++++++++++++ .../helm/phlare/rendered/single-binary.yaml | 1 + .../helm/phlare/templates/services.yaml | 3 +- 3 files changed, 128 insertions(+), 2 deletions(-) diff --git a/operations/phlare/helm/phlare/rendered/micro-services.yaml b/operations/phlare/helm/phlare/rendered/micro-services.yaml index 0c92049dc..6b8ee7f3b 100644 --- a/operations/phlare/helm/phlare/rendered/micro-services.yaml +++ b/operations/phlare/helm/phlare/rendered/micro-services.yaml @@ -1214,6 +1214,31 @@ spec: # Source: phlare/templates/services.yaml apiVersion: v1 kind: Service +metadata: + name: phlare-dev-agent-headless + labels: + helm.sh/chart: phlare-0.5.2 + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/version: "0.5.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "agent" +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 4100 + targetPort: http2 + protocol: TCP + name: http2 + selector: + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/component: "agent" +--- +# Source: phlare/templates/services.yaml +apiVersion: v1 +kind: Service metadata: name: phlare-dev-distributor labels: @@ -1238,6 +1263,31 @@ spec: # Source: phlare/templates/services.yaml apiVersion: v1 kind: Service +metadata: + name: phlare-dev-distributor-headless + labels: + helm.sh/chart: phlare-0.5.2 + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/version: "0.5.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "distributor" +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 4100 + targetPort: http2 + protocol: TCP + name: http2 + selector: + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/component: "distributor" +--- +# Source: phlare/templates/services.yaml +apiVersion: v1 +kind: Service metadata: name: phlare-dev-ingester labels: @@ -1273,6 +1323,7 @@ metadata: app.kubernetes.io/component: "ingester" spec: type: ClusterIP + clusterIP: None ports: - port: 4100 targetPort: http2 @@ -1310,6 +1361,31 @@ spec: # Source: phlare/templates/services.yaml apiVersion: v1 kind: Service +metadata: + name: phlare-dev-querier-headless + labels: + helm.sh/chart: phlare-0.5.2 + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/version: "0.5.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "querier" +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 4100 + targetPort: http2 + protocol: TCP + name: http2 + selector: + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/component: "querier" +--- +# Source: phlare/templates/services.yaml +apiVersion: v1 +kind: Service metadata: name: phlare-dev-query-frontend labels: @@ -1334,6 +1410,31 @@ spec: # Source: phlare/templates/services.yaml apiVersion: v1 kind: Service +metadata: + name: phlare-dev-query-frontend-headless + labels: + helm.sh/chart: phlare-0.5.2 + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/version: "0.5.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "query-frontend" +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 4100 + targetPort: http2 + protocol: TCP + name: http2 + selector: + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/component: "query-frontend" +--- +# Source: phlare/templates/services.yaml +apiVersion: v1 +kind: Service metadata: name: phlare-dev-query-scheduler labels: @@ -1355,6 +1456,31 @@ spec: app.kubernetes.io/instance: phlare-dev app.kubernetes.io/component: "query-scheduler" --- +# Source: phlare/templates/services.yaml +apiVersion: v1 +kind: Service +metadata: + name: phlare-dev-query-scheduler-headless + labels: + helm.sh/chart: phlare-0.5.2 + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/version: "0.5.1" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: "query-scheduler" +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 4100 + targetPort: http2 + protocol: TCP + name: http2 + selector: + app.kubernetes.io/name: phlare + app.kubernetes.io/instance: phlare-dev + app.kubernetes.io/component: "query-scheduler" +--- # Source: phlare/templates/deployments-statefulsets.yaml apiVersion: apps/v1 kind: Deployment diff --git a/operations/phlare/helm/phlare/rendered/single-binary.yaml b/operations/phlare/helm/phlare/rendered/single-binary.yaml index 64bd7e377..e0fb746d7 100644 --- a/operations/phlare/helm/phlare/rendered/single-binary.yaml +++ b/operations/phlare/helm/phlare/rendered/single-binary.yaml @@ -808,6 +808,7 @@ metadata: app.kubernetes.io/component: "all" spec: type: ClusterIP + clusterIP: None ports: - port: 4100 targetPort: http2 diff --git a/operations/phlare/helm/phlare/templates/services.yaml b/operations/phlare/helm/phlare/templates/services.yaml index f0fceff28..2fc04d741 100644 --- a/operations/phlare/helm/phlare/templates/services.yaml +++ b/operations/phlare/helm/phlare/templates/services.yaml @@ -19,7 +19,6 @@ spec: selector: {{- include "phlare.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: {{ $component | quote }} -{{- if eq $cfg.kind "StatefulSet" }} --- apiVersion: v1 kind: Service @@ -30,6 +29,7 @@ metadata: app.kubernetes.io/component: {{ $component | quote }} spec: type: {{ .Values.phlare.service.type }} + clusterIP: None ports: - port: {{ .Values.phlare.service.port }} targetPort: {{ .Values.phlare.service.port_name }} @@ -40,4 +40,3 @@ spec: app.kubernetes.io/component: {{ $component | quote }} {{- end }} {{- end }} -{{- end }}