Skip to content

[Update] Nginx-Traefik compatibility #55

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

Merged
merged 5 commits into from
Jun 27, 2025
Merged

Conversation

slancerk
Copy link
Collaborator

@slancerk slancerk commented Jun 9, 2025

Below are the updates been made for single redis pod and nginx-traefik compatibility.

  1. Added architecture: standalone line in values.yaml.
redis:
  enabled: false
  architecture: standalone # Use in case multiple tooljet pods running
  fullnameOverride: redis
  auth:
    enabled: true
    password: "tooljet"
  master:
    service:
      port: 6379
  1. Updated values.yaml, Compatible with both Traefik or Nginx.
ingress:
  enabled: true
  ingressClassName: traefik # comment this line in case using nginx
  type: traefik   # use 'nginx' in case using nginx
  hostname: tooljet.localhost
  annotations:
    traefik.ingress.kubernetes.io/router.entrypoints: websecure   # use in case using traefik
    # nginx.ingress.kubernetes.io/rewrite-target: /    # use in case using nginx
  1. Updated _helpers.tpl, added checks for ingressClassName from values.yaml.
{{/*
Returns the correct ingress class name based on selected controller.
*/}}
{{- define "tooljet.ingressClassName" -}}
{{- if .Values.ingress.ingressClassName }}
{{ .Values.ingress.ingressClassName }}
{{- else if eq .Values.ingress.type "nginx" }}
nginx
{{- else if eq .Values.ingress.type "traefik" }}
traefik
{{- else }}
nginx
{{- end }}
{{- end }}

  1. Added nginx-ingress.yaml and traefik-ingress.yaml files.

@slancerk slancerk requested review from adishM98 and Copilot June 9, 2025 16:17
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances Helm chart flexibility by introducing standalone Redis architecture support and enabling customizable Ingress configurations for both Traefik and NGINX.

  • Add architecture: standalone under Redis values for single-pod scenarios
  • Expose ingressClassName and type in values.yaml and supply separate Traefik/NGINX Ingress templates
  • Remove the generic ingress template, add a helper for ingressClassName, and default the Secret name

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
charts/tooljet/values.yaml Added architecture: standalone for Redis and new ingress keys
charts/tooljet/templates/traefik-ingress.yaml New Ingress resource for Traefik-based routing
charts/tooljet/templates/nginx-ingress.yaml New Ingress resource for NGINX-based routing
charts/tooljet/templates/ingress.yml Removed generic Ingress template
charts/tooljet/templates/secret.yaml Default fallback for Secret name
charts/tooljet/templates/_helpers.tpl Helper function tooljet.ingressClassName
Comments suppressed due to low confidence (4)

charts/tooljet/templates/traefik-ingress.yaml:11

  • Rather than hardcoding traefik, use the shared helper ({{ include "tooljet.ingressClassName" . }}) to respect any overrides in values.yaml and keep configuration consistent.
  ingressClassName: traefik

charts/tooljet/templates/nginx-ingress.yaml:11

  • Rather than hardcoding nginx, leverage {{ include "tooljet.ingressClassName" . }} to ensure the ingress class remains in sync with the values file.
  ingressClassName: nginx

charts/tooljet/values.yaml:122

  • The default tls: [] entry was removed from values.yaml. If TLS was previously enabled or expected, reintroduce an empty tls list or document its removal to prevent unintentional disabling of TLS.
-  tls: []

charts/tooljet/templates/_helpers.tpl:129

  • Add unit tests for the tooljet.ingressClassName helper to cover all branches (explicit ingressClassName, nginx, traefik, fallback) and prevent regressions.
{{- define "tooljet.ingressClassName" -}}

@ToolJet ToolJet deleted a comment from Copilot AI Jun 18, 2025
@slancerk
Copy link
Collaborator Author

slancerk commented Jun 25, 2025

Updated ingress:

ingress:
  enabled: false
  type: nginx   # traefik

  traefik:
    hostname: tooljet.localhost
    ingressClassName: traefik
    tls: []
    annotations:
      traefik.ingress.kubernetes.io/router.entrypoints: web,websecure

  nginx:
    hostname: tooljet.localhost
    ingressClassName: nginx
    tls: []
    annotations:
      nginx.ingress.kubernetes.io/rewrite-target: /

Also removed duplicates from pgrst-deployment.yaml:

- name: PGRST_DB_PRE_CONFIG
  value: postgrest.pre_config

@adishM98 adishM98 merged commit b80a091 into main Jun 27, 2025
@adishM98 adishM98 deleted the feature/nginx-traefik-added branch June 27, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants