diff --git a/.github/workflows/helm-tests.yml b/.github/workflows/helm-tests.yml index a6d9b86d..de66e9d7 100644 --- a/.github/workflows/helm-tests.yml +++ b/.github/workflows/helm-tests.yml @@ -25,7 +25,7 @@ jobs: - run: | cd helm-chart helm unittest eoapi -f 'tests/*.yaml' -v eoapi/test-helm-values.yaml - unit-tests: + integration-tests: if: github.event.pull_request.head.repo.full_name == github.repository permissions: contents: 'read' diff --git a/docs/configuration.md b/docs/configuration.md index 16962ccd..e25e94d7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -61,19 +61,6 @@ Here's a simplified high-level diagram to grok: ## Additional Options -### Key `ingress.className` - -| **Values Key** | **Description** | **Default** | **Choices** | -|:-----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|:-----------|:--------------| -| `ingress.className` | used as switch in helm templates for specific
functionality regarding `kind: Ingress` and cloud-provider
specific load balancing options | nginx | nginx
alb
gce
| - -#### Given `ingress.className=nginx` -![](./images/default_architecture.png) - - -#### Given `ingress.className=alb||gce` -![](./images/alb_architecture.png) - --- ### Key `autoscaling` diff --git a/helm-chart/eoapi/CHANGELOG.md b/helm-chart/eoapi/CHANGELOG.md index 5f0d86db..eba8bad3 100644 --- a/helm-chart/eoapi/CHANGELOG.md +++ b/helm-chart/eoapi/CHANGELOG.md @@ -1,6 +1,10 @@ version numbers below correspond to helm chart `appVersion`: see `./helm-chart/eoapi/Chart.yaml` --- -### 0.2.11 (2024-01-19) +### 0.3.1 (2024-01-19) + +* removed support for having anything but `ingresss.className=='nginx'` + +### 0.2.11 (2024-01-18) * added `ingress.annotations` key to pass through to the nginx ingress -- thanks @ghelobytes * upgraded titiler/pgstac/tipg images and integration tests -- thanks @vincentsarago diff --git a/helm-chart/eoapi/Chart.yaml b/helm-chart/eoapi/Chart.yaml index 309d3223..d8f3ea9a 100644 --- a/helm-chart/eoapi/Chart.yaml +++ b/helm-chart/eoapi/Chart.yaml @@ -17,10 +17,10 @@ kubeVersion: ">=1.23.0-0" # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "0.1.13" +version: "0.2.14" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.2.11" +appVersion: "0.3.1" diff --git a/helm-chart/eoapi/templates/services/ingress-alb.yaml b/helm-chart/eoapi/templates/services/ingress-alb.yaml deleted file mode 100644 index 1e070221..00000000 --- a/helm-chart/eoapi/templates/services/ingress-alb.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- if (and (.Values.ingress.enabled) (eq .Values.ingress.className "alb")) }} -{{- range $serviceName, $v := .Values -}} -{{- if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) }} -{{- if index $v "enabled" }} -{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" $.Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $serviceName }} - # AWS EKS: - # https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/ingress/annotations/ - # GCP GKE: - # https://cloud.google.com/kubernetes-engine/docs/concepts/ingress - annotations: - alb.ingress.kubernetes.io/target-type: instance - alb.ingress.kubernetes.io/scheme: internet-facing -spec: - {{- if (and ($.Values.ingress.className) (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion)) }} - ingressClassName: {{ $.Values.ingress.className }} - {{- end }} - rules: - - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: {{ $serviceName }} - port: - number: {{ $.Values.service.port }} ---- -{{/* END: if index $v "enabled" */}} -{{- end }} -{{/* END: if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) */}} -{{- end }} -{{/* END: range $serviceName, $v := .Values*/}} -{{- end }} -{{/* END: if .Values.ingress.className "alb" */}} -{{- end }} diff --git a/helm-chart/eoapi/templates/services/ingress-gce.yaml b/helm-chart/eoapi/templates/services/ingress-gce.yaml deleted file mode 100644 index e0da898a..00000000 --- a/helm-chart/eoapi/templates/services/ingress-gce.yaml +++ /dev/null @@ -1,42 +0,0 @@ -{{- if (and (.Values.ingress.enabled) (eq .Values.ingress.className "gce")) }} -{{- range $serviceName, $v := .Values -}} -{{- if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) }} -{{- if index $v "enabled" }} -{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" $.Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $serviceName }} - # AWS EKS: - # https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/ingress/annotations/ - # GCP GKE: - # https://cloud.google.com/kubernetes-engine/docs/concepts/ingress - annotations: - {{- if (and ($.Values.ingress.className) (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion)) }} - kubernetes.io/ingress.class: "{{ $.Values.ingress.className }}" - {{- end }} -spec: - rules: - - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: {{ $serviceName }} - port: - number: {{ $.Values.service.port }} ---- -{{/* END: if index $v "enabled" */}} -{{- end }} -{{/* END: if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) */}} -{{- end }} -{{/* END: range $serviceName, $v := .Values*/}} -{{- end }} -{{/* END: if .Values.ingress.className "alb" */}} -{{- end }} diff --git a/helm-chart/eoapi/templates/services/service.yaml b/helm-chart/eoapi/templates/services/service.yaml index 07079516..b66a737f 100644 --- a/helm-chart/eoapi/templates/services/service.yaml +++ b/helm-chart/eoapi/templates/services/service.yaml @@ -14,9 +14,7 @@ metadata: name: {{ $serviceName }} {{- end }} spec: - {{- if (and ($.Values.ingress.className) (eq $.Values.ingress.className "alb")) }} - type: "NodePort" - {{- else if (and ($.Values.ingress.className) (eq $.Values.ingress.className "nginx")) }} + {{- if (and ($.Values.ingress.className) (eq $.Values.ingress.className "nginx")) }} type: "ClusterIP" {{- else }} type: "NodePort" diff --git a/helm-chart/eoapi/test-helm-values.yaml b/helm-chart/eoapi/test-helm-values.yaml index 71ee356e..0f617fe6 100644 --- a/helm-chart/eoapi/test-helm-values.yaml +++ b/helm-chart/eoapi/test-helm-values.yaml @@ -1,7 +1,7 @@ # this file is used with `helm-tests` job in CI -providerContext: "aws" ingress: + className: "nginx" enabled: true db: diff --git a/helm-chart/eoapi/test-unittest-values.yaml b/helm-chart/eoapi/test-unittest-values.yaml index 75e202b8..4bc9ee1c 100644 --- a/helm-chart/eoapi/test-unittest-values.yaml +++ b/helm-chart/eoapi/test-unittest-values.yaml @@ -1,4 +1,4 @@ -# used in GH Actions `.github/workflows/helm-tests.yml.jobs.unit-tests` +# used in GH Actions `.github/workflows/helm-tests.yml.jobs.integration-tests` testing: true ingress: enabled: true diff --git a/helm-chart/eoapi/tests/hpa_tests.yaml b/helm-chart/eoapi/tests/hpa_tests.yaml index 1f0ca6d1..3d8b0524 100644 --- a/helm-chart/eoapi/tests/hpa_tests.yaml +++ b/helm-chart/eoapi/tests/hpa_tests.yaml @@ -7,7 +7,7 @@ tests: raster.enabled: false stac.enabled: false vector.enabled: true - ingress.className: "gce" + ingress.className: "testing123" vector.autoscaling.enabled: true asserts: - failedTemplate: diff --git a/helm-chart/eoapi/tests/ingress_tests_alb.yaml b/helm-chart/eoapi/tests/ingress_tests_alb.yaml deleted file mode 100644 index 7b582d50..00000000 --- a/helm-chart/eoapi/tests/ingress_tests_alb.yaml +++ /dev/null @@ -1,64 +0,0 @@ -suite: service defaults ingress -templates: - - templates/services/ingress-alb.yaml -tests: - - it: "vector ingress defaults" - set: - ingress.className: "alb" - raster.enabled: false - stac.enabled: false - vector.enabled: true - asserts: - - isKind: - of: Ingress - - matchRegex: - path: metadata.name - pattern: ^vector$ - - equal: - path: metadata.annotations - value: - alb.ingress.kubernetes.io/scheme: internet-facing - alb.ingress.kubernetes.io/target-type: instance - - equal: - path: spec.ingressClassName - value: "alb" - - it: "raster ingress defaults" - set: - ingress.className: "alb" - raster.enabled: true - stac.enabled: false - vector.enabled: false - asserts: - - isKind: - of: Ingress - - matchRegex: - path: metadata.name - pattern: ^raster$ - - equal: - path: metadata.annotations - value: - alb.ingress.kubernetes.io/scheme: internet-facing - alb.ingress.kubernetes.io/target-type: instance - - equal: - path: spec.ingressClassName - value: "alb" - - it: "stac ingress defaults" - set: - ingress.className: "alb" - raster.enabled: false - stac.enabled: true - vector.enabled: false - asserts: - - isKind: - of: Ingress - - matchRegex: - path: metadata.name - pattern: ^stac$ - - equal: - path: metadata.annotations - value: - alb.ingress.kubernetes.io/scheme: internet-facing - alb.ingress.kubernetes.io/target-type: instance - - equal: - path: spec.ingressClassName - value: "alb" diff --git a/helm-chart/eoapi/values.schema.json b/helm-chart/eoapi/values.schema.json index 428c716f..221596bd 100644 --- a/helm-chart/eoapi/values.schema.json +++ b/helm-chart/eoapi/values.schema.json @@ -75,7 +75,7 @@ "properties": { "className": { "type": "string", - "pattern": "^(alb|nginx|gce|testing123)$" + "pattern": "^(nginx|testing123)$" } } }, diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 14acea55..eb46a2b8 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -78,9 +78,7 @@ service: port: 8080 ingress: - # `ingress.className`: "alb" || "gce" || "nginx" - # `"alb || gce"` will create a `kind:Service` with `spec.port:'NodePort'` and ALBs for each service - # `"nginx"` will create a `kind:Service` with a `spec.port:ClusterIP` and a single NLB and path rewrites for /vector, /stac, /raster + # `"nginx"` will create a `kind:Service` with a `spec.port:ClusterIP` and a single (A||N)LB and path rewrites for /vector, /stac, /raster enabled: true className: "nginx" host: ""