Skip to content

feat(karpor): add optional Ingress for the karpor server - #132

Merged
elliotxx merged 1 commit into
KusionStack:masterfrom
Iamrushabhshahh:feat/karpor-ingress
Oct 15, 2026
Merged

elliotxx merged 1 commit into
KusionStack:masterfrom
Iamrushabhshahh:feat/karpor-ingress

Conversation

@Iamrushabhshahh

Copy link
Copy Markdown
Contributor

Closes KusionStack/karpor#808 (the issue lives in the karpor repo; this is the chart side)

This adds an optional Ingress for the karpor server to the Helm chart, so users can expose Karpor with --set ingress.enabled=true instead of writing their own Ingress.

It builds on @debjotimallick's earlier attempt in #128, with two differences:

  • The Ingress is disabled by default, so existing installs don't change on upgrade.
  • No controller-specific annotations are set by default. The README shows the one ingress-nginx needs instead.

What changed

  • templates/ingress.yml: a networking.k8s.io/v1 Ingress named karpor-server. It routes each configured host and path to the karpor-server service on server.port. className, annotations, tls and host are optional.
  • values.yaml: a new ingress section with enabled: false, className: "", annotations: {}, an example host and tls: [].
  • README.md.gotmpl / README.md: a new Ingress section with an install example and the values table. I regenerated the README with helm-docs, and moved ingress.* out of the General table.
  • Chart.yaml: chart version 0.7.6 → 0.7.7.

Why the backend annotation matters

The karpor server only listens on HTTPS (7443). I tested without the annotation, and ingress-nginx talks plain HTTP to the backend. Karpor then replies 400 Client sent an HTTP request to an HTTPS server. With nginx.ingress.kubernetes.io/backend-protocol: HTTPS, it works. I documented this rather than setting it by default, because other controllers (Traefik, HAProxy, Gateway) use different annotations.

How I tested it

These checks were on a kind cluster (v1.32), with ingress-nginx controller v1.12.1:

  • helm template with defaults renders no Ingress. With ingress.enabled=true it renders a valid Ingress, including with tls set and with an empty host.
  • helm lint passes, and yamllint passes with .github/configs/lintconf.yaml.
  • helm install with ingress.enabled=true, className=nginx and the backend-protocol annotation:
    • GET / with Host: karpor.example.com → 200, <title>Karpor - Intelligence for Kubernetes</title>
    • GET /rest-api/v1/clusters → 200
    • wrong host → 404
  • The same install without the annotation → 400, as described above.

Exposing the server over plain HTTP for Istio or gateway setups was also asked about in the issue. I left it out, because it needs a change in the server itself.

@elliotxx, could you review this when you have time? You opened #808 and look after the Karpor chart.

Add an ingress section to values.yaml and an Ingress template that
routes to the karpor-server service. It is disabled by default, so
existing installs are unchanged.

The server only serves HTTPS on server.port, so the README shows the
ingress-nginx backend-protocol annotation needed to reach it. Bump the
chart version to 0.7.7.

Ref: KusionStack/karpor#808

Co-authored-by: Iamrushabhshahh <rushabhshah842@gmail.com>
Signed-off-by: Iamrushabhshahh <rushabhshah842@gmail.com>

@elliotxx elliotxx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice and clean, thanks! Default-off keeps upgrades safe. Maybe add a note that it needs Kubernetes 1.19+ (networking.k8s.io/v1). Otherwise LGTM.

@elliotxx
elliotxx merged commit 012dade into KusionStack:master Oct 15, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation: Add Helm Parameter for Ingress

2 participants