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

Missing owner reference in ingress created for devfile component #2808

Closed
yangcao77 opened this issue Apr 3, 2020 · 10 comments · Fixed by #2841
Closed

Missing owner reference in ingress created for devfile component #2808

yangcao77 opened this issue Apr 3, 2020 · 10 comments · Fixed by #2841
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug.
Projects

Comments

@yangcao77
Copy link
Contributor

yangcao77 commented Apr 3, 2020

/kind bug

owner reference is missing in ingress spec; therefore when deleting the deployment, the ingress still remains.

Details in : #2762 (comment)

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 3, 2020
@yangcao77
Copy link
Contributor Author

/area devfile

@openshift-ci-robot openshift-ci-robot added the area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. label Apr 3, 2020
@maysunfaisal
Copy link
Contributor

The secrets would also need to be deleted along with the ingress:

secret/maysunopenliberty-tlssecret                                 kubernetes.io/tls                     2      17h   app.kubernetes.io/instance=maysunopenliberty,app.kubernetes.io/managed-by-version=v1.1.1,app.kubernetes.io/managed-by=odo,app.kubernetes.io/part-of=,app=
secret/maysunspring-tlssecret                                      kubernetes.io/tls                     2      17h   app.kubernetes.io/instance=maysunspring,app.kubernetes.io/managed-by-version=v1.1.1,app.kubernetes.io/managed-by=odo,app.kubernetes.io/part-of=,app=

@yangcao77
Copy link
Contributor Author

@maysunfaisal The tls secrets need to be deleted during odo delete, not odo url delete. Since we are sharing the same tlssecret for all secured URLs within the same component.

@maysunfaisal
Copy link
Contributor

Okay, let me rephrase -
shouldn't ingress and secret both be deleted during odo delete? Correct me if I am wrong, odo url delete currently deletes only the envinfo which is correct and matches odo url create since it creates envinfo..

@yangcao77
Copy link
Contributor Author

yangcao77 commented Apr 7, 2020

yes. they should be both deleted during odo delete.
I guess what you mean is the owner reference should also be added to the tls-secrent? So that it can be deleted during odo delete.
But odo url delete followed with odo push, would not delete tls-secert, it only deletes ingress. So it's not be deleted "along with ingress", it's be deleted "along with deployment"

@elsony elsony added this to For consideration in Sprint 182 via automation Apr 7, 2020
@maysunfaisal
Copy link
Contributor

maysunfaisal commented Apr 7, 2020

@yangcao77 so; odo url create creates url envinfo and odo url delete will remove url envinfo and ingress? because ingress is created during odo push..

@elsony elsony moved this from For consideration to In progress in Sprint 182 Apr 7, 2020
@yangcao77
Copy link
Contributor Author

@maysunfaisal odo url delete will remove url envinfo.
And odo push would create/delete the ingress based on the difference between existing ingresses, and ingresses in envinfo.

@yangcao77
Copy link
Contributor Author

/assign

@maysunfaisal
Copy link
Contributor

@yangcao77 in that case what happens when i do odo create, odo url create, odo push and odo delete?

The ingress would be left behind, since i am not doing odo url delete and odo push again to remove the ingress.. 🤔

@yangcao77
Copy link
Contributor Author

yangcao77 commented Apr 7, 2020

@maysunfaisal odo delete would delete all ingresses and secrets belongs to that component. Since they are bonded to the same deployment.
And the ingress and tls-secret are currently left behind because owner reference is missing.
This is what the issue for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug.
Projects
No open projects
Sprint 182
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants