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

Envoy Proxy deployment is not cleaned up when we customize the deployment name, replicas using EnvoyProxy resource #4380

Open
tejaboppana opened this issue Oct 1, 2024 · 3 comments
Assignees
Labels
area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet. kind/bug Something isn't working
Milestone

Comments

@tejaboppana
Copy link

tejaboppana commented Oct 1, 2024

Description:
Envoy Proxy deployment is not cleaned up when we customize the deployment name, replicas etc using EnvoyProxy resource,

Repro steps:

  1. Create a Gateway and use a EnvoyProxy to set a custom name and increase the replicas.
  2. I tried deleting the Gateway and expected the envoy gateway to delete the envoy proxy deployment and service, but it did not. '
  3. Next I created another Gateway with an EnvoyProxy resource. Then I deleted the EnvoyProxy, envoy gateway created a single replica deployment with the a default name but did not delete the older deployment.
  4. Now when I deleted the Gateway , the new deployment with default name and the service were deleted but the older deployment with custom name still exists.

Environment:
Envoy Gateway version - 1.1.2

Logs:
I could not see any logs in Envoy Gateway pods when I deleted the Gateway.

@tejaboppana tejaboppana changed the title Envoy Proxy deployment is not cleaned up when we customize the deployment name, replicas etc using EnvoyProxy resource, Envoy Proxy deployment is not cleaned up when we customize the deployment name, replicas etc using EnvoyProxy resource Oct 1, 2024
@tejaboppana tejaboppana changed the title Envoy Proxy deployment is not cleaned up when we customize the deployment name, replicas etc using EnvoyProxy resource Envoy Proxy deployment is not cleaned up when we customize the deployment name, replicas using EnvoyProxy resource Oct 1, 2024
@arkodg
Copy link
Contributor

arkodg commented Oct 1, 2024

@tejaboppana thanks for flagging this
in step 1, did you create the Gateway resource first (a.) and then create a EnvoyProxy specifying the custom deployment name (b.) and then link the EnvoyProxy resource to the Gateway by editing it (c.) ?

For this case the I think the infra layer will create a new deployment with the new name but not delete the older deployment
When a custom name is set, we also need to delete the older deployment

@arkodg arkodg added kind/bug Something isn't working 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 Oct 1, 2024
@arkodg arkodg added this to the v1.2.0-rc1 milestone Oct 1, 2024
@tejaboppana
Copy link
Author

@arkodg I tried 2 things and below are my observations

  1. Steps that you mentioned i.e a) Create Gateway b) Create EnvoyProxy c) Edit Gateway to link it with EnvoyProxy
    In this case a new deployment is created but the older deployment is not deleted which is not ideal. In addition to that, when I delete the Gateway and EnvoyProxy, I expected everything to be cleaned up. Only the older deployment and the service are deleted but the deployment with custom name is not deleted.

  2. a) Create EnvoyProxy b) Create Gateway and link it to the EnvoyProxy
    In this case the deployment is created with the custom name that I specified which is expected. But when I delete the Gateway and EnvoyProxy resources I expected the deployment and service to be deleted. However, this did not happen and both the deployment and service were still running. I had to manually delete them.

@arkodg
Copy link
Contributor

arkodg commented Oct 8, 2024

thanks, yeah an additional item here to delete based on gateway owning labels, and not just deployment to svc name

func (i *Infra) deleteDeployment(ctx context.Context, r ResourceRender) (err error) {

@zirain zirain removed the help wanted Extra attention is needed label Oct 12, 2024
@zirain zirain self-assigned this Oct 12, 2024
@arkodg arkodg modified the milestones: v1.2.0-rc1, v1.2.0 Oct 15, 2024
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. kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants