From 0e985486976bad499a07d2fddbb2e6cae9c55943 Mon Sep 17 00:00:00 2001 From: eseiker Date: Thu, 31 Oct 2024 18:38:08 +0900 Subject: [PATCH] Add external-dns hostname to rudolf-service External loadbalancer to be removed, replaced with and merged into gateway gradually --- 9c-internal/multiplanetary/network/9c-network.yaml | 1 + 9c-internal/multiplanetary/network/heimdall.yaml | 1 + 9c-internal/multiplanetary/network/thor.yaml | 1 + 9c-main/multiplanetary/network/9c-network.yaml | 1 + 9c-main/multiplanetary/network/heimdall.yaml | 1 + charts/all-in-one/templates/rudolf-service.yaml | 12 ++++++++---- charts/all-in-one/values.schema.json | 4 ++++ 7 files changed, 17 insertions(+), 4 deletions(-) diff --git a/9c-internal/multiplanetary/network/9c-network.yaml b/9c-internal/multiplanetary/network/9c-network.yaml index 6919cb5b8..a68543a14 100644 --- a/9c-internal/multiplanetary/network/9c-network.yaml +++ b/9c-internal/multiplanetary/network/9c-network.yaml @@ -232,6 +232,7 @@ rudolfService: roleArn: "arn:aws:iam::319679068466:role/InternalRudolfSignerRole" service: enabled: true + hostname: odin-internal-rudolf.9c.gg securityGroupIds: - "sg-0c865006315f5b9f0" - "sg-0343e5c4514681670" diff --git a/9c-internal/multiplanetary/network/heimdall.yaml b/9c-internal/multiplanetary/network/heimdall.yaml index 69eb00ce7..990f333d3 100644 --- a/9c-internal/multiplanetary/network/heimdall.yaml +++ b/9c-internal/multiplanetary/network/heimdall.yaml @@ -190,6 +190,7 @@ rudolfService: service: enabled: true + hostname: heimdall-internal-rudolf.9c.gg securityGroupIds: - "sg-0c865006315f5b9f0" - "sg-0343e5c4514681670" diff --git a/9c-internal/multiplanetary/network/thor.yaml b/9c-internal/multiplanetary/network/thor.yaml index 1dfe23070..3992eed39 100644 --- a/9c-internal/multiplanetary/network/thor.yaml +++ b/9c-internal/multiplanetary/network/thor.yaml @@ -190,6 +190,7 @@ rudolfService: service: enabled: true + hostname: thor-internal-rudolf.9c.gg securityGroupIds: - "sg-0c865006315f5b9f0" - "sg-0343e5c4514681670" diff --git a/9c-main/multiplanetary/network/9c-network.yaml b/9c-main/multiplanetary/network/9c-network.yaml index a719d8425..63226a0af 100644 --- a/9c-main/multiplanetary/network/9c-network.yaml +++ b/9c-main/multiplanetary/network/9c-network.yaml @@ -633,6 +633,7 @@ rudolfService: service: enabled: true + hostname: odin-rudolf.9c.gg securityGroupIds: - "sg-0f0bf654f2ff02289" - "sg-033602a010bce902e" diff --git a/9c-main/multiplanetary/network/heimdall.yaml b/9c-main/multiplanetary/network/heimdall.yaml index 74856a894..43cec4587 100644 --- a/9c-main/multiplanetary/network/heimdall.yaml +++ b/9c-main/multiplanetary/network/heimdall.yaml @@ -663,6 +663,7 @@ rudolfService: service: enabled: true + hostname: heimdall-rudolf.9c.gg securityGroupIds: - "sg-0f0bf654f2ff02289" - "sg-033602a010bce902e" diff --git a/charts/all-in-one/templates/rudolf-service.yaml b/charts/all-in-one/templates/rudolf-service.yaml index 648f1ca70..3b5ead541 100644 --- a/charts/all-in-one/templates/rudolf-service.yaml +++ b/charts/all-in-one/templates/rudolf-service.yaml @@ -76,16 +76,20 @@ metadata: labels: app.kubernetes.io/instance: {{ .Release.Name }} annotations: + {{- with $.Values.global.service.annotations }} + {{ $_ := unset . "service.beta.kubernetes.io/aws-load-balancer-scheme" }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- if .Values.rudolfService.service.public }} service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing {{- end }} - service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip" {{- if .Values.rudolfService.service.securityGroupIds }} service.beta.kubernetes.io/aws-load-balancer-security-groups: {{ join "," .Values.rudolfService.service.securityGroupIds }} {{- end }} - service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:319679068466:certificate/2481ac9e-2037-4331-9234-4b3f86d50ad3 - service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443" - service.beta.kubernetes.io/aws-load-balancer-type: external + {{- with .Values.rudolfService.service.hostname }} + external-dns.alpha.kubernetes.io/hostname: {{ . }} + external-dns.alpha.kubernetes.io/ttl: '60' + {{- end }} spec: externalTrafficPolicy: Local type: LoadBalancer diff --git a/charts/all-in-one/values.schema.json b/charts/all-in-one/values.schema.json index 50b5dbb08..63bbd8229 100644 --- a/charts/all-in-one/values.schema.json +++ b/charts/all-in-one/values.schema.json @@ -92,6 +92,10 @@ "public": { "type": "boolean", "description": "Expose the service to the public." + }, + "hostname": { + "type": "string", + "description": "Hostname assigned to the service to sync with externalDNS." } }, "additionalProperties": false,