From 2e3657d2d4537c28d587ebba6d0d6a71e21bc453 Mon Sep 17 00:00:00 2001 From: Vlad Lazar Date: Tue, 11 Feb 2025 16:09:46 +0000 Subject: [PATCH] Remove storcon NLB service (#123) Migration to nginx ingress is complete, so we can remove the old service. --- charts/neon-storage-controller/Chart.yaml | 2 +- charts/neon-storage-controller/README.md | 7 +++--- .../scripts/register-storage-controller.py | 2 +- .../templates/post-install-job.yaml | 4 ++-- .../templates/service.yaml | 23 ------------------- charts/neon-storage-controller/values.yaml | 8 ++----- 6 files changed, 9 insertions(+), 37 deletions(-) diff --git a/charts/neon-storage-controller/Chart.yaml b/charts/neon-storage-controller/Chart.yaml index 4022ebb..8cc8686 100644 --- a/charts/neon-storage-controller/Chart.yaml +++ b/charts/neon-storage-controller/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: neon-storage-controller description: Neon storage controller type: application -version: 1.4.0 +version: 1.5.0 appVersion: "0.1.0" kubeVersion: "^1.18.x-x" home: https://neon.tech diff --git a/charts/neon-storage-controller/README.md b/charts/neon-storage-controller/README.md index 844d0e0..38bc216 100644 --- a/charts/neon-storage-controller/README.md +++ b/charts/neon-storage-controller/README.md @@ -1,6 +1,6 @@ # neon-storage-controller -![Version: 1.4.0](https://img.shields.io/badge/Version-1.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![Lint and Test Charts](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml) +![Version: 1.5.0](https://img.shields.io/badge/Version-1.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![Lint and Test Charts](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml) Neon storage controller @@ -35,8 +35,8 @@ Kubernetes: `^1.18.x-x` | image.tag | string | `"latest"` | Overrides the image tag whose default is the chart appVersion. | | imagePullSecrets | list | `[]` | Specify docker-registry secret names as an array | | ingress.annotations | object | `{}` | Additional annotations for Ingress resource. | -| ingress.className | string | `""` | Ingress class for controller | -| ingress.enabled | bool | `false` | Enable ingress controller resource. | +| ingress.className | string | `"nginx-int"` | Ingress class for controller | +| ingress.enabled | bool | `true` | Enable ingress controller resource. | | ingress.hosts[0].host | string | `"chart-example.local"` | | | ingress.hosts[0].paths[0].path | string | `"/"` | | | ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | @@ -69,7 +69,6 @@ Kubernetes: `^1.18.x-x` | serviceAccount.annotations | object | `{}` | Annotations to add to the service account | | serviceAccount.create | bool | `true` | | | serviceAccount.name | string | `""` | | -| serviceNLB | bool | `true` | | | settings.chaosInterval | string | `""` | Chaos testing interval | | settings.computeHookUrl | string | `""` | | | settings.controlPlaneJwtToken | string | `""` | | diff --git a/charts/neon-storage-controller/scripts/register-storage-controller.py b/charts/neon-storage-controller/scripts/register-storage-controller.py index 6dba8cc..1d074bc 100644 --- a/charts/neon-storage-controller/scripts/register-storage-controller.py +++ b/charts/neon-storage-controller/scripts/register-storage-controller.py @@ -11,7 +11,7 @@ # ZONE env will be autogenerated from init container ZONE = os.environ["ZONE"] HOST = os.environ["HOST"] -PORT = os.getenv("PORT", 50051) +PORT = os.getenv("PORT", 80) CPLANE_JWT_TOKEN = os.environ["CONTROL_PLANE_JWT_TOKEN"] diff --git a/charts/neon-storage-controller/templates/post-install-job.yaml b/charts/neon-storage-controller/templates/post-install-job.yaml index 4a75886..0ac8297 100644 --- a/charts/neon-storage-controller/templates/post-install-job.yaml +++ b/charts/neon-storage-controller/templates/post-install-job.yaml @@ -55,9 +55,9 @@ spec: mountPath: /node env: - name: HOST - value: {{ index .Values.service.annotations "external-dns.alpha.kubernetes.io/hostname" | quote }} + value: {{ .Values.registerControlPlane.host | quote }} - name: PORT - value: {{ .Values.service.port | quote }} + value: {{ .Values.registerControlPlane.port | quote }} - name: CPLANE_URL value: {{ .Values.registerControlPlane.cplane_url | quote }} - name: CONSOLE_URL diff --git a/charts/neon-storage-controller/templates/service.yaml b/charts/neon-storage-controller/templates/service.yaml index 92d644c..4a4655f 100644 --- a/charts/neon-storage-controller/templates/service.yaml +++ b/charts/neon-storage-controller/templates/service.yaml @@ -1,26 +1,3 @@ -{{- if .Values.serviceNLB -}} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "neon-storage-controller.fullname" . }} - {{- with .Values.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "neon-storage-controller.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: controller - protocol: TCP - name: controller - selector: - {{- include "neon-storage-controller.selectorLabels" . | nindent 4 }} -{{- end }} ---- apiVersion: v1 kind: Service metadata: diff --git a/charts/neon-storage-controller/values.yaml b/charts/neon-storage-controller/values.yaml index 6d708b4..6952a3b 100644 --- a/charts/neon-storage-controller/values.yaml +++ b/charts/neon-storage-controller/values.yaml @@ -103,15 +103,11 @@ service: # service.port -- controller listen port port: 50051 -# Temporary set "serviceNLB" to keep existing Service with Type LoadBalancer -# After migration we can set this to false to remove NLB -serviceNLB: true - ingress: # ingress.enabled -- Enable ingress controller resource. - enabled: false + enabled: true # ingress.className -- Ingress class for controller - className: "" + className: nginx-int # ingress.annotations -- Additional annotations for Ingress resource. annotations: {} # external-dns.alpha.kubernetes.io/hostname: chart-example.local