From 67420121372a89ce99308d354b695f0a49f93a83 Mon Sep 17 00:00:00 2001 From: Martin Irungu Date: Tue, 2 Apr 2024 14:15:47 +0200 Subject: [PATCH] e2e: fixed emojivoto services --- e2e/internal/kuberesource/sets.go | 34 +++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/e2e/internal/kuberesource/sets.go b/e2e/internal/kuberesource/sets.go index 526426c193..cd576d6b29 100644 --- a/e2e/internal/kuberesource/sets.go +++ b/e2e/internal/kuberesource/sets.go @@ -261,7 +261,22 @@ func Emojivoto() ([]any, error) { } emojiService := ServiceForDeployment(emoji). - WithName("emoji-svc") + WithName("emoji-svc"). + WithSpec(ServiceSpec(). + WithSelector( + map[string]string{"app.kubernetes.io/name": "emoji-svc"}, + ). + WithPorts( + ServicePort(). + WithName("grpc"). + WithPort(8080). + WithTargetPort(intstr.FromInt(8080)), + ServicePort(). + WithName("prom"). + WithPort(8801). + WithTargetPort(intstr.FromInt(8801)), + ), + ) emojiserviceAccount := ServiceAccount("emoji", ns). WithAPIVersion("v1"). @@ -353,7 +368,22 @@ func Emojivoto() ([]any, error) { } votingService := ServiceForDeployment(voting). - WithName("voting-svc") + WithName("voting-svc"). + WithSpec(ServiceSpec(). + WithSelector( + map[string]string{"app.kubernetes.io/name": "voting-svc"}, + ). + WithPorts( + ServicePort(). + WithName("grpc"). + WithPort(8080). + WithTargetPort(intstr.FromInt(8080)), + ServicePort(). + WithName("prom"). + WithPort(8801). + WithTargetPort(intstr.FromInt(8801)), + ), + ) votingserviceAccount := ServiceAccount("voting", ns). WithAPIVersion("v1").