Skip to content

Commit

Permalink
Fix push endpoint ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
keyvaann committed Jul 31, 2024
1 parent d9aa8af commit ca07d2c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/radar-push-endpoint/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "0.2.2"
description: A Helm chart for RADAR-base Push Endpoint. REST Gateway to Kafka, for incoming data from Push or Subscription based WEB APIs. It performs authentication, authorization and content validation. For more details of the configurations, see https://github.com/RADAR-base/RADAR-PushEndpoint.
name: radar-push-endpoint
version: 0.3.0
version: 0.3.1
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
sources:
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/radar-push-endpoint
Expand Down
5 changes: 3 additions & 2 deletions charts/radar-push-endpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# radar-push-endpoint
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/radar-push-endpoint)](https://artifacthub.io/packages/helm/radar-base/radar-push-endpoint)

![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.2](https://img.shields.io/badge/AppVersion-0.2.2-informational?style=flat-square)
![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.2](https://img.shields.io/badge/AppVersion-0.2.2-informational?style=flat-square)

A Helm chart for RADAR-base Push Endpoint. REST Gateway to Kafka, for incoming data from Push or Subscription based WEB APIs. It performs authentication, authorization and content validation. For more details of the configurations, see https://github.com/RADAR-base/RADAR-PushEndpoint.

Expand Down Expand Up @@ -44,7 +44,8 @@ A Helm chart for RADAR-base Push Endpoint. REST Gateway to Kafka, for incoming d
| disable_tls | bool | `false` | Disable TLS (reconfigures Ingress and sets URLs to use HTTP) |
| ingress.enabled | bool | `true` | Enable ingress controller resource |
| ingress.annotations | object | check values.yaml | Annotations that define default ingress class, certificate issuer and deny access to sensitive URLs |
| ingress.path | string | `"/push-endpoint/?(.*)"` | Path within the url structure |
| ingress.path | string | `"/push-endpoint"` | Path within the url structure |
| ingress.pathType | string | `"ImplementationSpecific"` | Ingress Path type |
| ingress.ingressClassName | string | `"nginx"` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) |
| ingress.hosts | list | `["localhost"]` | Hosts to accept requests from |
| ingress.tls.secretName | string | `"radar-base-tls-radar-push-endpoint"` | Name of the secret that contains TLS certificates |
Expand Down
17 changes: 15 additions & 2 deletions charts/radar-push-endpoint/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
{{- $fullName := include "radar-push-endpoint.fullname" . -}}
{{- $path := .Values.ingress.path -}}
{{- $hosts := .Values.ingress.hosts -}}
{{- $svcPort := .Values.service.port -}}
{{- $pathType := .Values.ingress.pathType -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
Expand All @@ -28,11 +34,18 @@ spec:
http:
paths:
- path: {{ $path | quote }}
pathType: Prefix
{{- if and $pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ $pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
name: http
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
5 changes: 3 additions & 2 deletions charts/radar-push-endpoint/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ ingress:
# @default -- check values.yaml
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/rewrite-target: /push/integrations/$1
nginx.ingress.kubernetes.io/server-snippet: |
location /push-endpoint/garmin {
# set client body size to 20M #
Expand All @@ -67,7 +66,9 @@ ingress:
deny all;
}
# -- Path within the url structure
path: "/push-endpoint/?(.*)"
path: "/push-endpoint"
# -- Ingress Path type
pathType: ImplementationSpecific
# -- IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
ingressClassName: nginx
# -- Hosts to accept requests from
Expand Down

0 comments on commit ca07d2c

Please sign in to comment.