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

Updates tektonPipeline to make it independent of tektonConfig #600

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

PuneetPunamiya
Copy link
Member

@PuneetPunamiya PuneetPunamiya commented Jan 28, 2022

Changes

  • With the addition of operator version config map operators-info
    getting created in tektonConfig, the targetNamespace was getting
    created in tektonConfig reconciler, but if tektonConfig is not installed
    and tektonPipeline is supposed to installed alone then it won't
    be installed as it would miss the targetNamespace.

  • So this patch checks for the targetNamespace in tektonPipeline
    reconciler, if it is not present then it creates the targetNamespace
    and also the operator version config map i.e. makes tektonPipeline
    independent of tektonConfig

Signed-off-by: Puneet Punamiya [email protected]

Submitter Checklist

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

See the contribution guide for more details.

Release Notes

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 28, 2022
@tekton-robot
Copy link
Contributor

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/reconciler/common/transformers.go 73.8% 71.4% -2.4

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 1, 2022
@savitaashture
Copy link
Contributor

savitaashture commented Feb 1, 2022

@nikhil-thomas I have verified this PR resolve TargetNamespace issue
Its good to merge
Thank you @PuneetPunamiya 👍

@nikhil-thomas
Copy link
Member

@nikhil-thomas I have verified this PR resolve TargetNamespace issue Its good to merge Thank you @PuneetPunamiya 👍

Thanks @savitaashture 👍

@PuneetPunamiya Functionally this patch looks great. I have a few comments regarding code organization. We shall merge this once those are addressed. 🧑‍💻

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 0.0%

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 0.0%

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 0.0%

@savitaashture
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 0.0%

Can you add UT for this

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 5, 2022
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 7, 2022
@PuneetPunamiya
Copy link
Member Author

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 7, 2022
@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 0.0%

@@ -219,6 +194,10 @@ func (r *Reconciler) ensureTargetNamespaceExists(ctx context.Context, tc *v1alph
}
}
} else {
labels := map[string]string{"operator.tekton.dev/targetNamespace": "true"}
Copy link
Member

Choose a reason for hiding this comment

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

I can see that the following label already exists at line https://github.com/tektoncd/operator/pull/600/files#diff-de56e5fd636d3b9b5ab99eb6197436045c5bc27187a3f59649bae7d66a8e7202R19, so do we still need to pass this label from here?

Copy link
Member Author

Choose a reason for hiding this comment

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

So from the tektonConfig I have removed but in the tektonPipelines we need it

Copy link
Member

Choose a reason for hiding this comment

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

why is it not needed in tektonConfig. I was thinking we will need it in both TektonConfig and TektonPipeline.

Copy link
Member Author

@PuneetPunamiya PuneetPunamiya Feb 21, 2022

Choose a reason for hiding this comment

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

It is needed in tektonConfig as well, but the reason I've remove this variable because, in the createTargetNamespace function itself I'm adding that label while creating the namespace. For ref: please see here

@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 9, 2022
@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 64.7%

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 66.7%

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 64.7%

@PuneetPunamiya
Copy link
Member Author

/test pull-tekton-operator-integration-tests

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 66.7%

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 66.7%

@PuneetPunamiya
Copy link
Member Author

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 22, 2022
@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 66.7%

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 66.7%

@PuneetPunamiya
Copy link
Member Author

/test pull-tekton-operator-integration-tests

@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 66.7%

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: savitaashture, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [savitaashture,vdemeester]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

  - With the addition of operator version config map getting created
    in tektonConfig, the targetNamespace was getting created in
    tektonConfig reconciler, but if tektonConfig is not installed
    and tektonPipeline is supposed to installed alone then it won't
    be installed as it would miss the targetNamespace. So this patch
    checks for the targetNamespace in tektonPipeline reconciler, if
    it is not present then it creates the targetNamespace and also
    the operator version config map i.e. makes tektonPipeline
    independent of tektonConfig

Signed-off-by: Puneet Punamiya <[email protected]>
@tekton-robot
Copy link
Contributor

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/reconciler/common/targetnamespace.go Do not exist 66.7%

@sm43 sm43 added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2022
@tekton-robot tekton-robot merged commit 277d2cd into tektoncd:main Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants