Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[krakend] Nginx additional configuration #424

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions charts/krakend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: krakend
description: FRINX KrakenD API Gateway for FRINX-machine
icon: https://avatars.githubusercontent.com/u/23452093?s=200&v=4
type: application
version: 5.0.1
appVersion: "6.1.1"
version: 5.0.2
appVersion: "7.0.0"
dependencies:
- condition: nginx.enabled
name: nginx
Expand All @@ -17,12 +17,27 @@ maintainers:
annotations:
artifacthub.io/images: |
- name: krakend
image: frinx/krakend:6.1.1
image: frinx/krakend:7.0.0
- name: nginx
image: nginx:1.27-alpine
artifacthub.io/changes: |
- kind: fixed
description: Change Nginx default service type to ClusterIP
links:
- name: GitHub PR
url: https://github.com/FRINXio/helm-charts/pull/424
- kind: fixed
description: Added internal endpoint to nginx config for metrics collection
links:
- name: GitHub PR
url: https://github.com/FRINXio/helm-charts/pull/424
- kind: changed
description: Disabled TLS setting for nginx by default
links:
- name: GitHub PR
url: https://github.com/FRINXio/helm-charts/pull/424
- kind: changed
description: Monitoring to metrics configuration
description: Increase app version to 7.0.0. (still backward compatible with v6)
links:
- name: GitHub PR
url: https://github.com/FRINXio/helm-charts/pull/418
url: https://github.com/FRINXio/helm-charts/pull/424
6 changes: 4 additions & 2 deletions charts/krakend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FRINX KrakenD API Gateway for FRINX-machine

![Version: 5.0.1](https://img.shields.io/badge/Version-5.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.1.1](https://img.shields.io/badge/AppVersion-6.1.1-informational?style=flat-square)
![Version: 5.0.2](https://img.shields.io/badge/Version-5.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 7.0.0](https://img.shields.io/badge/AppVersion-7.0.0-informational?style=flat-square)

## Get Repo Info

Expand Down Expand Up @@ -63,11 +63,13 @@ helm uninstall [RELEASE_NAME]
| nameOverride | string | `""` | String to partially override app name |
| nginx.enabled | bool | `false` | |
| nginx.existingServerBlockConfigmap | existingServerBlockConfigmap ConfigMap with custom server block to be added to NGINX configuration | `"krakend-nginx-config"` | [https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=existingServerBlockConfigmap] |
| nginx.ingress | object | `{"annotations":{"nginx.ingress.kubernetes.io/force-ssl-redirect":"true","nginx.ingress.kubernetes.io/proxy-connect-timeout":"12h","nginx.ingress.kubernetes.io/proxy-read-timeout":"12h","nginx.ingress.kubernetes.io/proxy-send-timeout":"12h"},"enabled":false}` | Configure the [Nginx Ingress resource](https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=ingress) |
| nginx.ingress | object | `{"annotations":{"nginx.ingress.kubernetes.io/force-ssl-redirect":"true","nginx.ingress.kubernetes.io/proxy-connect-timeout":"12h","nginx.ingress.kubernetes.io/proxy-read-timeout":"12h","nginx.ingress.kubernetes.io/proxy-send-timeout":"12h"},"enabled":false,"ingressClassName":"nginx"}` | Configure the [Nginx Ingress resource](https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=ingress) |
| nginx.rateLimits.dryRun | bool | `false` | [limit_req_dry_run](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_dry_run) |
| nginx.rateLimits.statusCode | int | `429` | [limit_req_status](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_status) |
| nginx.rateLimits.zoneRate | object | `{"api":"100r/s","auth":"20r/s","ws":"10r/s"}` | [limit_req_zone](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_zone) |
| nginx.server | string | `"client_body_buffer_size \"8k\";\nclient_header_buffer_size \"1k\";\nproxy_headers_hash_max_size 2048;\nproxy_headers_hash_bucket_size 128;\nproxy_connect_timeout \"12h\";\nproxy_read_timeout \"12h\";\nproxy_send_timeout \"12h\";\n"` | |
| nginx.service | object | `{"type":"ClusterIP"}` | Configure the [Service Type](https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=service.type) |
| nginx.tls | object | `{"enabled":false}` | Configure the [TLS](https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=tls) |
| nodeSelector | object | `{}` | [Node labels for pod assignment](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/) |
| podAnnotations | object | `{}` | Pod annotations |
| podSecurityContext | object | `{}` | Configure [Pods Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) |
Expand Down
7 changes: 7 additions & 0 deletions charts/krakend/templates/configmap-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ data:
proxy_set_header Host $host;
}

location /status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}

location / {

# RATE LIMIT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion charts/krakend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ metrics:

nginx:
enabled: false

# -- @ignored
fullnameOverride: krakend-nginx
# -- (existingServerBlockConfigmap ConfigMap with custom server block to be added to NGINX configuration)[https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=existingServerBlockConfigmap]
Expand All @@ -329,11 +328,18 @@ nginx:
# -- Configure the [Nginx Ingress resource](https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=ingress)
ingress:
enabled: false
ingressClassName: nginx
annotations:
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "12h"
nginx.ingress.kubernetes.io/proxy-read-timeout: "12h"
nginx.ingress.kubernetes.io/proxy-send-timeout: "12h"
# -- Configure the [TLS](https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=tls)
tls:
enabled: false
# -- Configure the [Service Type](https://artifacthub.io/packages/helm/bitnami/nginx?modal=values&path=service.type)
service:
type: ClusterIP

# -- @ignored
readinessProbe:
Expand Down
Loading