From 9bc77fa693a1a4530c1cec08d52e23360183eaa7 Mon Sep 17 00:00:00 2001 From: Geoffrey Ragot Date: Thu, 28 Sep 2023 18:33:02 +0200 Subject: [PATCH] feat: remove useless routed stargate service --- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../configmaps--v1/gateway-config.yaml | 2 -- .../results/services--v1/stargate.yaml | 24 ------------------- .../internal/modules/gateway/handler.go | 3 +++ .../operator/internal/modules/service.go | 2 +- .../internal/modules/stargate/handler.go | 1 - 21 files changed, 4 insertions(+), 236 deletions(-) delete mode 100644 components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/services--v1/stargate.yaml delete mode 100644 components/operator/internal/controllers/stack/testdata/monopod-latest/results/services--v1/stargate.yaml delete mode 100644 components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/services--v1/stargate.yaml delete mode 100644 components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/services--v1/stargate.yaml delete mode 100644 components/operator/internal/controllers/stack/testdata/multipod-debug/results/services--v1/stargate.yaml delete mode 100644 components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/services--v1/stargate.yaml delete mode 100644 components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/services--v1/stargate.yaml delete mode 100644 components/operator/internal/controllers/stack/testdata/multipod-latest/results/services--v1/stargate.yaml delete mode 100644 components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/services--v1/stargate.yaml diff --git a/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/configmaps--v1/gateway-config.yaml index 7ad4fdec65..0606ccd5ee 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/configmaps--v1/gateway-config.yaml @@ -69,7 +69,6 @@ data: import handle_path_route_with_auth /api/payments 127.0.0.1:10002 import handle_path_route_with_auth /api/search 127.0.0.1:10003 import handle_path_route_with_auth /api/search-benthos 127.0.0.1:4195 - import handle_path_route_with_auth /api/stargate 127.0.0.1:10004 import handle_path_route_with_auth /api/wallets 127.0.0.1:10005 import handle_path_route_with_auth /api/webhooks 127.0.0.1:10006 @@ -81,7 +80,6 @@ data: auth http://127.0.0.1:10001/_info http://127.0.0.1:10001/_healthcheck payments http://127.0.0.1:10002/_info http://127.0.0.1:10002/_health search http://127.0.0.1:10003/_info http://127.0.0.1:10003/_healthcheck - stargate http://127.0.0.1:10004/_info http://127.0.0.1:10004/_healthcheck wallets http://127.0.0.1:10005/_info http://127.0.0.1:10005/_healthcheck webhooks http://127.0.0.1:10006/_info http://127.0.0.1:10006/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/services--v1/stargate.yaml deleted file mode 100644 index 8dc4be937e..0000000000 --- a/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: monopod-disabled-one-service -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 10004 - protocol: TCP - targetPort: 10004 - selector: - app.kubernetes.io/name: monopod-disabled-one-service - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/controllers/stack/testdata/monopod-latest/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-latest/results/configmaps--v1/gateway-config.yaml index 81c551e90d..e85fd60169 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-latest/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-latest/results/configmaps--v1/gateway-config.yaml @@ -71,7 +71,6 @@ data: import handle_path_route_with_auth /api/payments 127.0.0.1:10003 import handle_path_route_with_auth /api/search 127.0.0.1:10004 import handle_path_route_with_auth /api/search-benthos 127.0.0.1:4195 - import handle_path_route_with_auth /api/stargate 127.0.0.1:10005 import handle_path_route_with_auth /api/wallets 127.0.0.1:10006 import handle_path_route_with_auth /api/webhooks 127.0.0.1:10007 @@ -85,7 +84,6 @@ data: orchestration http://127.0.0.1:8080/_info http://127.0.0.1:8080/_healthcheck payments http://127.0.0.1:10003/_info http://127.0.0.1:10003/_health search http://127.0.0.1:10004/_info http://127.0.0.1:10004/_healthcheck - stargate http://127.0.0.1:10005/_info http://127.0.0.1:10005/_healthcheck wallets http://127.0.0.1:10006/_info http://127.0.0.1:10006/_healthcheck webhooks http://127.0.0.1:10007/_info http://127.0.0.1:10007/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/monopod-latest/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/monopod-latest/results/services--v1/stargate.yaml deleted file mode 100644 index 4f993da187..0000000000 --- a/components/operator/internal/controllers/stack/testdata/monopod-latest/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: monopod-latest -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 10005 - protocol: TCP - targetPort: 10005 - selector: - app.kubernetes.io/name: monopod-latest - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/configmaps--v1/gateway-config.yaml index ebe163836c..a99aa7ebaf 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/configmaps--v1/gateway-config.yaml @@ -71,7 +71,6 @@ data: import handle_path_route_with_auth /api/payments 127.0.0.1:10003 import handle_path_route_with_auth /api/search 127.0.0.1:10004 import handle_path_route_with_auth /api/search-benthos 127.0.0.1:4195 - import handle_path_route_with_auth /api/stargate 127.0.0.1:10005 import handle_path_route_with_auth /api/wallets 127.0.0.1:10006 import handle_path_route_with_auth /api/webhooks 127.0.0.1:10007 @@ -85,7 +84,6 @@ data: orchestration http://127.0.0.1:8080/_info http://127.0.0.1:8080/_healthcheck payments http://127.0.0.1:10003/_info http://127.0.0.1:10003/_health search http://127.0.0.1:10004/_info http://127.0.0.1:10004/_healthcheck - stargate http://127.0.0.1:10005/_info http://127.0.0.1:10005/_healthcheck wallets http://127.0.0.1:10006/_info http://127.0.0.1:10006/_healthcheck webhooks http://127.0.0.1:10007/_info http://127.0.0.1:10007/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/services--v1/stargate.yaml deleted file mode 100644 index 114f90c0b2..0000000000 --- a/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: monopod-ledgerv1 -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 10005 - protocol: TCP - targetPort: 10005 - selector: - app.kubernetes.io/name: monopod-ledgerv1 - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/configmaps--v1/gateway-config.yaml index a97a09f326..762f898d04 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/configmaps--v1/gateway-config.yaml @@ -71,7 +71,6 @@ data: import handle_path_route_with_auth /api/payments 127.0.0.1:10003 import handle_path_route_with_auth /api/search 127.0.0.1:10004 import handle_path_route_with_auth /api/search-benthos 127.0.0.1:4195 - import handle_path_route_with_auth /api/stargate 127.0.0.1:10005 import handle_path_route_with_auth /api/wallets 127.0.0.1:10006 import handle_path_route_with_auth /api/webhooks 127.0.0.1:10007 @@ -85,7 +84,6 @@ data: orchestration http://127.0.0.1:8080/_info http://127.0.0.1:8080/_healthcheck payments http://127.0.0.1:10003/_info http://127.0.0.1:10003/_health search http://127.0.0.1:10004/_info http://127.0.0.1:10004/_healthcheck - stargate http://127.0.0.1:10005/_info http://127.0.0.1:10005/_healthcheck wallets http://127.0.0.1:10006/_info http://127.0.0.1:10006/_healthcheck webhooks http://127.0.0.1:10007/_info http://127.0.0.1:10007/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/services--v1/stargate.yaml deleted file mode 100644 index 9ed931b70b..0000000000 --- a/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: monopod-search-before-v0-7-0 -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 10005 - protocol: TCP - targetPort: 10005 - selector: - app.kubernetes.io/name: monopod-search-before-v0-7-0 - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/controllers/stack/testdata/multipod-debug/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-debug/results/configmaps--v1/gateway-config.yaml index e7d9ab51c1..763dfaacf5 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-debug/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-debug/results/configmaps--v1/gateway-config.yaml @@ -72,7 +72,6 @@ data: import handle_path_route_with_auth /api/payments payments:8080 import handle_path_route_with_auth /api/search search:8080 import handle_path_route_with_auth /api/search-benthos search-benthos:4195 - import handle_path_route_with_auth /api/stargate stargate:8080 import handle_path_route_with_auth /api/wallets wallets:8080 import handle_path_route_with_auth /api/webhooks webhooks:8080 @@ -86,7 +85,6 @@ data: orchestration http://orchestration:8080/_info http://orchestration:8080/_healthcheck payments http://payments:8080/_info http://payments:8080/_health search http://search:8080/_info http://search:8080/_healthcheck - stargate http://stargate:8080/_info http://stargate:8080/_healthcheck wallets http://wallets:8080/_info http://wallets:8080/_healthcheck webhooks http://webhooks:8080/_info http://webhooks:8080/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/multipod-debug/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/multipod-debug/results/services--v1/stargate.yaml deleted file mode 100644 index 0318ff3ff3..0000000000 --- a/components/operator/internal/controllers/stack/testdata/multipod-debug/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: multipod-debug -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - app.kubernetes.io/name: stargate - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/configmaps--v1/gateway-config.yaml index 937de688de..e87eadfeed 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/configmaps--v1/gateway-config.yaml @@ -70,7 +70,6 @@ data: import handle_path_route_with_auth /api/payments payments:8080 import handle_path_route_with_auth /api/search search:8080 import handle_path_route_with_auth /api/search-benthos search-benthos:4195 - import handle_path_route_with_auth /api/stargate stargate:8080 import handle_path_route_with_auth /api/wallets wallets:8080 import handle_path_route_with_auth /api/webhooks webhooks:8080 @@ -83,7 +82,6 @@ data: ledger http://ledger:8080/_info http://ledger:8080/_healthcheck payments http://payments:8080/_info http://payments:8080/_health search http://search:8080/_info http://search:8080/_healthcheck - stargate http://stargate:8080/_info http://stargate:8080/_healthcheck wallets http://wallets:8080/_info http://wallets:8080/_healthcheck webhooks http://webhooks:8080/_info http://webhooks:8080/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/services--v1/stargate.yaml deleted file mode 100644 index f2fdc5f5c6..0000000000 --- a/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: multipod-disabled-one-service -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - app.kubernetes.io/name: stargate - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/configmaps--v1/gateway-config.yaml index e6594f30f6..7aa490d95e 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/configmaps--v1/gateway-config.yaml @@ -71,7 +71,6 @@ data: import handle_path_route_with_auth /api/payments payments:8080 import handle_path_route_with_auth /api/search search:8080 import handle_path_route_with_auth /api/search-benthos search-benthos:4195 - import handle_path_route_with_auth /api/stargate stargate:8080 import handle_path_route_with_auth /api/wallets wallets:8080 import handle_path_route_with_auth /api/webhooks webhooks:8080 @@ -85,7 +84,6 @@ data: orchestration http://orchestration:8080/_info http://orchestration:8080/_healthcheck payments http://payments:8080/_info http://payments:8080/_health search http://search:8080/_info http://search:8080/_healthcheck - stargate http://stargate:8080/_info http://stargate:8080/_healthcheck wallets http://wallets:8080/_info http://wallets:8080/_healthcheck webhooks http://webhooks:8080/_info http://webhooks:8080/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/services--v1/stargate.yaml deleted file mode 100644 index 26d3e56522..0000000000 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: multipod-latest-no-monitoring -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - app.kubernetes.io/name: stargate - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest/results/configmaps--v1/gateway-config.yaml index e526a3abae..ba8c50fe14 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest/results/configmaps--v1/gateway-config.yaml @@ -71,7 +71,6 @@ data: import handle_path_route_with_auth /api/payments payments:8080 import handle_path_route_with_auth /api/search search:8080 import handle_path_route_with_auth /api/search-benthos search-benthos:4195 - import handle_path_route_with_auth /api/stargate stargate:8080 import handle_path_route_with_auth /api/wallets wallets:8080 import handle_path_route_with_auth /api/webhooks webhooks:8080 @@ -85,7 +84,6 @@ data: orchestration http://orchestration:8080/_info http://orchestration:8080/_healthcheck payments http://payments:8080/_info http://payments:8080/_health search http://search:8080/_info http://search:8080/_healthcheck - stargate http://stargate:8080/_info http://stargate:8080/_healthcheck wallets http://wallets:8080/_info http://wallets:8080/_healthcheck webhooks http://webhooks:8080/_info http://webhooks:8080/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest/results/services--v1/stargate.yaml deleted file mode 100644 index b73c650d0f..0000000000 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: multipod-latest -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - app.kubernetes.io/name: stargate - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/configmaps--v1/gateway-config.yaml index 97e187f409..ecad41b88d 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/configmaps--v1/gateway-config.yaml @@ -71,7 +71,6 @@ data: import handle_path_route_with_auth /api/payments payments:8080 import handle_path_route_with_auth /api/search search:8080 import handle_path_route_with_auth /api/search-benthos search-benthos:4195 - import handle_path_route_with_auth /api/stargate stargate:8080 import handle_path_route_with_auth /api/wallets wallets:8080 import handle_path_route_with_auth /api/webhooks webhooks:8080 @@ -85,7 +84,6 @@ data: orchestration http://orchestration:8080/_info http://orchestration:8080/_healthcheck payments http://payments:8080/_info http://payments:8080/_health search http://search:8080/_info http://search:8080/_healthcheck - stargate http://stargate:8080/_info http://stargate:8080/_healthcheck wallets http://wallets:8080/_info http://wallets:8080/_healthcheck webhooks http://webhooks:8080/_info http://webhooks:8080/_healthcheck } diff --git a/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/services--v1/stargate.yaml b/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/services--v1/stargate.yaml deleted file mode 100644 index 4bf090beda..0000000000 --- a/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/services--v1/stargate.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/service-name: stargate - name: stargate - namespace: multipod-service-annotation -spec: - internalTrafficPolicy: Cluster - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - appProtocol: http - name: http - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - app.kubernetes.io/name: stargate - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} diff --git a/components/operator/internal/modules/gateway/handler.go b/components/operator/internal/modules/gateway/handler.go index fd29272f3e..29f7b9f4ce 100644 --- a/components/operator/internal/modules/gateway/handler.go +++ b/components/operator/internal/modules/gateway/handler.go @@ -82,6 +82,9 @@ func createCaddyfile(context modules.ServiceInstallContext) string { continue } for _, s := range module.Services { + if !s.ExposeHTTP { + continue + } usedPort := s.GetUsedPort() if usedPort == 0 { continue diff --git a/components/operator/internal/modules/service.go b/components/operator/internal/modules/service.go index 09a818e4c0..6cec71b868 100644 --- a/components/operator/internal/modules/service.go +++ b/components/operator/internal/modules/service.go @@ -317,7 +317,7 @@ func (service *Service) Prepare(ctx ModuleContext, serviceName string) { if service.AuthConfiguration != nil { _ = ctx.Stack.GetOrCreateClient(serviceName, service.AuthConfiguration(ctx)) } - if service.ExposeHTTP { + if service.ExposeHTTP || service.Liveness != LivenessDisable { service.usedPort = service.Port if service.usedPort == 0 { service.usedPort = ctx.PortAllocator.NextPort() diff --git a/components/operator/internal/modules/stargate/handler.go b/components/operator/internal/modules/stargate/handler.go index 755c2f8669..44b9627e7b 100644 --- a/components/operator/internal/modules/stargate/handler.go +++ b/components/operator/internal/modules/stargate/handler.go @@ -21,7 +21,6 @@ func (s module) Versions() map[string]modules.Version { { ListenEnvVar: "BIND", HasVersionEndpoint: true, - ExposeHTTP: true, Liveness: modules.LivenessDefault, Annotations: ctx.Configuration.Spec.Services.Stargate.Annotations.Service, Container: func(resolveContext modules.ContainerResolutionContext) modules.Container {