From 10bbcdec788cb2326b2c5e6de2f28283e3c422ca Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 10 Jun 2024 21:18:33 +0200 Subject: [PATCH] Allow specify externalIPs for nginx-ingress --- packages/extra/ingress/Chart.yaml | 2 +- packages/extra/ingress/README.md | 7 +++--- packages/extra/ingress/config.json | 23 +++++++++++++++++++ .../ingress/templates/nginx-ingress.yaml | 10 ++++++++ packages/extra/ingress/values.schema.json | 8 +++++++ packages/extra/ingress/values.yaml | 11 +++++++++ packages/extra/versions_map | 3 ++- 7 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 packages/extra/ingress/config.json diff --git a/packages/extra/ingress/Chart.yaml b/packages/extra/ingress/Chart.yaml index d6011181..e9d3511f 100644 --- a/packages/extra/ingress/Chart.yaml +++ b/packages/extra/ingress/Chart.yaml @@ -3,4 +3,4 @@ name: ingress description: NGINX Ingress Controller icon: https://docs.nginx.com/nginx-ingress-controller/images/icons/NGINX-Ingress-Controller-product-icon.svg type: application -version: 1.0.0 +version: 1.1.0 diff --git a/packages/extra/ingress/README.md b/packages/extra/ingress/README.md index ceac2640..6167256a 100644 --- a/packages/extra/ingress/README.md +++ b/packages/extra/ingress/README.md @@ -4,6 +4,7 @@ ### Common parameters -| Name | Description | Value | -| ---------- | -------------------------------- | ----- | -| `replicas` | Number of ingress-nginx replicas | `2` | +| Name | Description | Value | +| ------------- | -------------------------------- | ----- | +| `replicas` | Number of ingress-nginx replicas | `2` | +| `externalIPs` | List of externalIPs for service. | `[]` | diff --git a/packages/extra/ingress/config.json b/packages/extra/ingress/config.json new file mode 100644 index 00000000..b2f956f3 --- /dev/null +++ b/packages/extra/ingress/config.json @@ -0,0 +1,23 @@ +{ + "comments": { + "format": "##" + }, + "tags": { + "param": "@param", + "section": "@section", + "descriptionStart": "@descriptionStart", + "descriptionEnd": "@descriptionEnd", + "skip": "@skip", + "extra": "@extra" + }, + "modifiers": { + "array": "array", + "object": "object", + "string": "string", + "nullable": "nullable", + "default": "default" + }, + "regexp": { + "paramsSectionTitle": "Parameters" + } +} diff --git a/packages/extra/ingress/templates/nginx-ingress.yaml b/packages/extra/ingress/templates/nginx-ingress.yaml index 68a5c18c..816327f0 100644 --- a/packages/extra/ingress/templates/nginx-ingress.yaml +++ b/packages/extra/ingress/templates/nginx-ingress.yaml @@ -27,3 +27,13 @@ spec: admissionWebhooks: enabled: false {{- end }} + service: + {{- if .Values.externalIPs }} + externalIPs: + {{- toYaml .Values.externalIPs | nindent 12 }} + type: ClusterIP + externalTrafficPolicy: Cluster + {{- else }} + type: LoadBalancer + externalTrafficPolicy: Local + {{- end }} diff --git a/packages/extra/ingress/values.schema.json b/packages/extra/ingress/values.schema.json index 05987fd2..48b05272 100644 --- a/packages/extra/ingress/values.schema.json +++ b/packages/extra/ingress/values.schema.json @@ -6,6 +6,14 @@ "type": "number", "description": "Number of ingress-nginx replicas", "default": 2 + }, + "externalIPs": { + "type": "array", + "description": "List of externalIPs for service.", + "default": "[]", + "items": { + "type": "string" + } } } } \ No newline at end of file diff --git a/packages/extra/ingress/values.yaml b/packages/extra/ingress/values.yaml index bf98d04c..85b78e6f 100644 --- a/packages/extra/ingress/values.yaml +++ b/packages/extra/ingress/values.yaml @@ -3,3 +3,14 @@ ## @param replicas Number of ingress-nginx replicas ## replicas: 2 + +## @param externalIPs [array] List of externalIPs for service. +## Optional. If not specified will use LoadBalancer service by default. +## +## e.g: +## externalIPs: +## - "11.22.33.44" +## - "11.22.33.45" +## - "11.22.33.46" +## +externalIPs: [] diff --git a/packages/extra/versions_map b/packages/extra/versions_map index 6bc2b2f9..7b373bf8 100644 --- a/packages/extra/versions_map +++ b/packages/extra/versions_map @@ -2,5 +2,6 @@ etcd 1.0.0 f7eaab0 etcd 2.0.0 a6d0f7cf etcd 2.0.1 6fc1cc7d etcd 2.1.0 HEAD -ingress 1.0.0 HEAD +ingress 1.0.0 f642698 +ingress 1.1.0 HEAD monitoring 1.0.0 HEAD