-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: replace namespace of configMaps and roleBindings #646
Conversation
When ssp CR contains defined spec.tektonPipelines.namespace attribute, it should replace kubevirt.io/deploy-namespace annotation (currently used only for configMaps and roleBindings in example tekton pipelines). So when user decides to deploy pipelines to different namespace, the pipeline will be able to pick up correct configMap and roleBinding. fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2229903 Signed-off-by: Karel Simon <ksimon@redhat.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/retest |
/lgtm |
@@ -89,7 +89,7 @@ func (t *tektonPipelines) Reconcile(request *common.Request) ([]common.Reconcile | |||
return nil, nil | |||
} | |||
if !request.CrdList.CrdExists(tektonCrd) { | |||
return nil, fmt.Errorf("Tekton CRD %s does not exist", tektonCrd) | |||
return nil, fmt.Errorf("tekton CRD %s does not exist", tektonCrd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: necessary change?
for i := range configMaps { | ||
configMap := &configMaps[i] | ||
funcs = append(funcs, func(request *common.Request) (common.ReconcileResult, error) { | ||
if value, ok := configMap.Annotations[deployNamespaceAnnotation]; ok { | ||
configMap.Namespace, userDefinedNamespace = getTektonPipelinesNamespace(request) | ||
if value, ok := configMap.Annotations[deployNamespaceAnnotation]; ok && !userDefinedNamespace { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required to keep compatibility with namespace annotations?
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 0xFelix 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:
Approvers can indicate their approval by writing |
/retest |
@ksimon1: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This PR is blocked by CI issue. IMHO we can force merge it without tests. |
Agreed we can /override here. |
/cherrypick release-v0.18 |
@ksimon1: new pull request created: #671 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
feat: replace namespace of configMaps and roleBindings
When ssp CR contains defined spec.tektonPipelines.namespace attribute, it should replace kubevirt.io/deploy-namespace annotation (currently used only for configMaps and roleBindings in example tekton pipelines). So when user decides to deploy pipelines to different namespace, the pipeline will be able to pick up correct configMap and roleBinding.
Which issue(s) this PR fixes:
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2229903
Release note: