Skip to content

examples: Fix broken egress-policy-gateway example #40112

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
Jul 9, 2025

Conversation

alagoutte
Copy link
Contributor

@alagoutte alagoutte commented Jun 18, 2025

Fix some minor typo and indent

@alagoutte alagoutte requested a review from a team as a code owner June 18, 2025 16:07
@alagoutte alagoutte requested a review from qmonnet June 18, 2025 16:07
@maintainer-s-little-helper
Copy link

Commits 776262d, c4e5af4, 8e4b2a4, ee54a0f do not match "(?m)^Signed-off-by:".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper bot added dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Jun 18, 2025
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Jun 18, 2025
@alagoutte alagoutte force-pushed the doc-egressgateways branch from ee54a0f to 408913f Compare June 18, 2025 16:09
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Jun 18, 2025
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Thanks for this!

I've got some minor comments, please see inline below.

Can you please also slightly shorten your longest commit subjects to make CI happy?:

Error: ERROR:CUSTOM: Please avoid long commit subjects (max: 75, found: 78)

@qmonnet qmonnet added feature/egress-gateway Impacts the egress IP gateway feature. release-note/bug This PR fixes an issue in a previous release of Cilium. area/helm Impacts helm charts and user deployment experience labels Jun 19, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jun 19, 2025
@qmonnet qmonnet requested review from a team and rgo3 and removed request for a team June 19, 2025 09:03
@alagoutte alagoutte force-pushed the doc-egressgateways branch from 408913f to 70ff526 Compare June 19, 2025 16:15
@alagoutte alagoutte requested a review from a team as a code owner June 19, 2025 16:15
@alagoutte alagoutte force-pushed the doc-egressgateways branch 2 times, most recently from 8cb9dbb to a1c742d Compare June 20, 2025 06:13
@aanm aanm requested a review from qmonnet June 25, 2025 08:58
@aanm
Copy link
Member

aanm commented Jun 25, 2025

/test

@aanm aanm enabled auto-merge June 25, 2025 08:58
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Thank you!

@joestringer
Copy link
Member

cc @carlos-abad did you test this example doc as part of your development for #39304 ?

@joestringer
Copy link
Member

There's two transient failures that both exhibit the symptom outlined in #40456 . I filed an issue for it, but I don't think this needs to block the merge.

Thanks for fixing this up. I don't know why a broken example was added into the tree previously, but this fixes the example for me (at least to the point of adding the resource into the kube-apiserver).

main:

$ k apply -f examples/kubernetes-egress-gateway/egress-gateway-policy.yaml
The CiliumEgressGatewayPolicy "egress-sample" is invalid: 
* spec.egressGateway.nodeSelector.matchLabels.egress-node: Invalid value: "boolean": spec.egressGateway.nodeSelector.matchLabels.egress-node in body must be of type string: "boolean"
* spec.egressGateways[0].nodeSelector.matchLabels.egress-node: Invalid value: "boolean": spec.egressGateways[0].nodeSelector.matchLabels.egress-node in body must be of type string: "boolean"
* spec.egressGateways[1].nodeSelector.matchLabels.egress-node-2: Invalid value: "boolean": spec.egressGateways[1].nodeSelector.matchLabels.egress-node-2 in body must be of type string: "boolean"
* spec.egressGateways[2].nodeSelector.matchLabels.egress-node-3: Invalid value: "boolean": spec.egressGateways[2].nodeSelector.matchLabels.egress-node-3 in body must be of type string: "boolean"

This PR:

$ k apply -f examples/kubernetes-egress-gateway/egress-gateway-policy.yaml
-ciliumegressgatewaypolicy.cilium.io/egress-sample created

@joestringer joestringer disabled auto-merge July 9, 2025 23:48
Previously:

$ k apply -f examples/kubernetes-egress-gateway/egress-gateway-policy.yaml
The CiliumEgressGatewayPolicy "egress-sample" is invalid:
* spec.egressGateway.nodeSelector.matchLabels.egress-node:
    Invalid value: "boolean":
        spec.egressGateway.nodeSelector.matchLabels.egress-node in body must be
        of type string: "boolean"
* spec.egressGateways[0].nodeSelector.matchLabels.egress-node:
    Invalid value:
        "boolean": spec.egressGateways[0].nodeSelector.matchLabels.egress-node
        in body must be of type string: "boolean"
* spec.egressGateways[1].nodeSelector.matchLabels.egress-node-2:
    Invalid value: "boolean":
        spec.egressGateways[1].nodeSelector.matchLabels.egress-node-2 in body
        must be of type string: "boolean"
* spec.egressGateways[2].nodeSelector.matchLabels.egress-node-3:
    Invalid value: "boolean":
        spec.egressGateways[2].nodeSelector.matchLabels.egress-node-3 in body
        must be of type string: "boolean"

Fixes: 9b81aed ("pkg/egressgateway: Add documentation for multigateway")

Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Signed-off-by: Joe Stringer <joe@cilium.io>
@joestringer joestringer force-pushed the doc-egressgateways branch from a1c742d to 040b89a Compare July 9, 2025 23:51
@joestringer
Copy link
Member

I squashed the commits together and clarified the impact / fix in the commit message. Merging.

@joestringer joestringer merged commit efae268 into cilium:main Jul 9, 2025
44 checks passed
@joestringer joestringer added release-note/misc This PR makes changes that have no direct user impact. and removed release-note/bug This PR fixes an issue in a previous release of Cilium. labels Jul 9, 2025
@joestringer joestringer changed the title DOC(egress-policy-gateway): fix some typo and indent examples: Fix broken egress-policy-gateway example Jul 9, 2025
@joestringer joestringer added the needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch label Jul 9, 2025
@carlos-abad
Copy link
Contributor

cc @carlos-abad did you test this example doc as part of your development for #39304 ?

Thank Joe and the rest for fixing the issue. It looks like this was a pre-existing issue in the test file. Thank you for catching it.

@nbusseneau nbusseneau mentioned this pull request Jul 18, 2025
23 tasks
@nbusseneau nbusseneau added backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. and removed needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch labels Jul 18, 2025
@github-actions github-actions bot added backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. and removed backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. labels Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Impacts helm charts and user deployment experience backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. feature/egress-gateway Impacts the egress IP gateway feature. kind/community-contribution This was a contribution made by a community member. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants