From 5e3fc726f5809817de350d3910d8e2942d40bf3a Mon Sep 17 00:00:00 2001 From: DebjotiMallick Date: Thu, 22 Jan 2026 15:52:00 +0530 Subject: [PATCH] feat: add ingress parameter in helm chart --- charts/karpor/templates/ingress.yaml | 44 ++++++++++++++++++++++++++++ charts/karpor/values.yaml | 24 +++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 charts/karpor/templates/ingress.yaml diff --git a/charts/karpor/templates/ingress.yaml b/charts/karpor/templates/ingress.yaml new file mode 100644 index 0000000..2096e79 --- /dev/null +++ b/charts/karpor/templates/ingress.yaml @@ -0,0 +1,44 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: karpor-ingress + namespace: {{ .Values.namespace }} + labels: + {{- include "karpor.labels" (dict "context" . "component" "karpor-ingress") | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: karpor-server + port: + number: {{ $.Values.server.port }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/karpor/values.yaml b/charts/karpor/values.yaml index 16fc325..7a87e66 100644 --- a/charts/karpor/values.yaml +++ b/charts/karpor/values.yaml @@ -165,3 +165,27 @@ job: repo: kusionstack/karpor # -- Tag for Karpor image. Defaults to the chart's appVersion if not specified. tag: "" + +# Ingress configuration +ingress: + # -- Enable ingress for Karpor server. + enabled: true + # -- Ingress class name. + className: "nginx" + # -- Annotations to be added to the ingress resource. + annotations: + nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + nginx.ingress.kubernetes.io/proxy-ssl-verify: "off" + # -- TLS configuration for the ingress resource. + tls: [] + # Example: + # tls: + # - hosts: + # - karpor.example.com + # secretName: karpor-tls + # -- Hosts configuration for the ingress resource. + hosts: + - host: karpor.example.com + paths: + - path: / + pathType: Prefix \ No newline at end of file