From 8a8187b54a2827a78a26d4bce730887533662a48 Mon Sep 17 00:00:00 2001 From: guy-frontegg Date: Tue, 7 Jan 2025 11:26:38 +0200 Subject: [PATCH] bring back triple service --- .../templates/high-priority/hp-httproute.yaml | 20 +++++++++---------- .../high-priority/hp-pd-services.yaml | 4 +++- .../templates/high-priority/hp-rollout.yaml | 2 +- .../templates/web/web-httproute.yaml | 14 ++++++------- .../templates/web/web-pd-services.yaml | 4 +++- .../templates/web/web-rollout.yaml | 2 +- .../templates/worker/worker-httproute.yaml | 18 ++++++++--------- .../templates/worker/worker-pd-services.yaml | 4 +++- .../templates/worker/worker-rollout.yaml | 2 +- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/common/unified-chart/templates/high-priority/hp-httproute.yaml b/common/unified-chart/templates/high-priority/hp-httproute.yaml index 29dd1d5..23edeca 100644 --- a/common/unified-chart/templates/high-priority/hp-httproute.yaml +++ b/common/unified-chart/templates/high-priority/hp-httproute.yaml @@ -3,7 +3,7 @@ {{- if .Values.hp.enabled }} {{- if .Values.argoRollouts.progressiveDelivery.enabled }} --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ include "hp.name" $top }}-route @@ -17,15 +17,13 @@ spec: {{- end }} rules: - backendRefs: - {{- range $values.hp.service.ports }} - - name: {{ include "hp.name" $top }}-canary - group: "core" - port: {{ required ".Values.hp.service.ports[*].port number is required" .port }} - kind: Service - - name: {{ include "hp.name" $top }} - group: "core" - port: {{ required ".Values.hp.service.ports[*].port number is required" .port }} - kind: Service - {{- end }} + {{- range $type := tuple "canary" "stable" }} + {{- range $values.hp.service.ports }} + - name: {{ include "hp.name" $top }}-{{ $type }} + group: "core" + port: {{ required ".Values.hp.service.ports[*].port number is required" .port }} + kind: Service + {{- end }} + {{- end }} {{- end }} {{- end }} diff --git a/common/unified-chart/templates/high-priority/hp-pd-services.yaml b/common/unified-chart/templates/high-priority/hp-pd-services.yaml index 0f04425..7abb665 100644 --- a/common/unified-chart/templates/high-priority/hp-pd-services.yaml +++ b/common/unified-chart/templates/high-priority/hp-pd-services.yaml @@ -2,11 +2,12 @@ {{- $values := .Values -}} {{- if .Values.hp.enabled }} {{- if .Values.argoRollouts.progressiveDelivery.enabled }} +{{- range $type := tuple "canary" "stable" }} --- apiVersion: v1 kind: Service metadata: - name: {{ include "hp.name" $top }}-canary + name: {{ include "hp.name" $top }}-{{ $type }} labels: {{- include "hp.labels" $top | nindent 4 }} {{- with $values.hp.service.labels }} @@ -25,5 +26,6 @@ spec: {{- include "hp.selector.labels" $top | nindent 4 }} {{- end }} {{- end }} +{{- end }} diff --git a/common/unified-chart/templates/high-priority/hp-rollout.yaml b/common/unified-chart/templates/high-priority/hp-rollout.yaml index 996f390..68b09c4 100644 --- a/common/unified-chart/templates/high-priority/hp-rollout.yaml +++ b/common/unified-chart/templates/high-priority/hp-rollout.yaml @@ -25,7 +25,7 @@ spec: {{- toYaml .canaryMetadata | nindent 8 }} {{- end }} canaryService: {{ include "hp.name" . }}-canary - stableService: {{ include "hp.name" . }} + stableService: {{ include "hp.name" . }}-stable trafficRouting: managedRoutes: - name: {{ include "hp.name" . }} diff --git a/common/unified-chart/templates/web/web-httproute.yaml b/common/unified-chart/templates/web/web-httproute.yaml index 3a57674..18a70c3 100644 --- a/common/unified-chart/templates/web/web-httproute.yaml +++ b/common/unified-chart/templates/web/web-httproute.yaml @@ -3,7 +3,7 @@ {{- if .Values.web.enabled -}} {{- if .Values.argoRollouts.progressiveDelivery.enabled }} --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ include "web.name" $top }}-route @@ -17,15 +17,13 @@ spec: {{- end }} rules: - backendRefs: - {{- range $values.web.service.ports }} - - name: {{ include "web.name" $top }}-canary + {{- range $type := tuple "canary" "stable" }} + {{- range $values.web.service.ports }} + - name: {{ include "web.name" $top }}-{{ $type }} group: "core" port: {{ required ".Values.web.service.ports[*].port number is required" .port }} kind: Service - - name: {{ include "web.name" $top }} - group: "core" - port: {{ required ".Values.web.service.ports[*].port number is required" .port }} - kind: Service - {{- end }} + {{- end }} + {{- end }} {{- end }} {{- end }} diff --git a/common/unified-chart/templates/web/web-pd-services.yaml b/common/unified-chart/templates/web/web-pd-services.yaml index 90632a5..40198c2 100644 --- a/common/unified-chart/templates/web/web-pd-services.yaml +++ b/common/unified-chart/templates/web/web-pd-services.yaml @@ -2,11 +2,12 @@ {{- $values := .Values -}} {{- if .Values.web.enabled -}} {{- if .Values.argoRollouts.progressiveDelivery.enabled }} +{{- range $type := tuple "canary" "stable" }} --- apiVersion: v1 kind: Service metadata: - name: {{ include "web.name" $top }}-canary + name: {{ include "web.name" $top }}-{{ $type }} labels: {{- include "web.labels" $top | nindent 4 }} {{- with $values.web.service.labels }} @@ -25,5 +26,6 @@ spec: {{- include "web.selector.labels" $top | nindent 4 }} {{- end }} {{- end }} +{{- end }} diff --git a/common/unified-chart/templates/web/web-rollout.yaml b/common/unified-chart/templates/web/web-rollout.yaml index 6395432..1d22db3 100644 --- a/common/unified-chart/templates/web/web-rollout.yaml +++ b/common/unified-chart/templates/web/web-rollout.yaml @@ -25,7 +25,7 @@ spec: {{- toYaml .canaryMetadata | nindent 8 }} {{- end }} canaryService: {{ include "web.name" . }}-canary - stableService: {{ include "web.name" . }} + stableService: {{ include "web.name" . }}-stable trafficRouting: managedRoutes: - name: {{ include "web.name" . }} diff --git a/common/unified-chart/templates/worker/worker-httproute.yaml b/common/unified-chart/templates/worker/worker-httproute.yaml index e97be1c..ad0ef94 100644 --- a/common/unified-chart/templates/worker/worker-httproute.yaml +++ b/common/unified-chart/templates/worker/worker-httproute.yaml @@ -3,7 +3,7 @@ {{- if .Values.worker.enabled }} {{- if .Values.argoRollouts.progressiveDelivery.enabled }} --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ include "worker.name" $top }}-route @@ -17,15 +17,13 @@ spec: {{- end }} rules: - backendRefs: - {{- range $values.worker.service.ports }} - - name: {{ include "worker.name" $top }}-canary - group: "core" - port: {{ required ".Values.worker.service.ports[*].port number is required" .port }} - kind: Service - - name: {{ include "worker.name" $top }} - group: "core" - port: {{ required ".Values.worker.service.ports[*].port number is required" .port }} - kind: Service + {{- range $type := tuple "canary" "stable" }} + {{- range $values.worker.service.ports }} + - name: {{ include "worker.name" $top }}-{{ $type }} + group: "core" + port: {{ required ".Values.worker.service.ports[*].port number is required" .port }} + kind: Service + {{- end }} {{- end }} {{- end }} {{- end }} diff --git a/common/unified-chart/templates/worker/worker-pd-services.yaml b/common/unified-chart/templates/worker/worker-pd-services.yaml index 8e7f85d..820bcd4 100644 --- a/common/unified-chart/templates/worker/worker-pd-services.yaml +++ b/common/unified-chart/templates/worker/worker-pd-services.yaml @@ -2,11 +2,12 @@ {{- $values := .Values -}} {{- if .Values.worker.enabled }} {{- if .Values.argoRollouts.progressiveDelivery.enabled }} +{{- range $type := tuple "canary" "stable" }} --- apiVersion: v1 kind: Service metadata: - name: {{ include "worker.name" $top }}-canary + name: {{ include "worker.name" $top }}-{{ $type }} labels: {{- include "worker.labels" $top | nindent 4 }} {{- with $values.worker.service.labels }} @@ -25,5 +26,6 @@ spec: {{- include "worker.selector.labels" $top | nindent 4 }} {{- end }} {{- end }} +{{- end }} diff --git a/common/unified-chart/templates/worker/worker-rollout.yaml b/common/unified-chart/templates/worker/worker-rollout.yaml index 54f440e..bb19057 100644 --- a/common/unified-chart/templates/worker/worker-rollout.yaml +++ b/common/unified-chart/templates/worker/worker-rollout.yaml @@ -25,7 +25,7 @@ spec: {{- toYaml .canaryMetadata | nindent 8 }} {{- end }} canaryService: {{ include "worker.name" . }}-canary - stableService: {{ include "worker.name" . }} + stableService: {{ include "worker.name" . }}-stable trafficRouting: managedRoutes: - name: {{ include "worker.name" . }}