-
Notifications
You must be signed in to change notification settings - Fork 232
Fixes deployment on OpenShift #404
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
Conversation
|
The following is the coverage report on the affected files.
|
32931f2 to
2e9e27d
Compare
|
The following is the coverage report on the affected files.
|
vdemeester
left a comment
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.
Not a fan of the package 😅 pkg/reconciler/common-reconciler/… there is common and a repetition there. What pkg/reconciler/shared/… instead ? (it's the "shared" code for all platform more or less).
Not to take in this PR, but NewExtendedController might be better named NewExtensibleController, shouldn't it ? 🤔
| app: tekton-operator | ||
| spec: | ||
| serviceAccountName: tekton-operator | ||
| serviceAccountName: openshift-pipelines-operator |
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.
Same remark as I did to @nikhil-thomas's PR, I think this should stay tekton-operator as this is in tektoncd, OpenShift Pipelines happens to use this but we shouldn't make it hardcoded I think
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.
ah okay. I think that change of service account was not reverted in that pr due to which webhook is failing now.
controller uses openshift-pipelines-operator and webhook tekton-operator
and on openshift tekton-operator is not created anymore
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.
ah I see. Then we should probably create an issue to track this 😝
@vdemeester
yeah |
config/openshift/kustomization.yaml
Outdated
| - target: | ||
| kind: Deployment | ||
| name: tekton-operator | ||
| patch: |- | ||
| - op: replace | ||
| path: /metadata/name | ||
| value: openshift-pipelines-operator | ||
| - path: operator.yaml | ||
| target: | ||
| kind: Deployment | ||
| name: tekton-operator | ||
| - path: webhook.yaml | ||
| target: | ||
| kind: Deployment | ||
| name: tekton-operator-webhook | ||
| - path: role.yaml | ||
| target: | ||
| kind: ClusterRole | ||
| name: tekton-operator | ||
| - path: role_binding.yaml | ||
| target: | ||
| kind: ClusterRoleBinding | ||
| name: tekton-operator | ||
| - path: webhook.yaml | ||
| target: | ||
| kind: Deployment | ||
| name: tekton-operator-webhook |
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.
do we require this change ?
similarly in other places as well
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.
ide identation 😅
TektonConfig's ExtendedController is used in both platforms k8s and OpenShift and was in the k8s pkg. K8s controller use Dashboard informer but OpenShift's doesn't need it. As we import the Dashboard Informer pkg in k8s it has an init func which get executed and looks for Dashboard CRD. This was happening with OpenShift where we don't install Dashboard CRD now. so to avoid dashboard informer getting initialize for OpenShift moving ExtendedController to a separate pkg. Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
This fixes the failure of TektonAddon on OpenShift because of the params not getting added to cr. this enables the defaulting and validation in TektonConfig. This also adds for k8s platform but it won't have any effect of the installation of addon on k8s as it is not controller in not added for k8s. This in plan to enable in upcoming days. Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
2e9e27d to
09f9ede
Compare
Earlier for Openshift, the specific files were not getting merged in base due to which webhook was looking at tekton-operator ns instead of openshift-operators, this fixes it. And also updtes the service account and rbac for webhook. Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
09f9ede to
78eceeb
Compare
|
The following is the coverage report on the affected files.
|
|
The following is the coverage report on the affected files.
|
|
most of the review comments seem already addressed |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Moves TektonConfig ExtendedController to a separate pkg
TektonConfig's ExtendedController is used in both platforms k8s and
OpenShift and was in the k8s pkg. K8s controller use Dashboard
informer but OpenShift's doesn't need it. As we import the Dashboard
Informer pkg in k8s it has an init func which get executed and looks
for Dashboard CRD. This was happening with OpenShift where we don't
install Dashboard CRD now. so to avoid dashboard informer getting
initialize for OpenShift moving ExtendedController to a separate pkg.
Enable TektonAddon Defaulting & Validation in Webhook
This fixes the failure of TektonAddon on OpenShift because of the
params not getting added to cr. this enables the defaulting
and validation in TektonConfig.
This also adds for k8s platform but it won't have any effect of the
installation of addon on k8s as it is not controller in not added
for k8s. This in plan to enable in upcoming days.
[OpenShift] Fixes Operator webhook
Earlier for Openshift, the specific files were not getting merged in
base due to which webhook was looking at tekton-operator ns instead
of openshift-operators, this fixes it.
And also updates the service account and rbac for webhook.
Signed-off-by: Shivam Mukhade smukhade@redhat.com
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