operator icon indicating copy to clipboard operation
operator copied to clipboard

Handles Hub installerSets deletion

Open pratap0007 opened this issue 1 year ago • 1 comments

This patch deletes Hub installersets from old targetnamespace if targetnamespace of the TektonHub config gets change

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

  • [ ] Run make test lint before submitting a PR
  • [ ] Includes tests (if functionality changed/added)
  • [ ] Includes docs (if user facing)
  • [ ] Commit messages follow commit message best practices

See the contribution guide for more details.

Release Notes

pratap0007 avatar Feb 21 '24 12:02 pratap0007

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign piyush-garg after the PR has been reviewed. You can assign the PR to them by writing /assign @piyush-garg in a comment when ready.

The full list of commands accepted by this bot can be found 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

tekton-robot avatar Feb 21 '24 12:02 tekton-robot

@pratap0007 We are not allowing changing namespace in TektonConfig CR. Why should we have to allow in TektonHub CR?

jkandasa avatar Apr 03 '24 10:04 jkandasa

@pratap0007 We are not allowing changing namespace in TektonConfig CR. Why should we have to allow in TektonHub CR?

There was an use case, user wanted to install Hub in a different namespace

pratap0007 avatar Apr 03 '24 10:04 pratap0007

There was an use case, user wanted to install Hub in a different namespace

As we do it for TektonConfig, user can delete the existing TektonHub CR and create new TektonHub CR with different namespace.

jkandasa avatar Apr 03 '24 10:04 jkandasa

There was an use case, user wanted to install Hub in a different namespace

As we do it for TektonConfig, user can delete the existing TektonHub CR and create new TektonHub CR with different namespace.

@jkandasa yes, we can do but this condition is handled for all components like chains has here https://github.com/tektoncd/operator/blob/main/pkg/reconciler/kubernetes/tektonchain/tektonchain.go#L244 , so we should have like this in Hub component, WDYT ?

pratap0007 avatar Apr 03 '24 10:04 pratap0007

@jkandasa yes, we can do but this condition is handled for all components like chains has here https://github.com/tektoncd/operator/blob/main/pkg/reconciler/kubernetes/tektonchain/tektonchain.go#L244 , so we should have like this in Hub component, WDYT ?

@vdemeester @piyush-garg WDYT about this PR? IMHO, We are not allowing to change namespace via TektonConfig CR. I want to see the same for other components CR too.

jkandasa avatar Apr 03 '24 11:04 jkandasa

@jkandasa yes, we can do but this condition is handled for all components like chains has here https://github.com/tektoncd/operator/blob/main/pkg/reconciler/kubernetes/tektonchain/tektonchain.go#L244 , so we should have like this in Hub component, WDYT ?

@vdemeester @piyush-garg WDYT about this PR? IMHO, We are not allowing to change namespace via TektonConfig CR. I want to see the same for other components CR too.

I agree here, as we are now disabling changing targetNamespace in tektonconfig, same we should do for HUB

piyush-garg avatar Apr 11 '24 12:04 piyush-garg

if we are not going to support to change the targetNamespace in tektonconfig,then shall I remove changes related to the targetNamespace from this PR ?

pratap0007 avatar Apr 12 '24 05:04 pratap0007

if we are not going to support to change the targetNamespace in tektonconfig,then shall I remove changes related to the targetNamespace from this PR ?

we mean like we can add the same logic for tektonhub validation like we did for tektonconfig, to not change namespace value in upgrade/ecit etc

piyush-garg avatar Apr 17 '24 00:04 piyush-garg

if we are not going to support to change the targetNamespace in tektonconfig,then shall I remove changes related to the targetNamespace from this PR ?

we mean like we can add the same logic for tektonhub validation like we did for tektonconfig, to not change namespace value in upgrade/ecit etc Okay, then I update the PR

pratap0007 avatar Apr 17 '24 06:04 pratap0007

The following is the coverage report on the affected files. Say /test pull-tekton-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonhub_validation.go 94.4% 95.5% 1.0

tekton-robot avatar Apr 18 '24 06:04 tekton-robot