Skip to content
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

Set ownerReference on gateway Deployment #3051

Open
JuniorJPDJ opened this issue Mar 28, 2024 · 9 comments
Open

Set ownerReference on gateway Deployment #3051

JuniorJPDJ opened this issue Mar 28, 2024 · 9 comments
Labels
area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet. help wanted Extra attention is needed
Milestone

Comments

@JuniorJPDJ
Copy link
Contributor

Description:
Would be cool to see Deployment created for Gateway to have ownerReference for Gateway.
This allows following chain and for example makes ArgoCD show the deployment where Gateway is created in ArgoCD application.

@arkodg
Copy link
Contributor

arkodg commented Mar 28, 2024

Makes sense, similar to #1706

  • we'll need to add something similar where the Deployment, Service, ConfigMap gets linked to the Gateway, or the GatewayClass in case MergeGateways is enabled

@arkodg arkodg added help wanted Extra attention is needed area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet. and removed triage labels Mar 28, 2024
@cnvergence
Copy link
Member

+1

@arkodg
Copy link
Contributor

arkodg commented Mar 28, 2024

rethinking, this work may be a little bit more involved, we lose exact info of the Kind and Namespace & Name when converting from gateway-api to IR, so this will cost some extra memory

type ProxyInfra struct {

@zirain
Copy link
Member

zirain commented Mar 28, 2024

same to service? and what about mergedGateway?

@cnvergence
Copy link
Member

cnvergence commented Mar 28, 2024

merged gateways should ref the GatewayClass

@arkodg
Copy link
Contributor

arkodg commented Nov 19, 2024

not the prettiest and slightly fragile, but the easiest solution is to update the ownerReference based on the owning labels created

func GatewayOwnerLabels(namespace, name string) map[string]string {

@arkodg
Copy link
Contributor

arkodg commented Jan 14, 2025

this cannot be implemented with the default deployment configuration because ownerReferences dont have cross namespace support, the Gateway exists in a user namespace and the generated resources are deployed in the envoy-gateway-system by default

@arkodg
Copy link
Contributor

arkodg commented Jan 14, 2025

this can only work for the mergeGateways case where the owner is a cluster scoped resource like GatewayClass

@arkodg arkodg modified the milestones: v1.3.0-rc.1, Backlog Jan 15, 2025
@sadovnikov
Copy link
Contributor

not the prettiest and slightly fragile, but the easiest solution is to update the ownerReference based on the owning labels created

@arkodg, I tried adding the metadata.ownerReferences manually. Argo CD picks up and shows the Deployment and the Service. However, the labels are not enough because uid of the owner is a required attribute

A copy of your changes has been stored to "/tmp/kubectl-edit-559773258.yaml"
error: map: map[apiVersion:gateway.networking.k8s.io/v1 blockOwnerDeletion:false kind:Gateway name:default] does not contain declared merge key: uid

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants