Skip to content

feature(helm): add gateway api support#903

Open
rkferreira wants to merge 6 commits into
percona:mainfrom
rkferreira:feature/bring-gateway-api-support
Open

feature(helm): add gateway api support#903
rkferreira wants to merge 6 commits into
percona:mainfrom
rkferreira:feature/bring-gateway-api-support

Conversation

@rkferreira

Copy link
Copy Markdown

This pull request adds Gateway API support to both the pmm and pmm-ha Helm charts, allowing configuration of HTTPRoute resources for advanced ingress and gRPC routing via the Gateway API. It introduces new templates and values to enable, configure, and map HTTP and gRPC paths, and ensures that services are exposed correctly when either Ingress or Gateway API is enabled. Additionally, both charts receive a patch version bump.

Gateway API integration:

  • Added gateway-httproute.yaml template to both charts/pmm/templates/ and charts/pmm-ha/templates/ for generating HTTPRoute resources when Gateway API is enabled. This template supports custom host/path routing and gRPC path handling. [1] [2]
  • Introduced a new gateway section in both charts/pmm/values.yaml and charts/pmm-ha/values.yaml for configuring Gateway API options such as enabling/disabling, annotations, parentRefs, hosts, paths, and pathType. [1] [2]

Service exposure logic:

  • Updated service.yaml in both charts to expose the ClusterIP service when either Ingress or Gateway API is enabled, ensuring correct routing for both HTTP and gRPC traffic. [1] [2]

Version bumps:

  • Bumped charts/pmm/Chart.yaml version from 1.8.1 to 1.8.2.
  • Bumped charts/pmm-ha/Chart.yaml version from 1.5.1 to 1.5.2.

Fixes #902

Signed-off-by: Rodrigo Kellermann <kellermann@gmail.com>
Copilot AI review requested due to automatic review settings July 13, 2026 20:31
@rkferreira
rkferreira requested a review from a team as a code owner July 13, 2026 20:31
@rkferreira
rkferreira requested review from 4nte and ademidoff and removed request for a team July 13, 2026 20:31
@rkferreira

Copy link
Copy Markdown
Author

Sample values config for pmm chart:

  ingress:
    enabled: false
    nginxInc: false

  gateway:
    enabled: true
    annotations: {}
    parentRefs:
      - name: main-gateway
        namespace: gateway-system
        sectionName: https
    hosts:
      - host: pmm.mydomain.com
        paths:
          - /
    pathType: PathPrefix
$ kubectl get httproute pmm -n pmm -o yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
(...)
  labels:
    app.kubernetes.io/component: pmm-server
    app.kubernetes.io/instance: pmm
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: pmm
    app.kubernetes.io/part-of: percona-platform
    app.kubernetes.io/version: 3.8.1
    argocd.argoproj.io/instance: xxx
    helm.sh/chart: pmm-1.8.2-SNAPSHOT.202607131947.5677.1
  name: pmm
  namespace: pmm
spec:
  hostnames:
  - pmm.mydomain.com
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: main-gateway
    namespace: gateway-system
    sectionName: https
  rules:
  - backendRefs:
    - group: ""
      kind: Service
      name: monitoring-service
      port: 80
      weight: 1
    matches:
    - path:
        type: PathPrefix
        value: /
  - backendRefs:
    - group: ""
      kind: Service
      name: monitoring-service-grpc
      port: 443
      weight: 1
    matches:
    - path:
        type: PathPrefix
        value: /agent.
  - backendRefs:
    - group: ""
      kind: Service
      name: monitoring-service-grpc
      port: 443
      weight: 1
    matches:
    - path:
        type: PathPrefix
        value: /inventory.
  - backendRefs:
    - group: ""
      kind: Service
      name: monitoring-service-grpc
      port: 443
      weight: 1
    matches:
    - path:
        type: PathPrefix
        value: /management.
  - backendRefs:
    - group: ""
      kind: Service
      name: monitoring-service-grpc
      port: 443
      weight: 1
    matches:
    - path:
        type: PathPrefix
        value: /server.
status:
  parents:
  - conditions:
    - lastTransitionTime: "2026-07-13T19:58:39Z"
      message: ""
      observedGeneration: 1
      reason: Accepted
      status: "True"
      type: Accepted
    - lastTransitionTime: "2026-07-13T19:58:39Z"
      message: ""
      observedGeneration: 1
      reason: ResolvedRefs
      status: "True"
      type: ResolvedRefs
    controllerName: traefik.io/gateway-controller
    parentRef:
      group: gateway.networking.k8s.io
      kind: Gateway
      name: main-gateway
      namespace: gateway-system
      sectionName: https

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Gateway API (HTTPRoute) support to the pmm and pmm-ha Helm charts to enable advanced HTTP and gRPC routing via Gateway API, alongside existing Ingress support.

Changes:

  • Introduces new gateway-httproute.yaml templates to render HTTPRoute resources when gateway.enabled is set.
  • Adds a new gateway values section in both charts to configure parentRefs, hosts/path mappings, annotations, and pathType.
  • Updates service rendering logic to create the additional backend service when either Ingress or Gateway API is enabled, and bumps chart patch versions.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
charts/pmm/values.yaml Adds gateway configuration values for HTTPRoute generation.
charts/pmm/templates/service.yaml Extends conditional service exposure to also trigger for Gateway API.
charts/pmm/templates/gateway-httproute.yaml New HTTPRoute template for Gateway API routing (HTTP + gRPC path mapping).
charts/pmm/Chart.yaml Patch version bump (1.8.1 → 1.8.2).
charts/pmm-ha/values.yaml Adds gateway configuration values for HTTPRoute generation.
charts/pmm-ha/templates/service.yaml Extends conditional service exposure to also trigger for Gateway API.
charts/pmm-ha/templates/gateway-httproute.yaml New HTTPRoute template for Gateway API routing (HTTP + gRPC path mapping).
charts/pmm-ha/Chart.yaml Patch version bump (1.5.1 → 1.5.2).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread charts/pmm-ha/templates/gateway-httproute.yaml Outdated
Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
Comment thread charts/pmm/templates/gateway-httproute.yaml
Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 13, 2026 21:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
Comment thread charts/pmm/templates/gateway-httproute.yaml Outdated
Comment thread charts/pmm-ha/templates/gateway-httproute.yaml Outdated
Comment thread charts/pmm-ha/templates/service.yaml Outdated
Signed-off-by: Rodrigo Kellermann <kellermann@gmail.com>
Copilot AI review requested due to automatic review settings July 13, 2026 21:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

charts/pmm-ha/templates/service.yaml:31

  • The condition was expanded to include Gateway API, but the comment block below still refers only to ingress (and also implies this service is used for both HTTP and gRPC). Update the comments so they accurately reflect when/why this Service is created.
{{- if or .Values.ingress.enabled .Values.gateway.enabled }}
---
# Regular ClusterIP service for ingress routing
# Note: Both HTTP and gRPC traffic use this service when ingress is enabled
apiVersion: v1

Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
Comment thread charts/pmm/templates/gateway-httproute.yaml Outdated
Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
@egegunes egegunes added the pmm label Jul 14, 2026
@rkferreira

Copy link
Copy Markdown
Author

I have to double check all the copilot comments...

Copilot AI review requested due to automatic review settings July 14, 2026 20:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Comment thread charts/pmm/templates/gateway-httproute.yaml
Comment thread charts/pmm/templates/gateway-httproute.yaml Outdated
Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
Signed-off-by: Rodrigo Kellermann <kellermann@gmail.com>
Copilot AI review requested due to automatic review settings July 17, 2026 21:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread charts/pmm/values.yaml
Comment thread charts/pmm-ha/values.yaml
Copilot AI review requested due to automatic review settings July 17, 2026 21:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread charts/pmm/templates/gateway-httproute.yaml
Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
Comment thread charts/pmm/README.md Outdated
Comment thread charts/pmm-ha/README.md Outdated
Signed-off-by: Rodrigo Kellermann <kellermann@gmail.com>
Copilot AI review requested due to automatic review settings July 17, 2026 21:38
@rkferreira
rkferreira force-pushed the feature/bring-gateway-api-support branch from 2bf4ad8 to 1138bb8 Compare July 17, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread charts/pmm/templates/service.yaml
Comment thread charts/pmm/templates/gateway-httproute.yaml
Comment thread charts/pmm-ha/templates/gateway-httproute.yaml
Comment thread charts/pmm-ha/templates/service.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

helm: Missing support for gateway api

3 participants