Skip to content

Add support for Gateway API within Cilium #17358

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 1 commit into from
Apr 30, 2025

Conversation

jValdron
Copy link
Contributor

@jValdron jValdron commented Apr 16, 2025

I'm looking to add support for gateway API, mostly for Cilium, but there's no way to manage Cilium myself in kOps (AFAIK).

As @hakman mentioned below, it sounds like we're not quite ready to bundle the Gateway API CRDs with kOps yet, so this will require the CRDs to be deployed either manually or through a custom addon. This isn't that big of an issue, even if you enable gateway API in Cilium without them, as it will simply complain that the CRDs can't be found but keep going.

I've added a flag to Cilium to enable Gateway API support (configures it through a change in the config map and adds RBAC):

spec:
  networking:
    cilium:
      gatewayAPI:
        enabled: true

I have tested the new feature using https://kops.sigs.k8s.io/contributing/adding_a_feature/#testing

Cilium status seems to be good after enabling the gateway API under networking and Cilium:

❯ cilium --context $CLUSTER status
    /¯¯\
 /¯¯\__/¯¯\    Cilium:             OK
 \__/¯¯\__/    Operator:           OK
 /¯¯\__/¯¯\    Envoy DaemonSet:    disabled (using embedded mode)
 \__/¯¯\__/    Hubble Relay:       disabled
    \__/       ClusterMesh:        disabled

DaemonSet              cilium             Desired: 2, Ready: 2/2, Available: 2/2
Deployment             cilium-operator    Desired: 1, Ready: 1/1, Available: 1/1
Containers:            cilium             Running: 2
                       cilium-operator    Running: 1
Cluster Pods:          5/5 managed by Cilium
Helm chart version:    
Image versions         cilium             quay.io/cilium/cilium:v1.16.7@sha256:294d2432507fed393b26e9fbfacb25c2e37095578cb34dabac7312b66ed0782e: 2
                       cilium-operator    quay.io/cilium/operator:v1.16.7@sha256:bac2496ba4348267ca5f16c2dd73ba7be76330cdd0eef0a6958c260a3bf5951d: 1

The expected RBAC is created and the config map is updated with enable-gateway-api as expected.

Copy link

linux-foundation-easycla bot commented Apr 16, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jValdron / name: Jason Valdron (eef68ba)

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 16, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @jValdron. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/addons labels Apr 16, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Apr 16, 2025
@hakman
Copy link
Member

hakman commented Apr 16, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 16, 2025
@hakman
Copy link
Member

hakman commented Apr 17, 2025

/retest

@jValdron
Copy link
Contributor Author

Looks like a retest fixed pull-kops-e2e-aws-upgrade-k130-ko130-to-klatest-kolatest-many-addons, but seems like the e2e tests around Cilium are failing.

I'll try to run them locally to see what happens.

@hakman
Copy link
Member

hakman commented Apr 17, 2025

"Pod scheduling timeout." is a known issue with the test infra, no worries.
/retest

@hakman
Copy link
Member

hakman commented Apr 23, 2025

@jValdron Instead of spec.networking.gatewayAPIEnabled: true, could you use custom addons. We had a chat about this in our last community meeting and the maintainers are not yet ready to add the Gateway API manifest as a dependency.

@hakman hakman changed the title Add support for gateway API CRDs along with support for Cilium Add support for Gateway API CRDs along with support for Cilium Apr 23, 2025
@jValdron
Copy link
Contributor Author

@jValdron Instead of spec.networking.gatewayAPIEnabled: true, could you use custom addons. We had a chat about this in our last community meeting and the maintainers are not yet ready to add the Gateway API manifest as a dependency.

So you're suggesting we keep the flag in Cilium (simply to enable the flag in the config map) but that we require a custom addon to utilize it? I can look into that.

@hakman
Copy link
Member

hakman commented Apr 23, 2025

@jValdron Instead of spec.networking.gatewayAPIEnabled: true, could you use custom addons. We had a chat about this in our last community meeting and the maintainers are not yet ready to add the Gateway API manifest as a dependency.

So you're suggesting we keep the flag in Cilium (simply to enable the flag in the config map) but that we require a custom addon to utilize it? I can look into that.

Sounds good, thanks!

@jValdron
Copy link
Contributor Author

I still have to test the changes on an actual cluster, will try and get that done next week.

@hakman
Copy link
Member

hakman commented Apr 25, 2025

I think you have a few docs files that should not be touched and upup/models/cloudup/resources/addons/gateway.networking.k8s.io/k8s-1.32.yaml.template that should be removed.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2025
@jValdron
Copy link
Contributor Author

jValdron commented Apr 25, 2025

I think you have a few docs files that should not be touched and upup/models/cloudup/resources/addons/gateway.networking.k8s.io/k8s-1.32.yaml.template that should be removed.

Docs update are definitely unexpected. Rebasing off the latest master made things much worse :/

Edit: I see what happened, my origin wasn't set proper.

Edit 2: Should be all fixed up.

@hakman hakman removed area/provider/openstack Issues or PRs related to openstack provider area/channels area/kops-controller area/provider/spotinst Issues or PRs related to spotinst provider area/provider/hetzner Issues or PRs related to Hetzner provider area/provider/scaleway Issues or PRs related to Scaleway provider labels Apr 25, 2025
@hakman
Copy link
Member

hakman commented Apr 25, 2025

/retest

@kubernetes kubernetes deleted a comment from k8s-ci-robot Apr 25, 2025
@hakman
Copy link
Member

hakman commented Apr 25, 2025

/retest

@hakman
Copy link
Member

hakman commented Apr 26, 2025

/test pull-kops-e2e-cni-cilium-eni

@hakman
Copy link
Member

hakman commented Apr 27, 2025

@jValdron please update the PR description.
/lgtm
/hold for squashing the commits

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Apr 27, 2025
@jValdron jValdron changed the title Add support for Gateway API CRDs along with support for Cilium Add support for Gateway API within Cilium Apr 30, 2025
Squashed commit of the following:
Update documentation and CRDs
Update pkg/model/components/cilium.go
Remove gateway API managed addon
Update CRDs
Fix RBAC and update docs
Fix up files that shouldn't of been touched
Remove namespace from cluster RBAC resources
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 30, 2025
@jValdron
Copy link
Contributor Author

Alright, PR title/description updated and squashed the commits into a single commit. Thanks for all the reviews, etc :)

@hakman
Copy link
Member

hakman commented Apr 30, 2025

/hold cancel
/lgtm
/approve
/retest

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Apr 30, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2025
@hakman
Copy link
Member

hakman commented Apr 30, 2025

Alright, PR title/description updated and squashed the commits into a single commit. Thanks for all the reviews, etc :)

Awesome, thanks @jValdron!

@jValdron
Copy link
Contributor Author

/retest

1 similar comment
@hakman
Copy link
Member

hakman commented Apr 30, 2025

/retest

@k8s-ci-robot k8s-ci-robot merged commit 3fde56b into kubernetes:master Apr 30, 2025
32 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.32 milestone Apr 30, 2025
k8s-ci-robot added a commit that referenced this pull request May 1, 2025
…-upstream-release-1.32

Automated cherry pick of #17358: Add support for Gateway API within Cilium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/addons area/api area/documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants