-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add missing resources to manage in DSC controller #637
Comments
Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). Autogenerated files: - config/rbac/role.yaml [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
is label rhods-1.35 correct here? |
Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). Autogenerated files: - config/rbac/role.yaml (make manifests) [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
should be 2.4. |
Well, as soon as it gets integration. Will be safe to put 2.5 or 2.4 still sounds feasible? UPD: looking at the rush with 2.4 probably it's better to plan it for 2.5 |
ref #613 |
Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). Autogenerated files: - config/rbac/role.yaml (make manifests) [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
PR613 did ont get into rhods-2.4 but does in odh-2.4 |
Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). Autogenerated files: - config/rbac/role.yaml (make manifests) [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). Autogenerated files: - config/rbac/role.yaml (make manifests) - bundle/manifests/opendatahub-operator.clusterserviceversion.yaml (make bundle) [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). Autogenerated files: - config/rbac/role.yaml (make manifests) - bundle/manifests/opendatahub-operator.clusterserviceversion.yaml (make bundle) [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). Autogenerated files: - config/rbac/role.yaml (make manifests) - bundle/manifests/opendatahub-operator.clusterserviceversion.yaml (make bundle) [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
* rbac: add permissions for imagestreams, daemonsets, apiservices Prepare for watching v1 resources (issue opendatahub-io#637) To enable watching for DaemonSet and APIService (REST api resources daemonsets and apiservices) reading/watching permissions required for the operator's role. Otherwise it gets errors like: ``` User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope E1018 20:00:55.374514 1 reflector.go:140] go/pkg/mod/k8s.io/client-go@v0.26.0/tools/cache/reflector.go:169: Failed to watch *v1.DaemonSet: failed to list *v1.DaemonSet: daemonsets.apps is forbidden: User "system:serviceaccount:openshift-operators:opendatahub-operator-controller-manager" cannot list resource "daemonsets" in API group "apps" at the cluster scope ``` For ImageStream `get` permissing is needed for cli.Get() in deploy's manageResources()[1], otherwise it does not set ownersReference (missing the branch apierrs.IsNotFound(err) since err is related to permissions). Autogenerated files: - config/rbac/role.yaml (make manifests) - bundle/manifests/opendatahub-operator.clusterserviceversion.yaml (make bundle) [1] https://github.com/opendatahub-io/opendatahub-operator/blob/13a7e822c0c75f361c319f8256a2d199d031d97c/pkg/deploy/deploy.go#L199 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com> * DSC controller: manage missing resources previously defined v1 Add the following resources to manage: - PersistentVolumeClaim - Service - DaemonSet - StatefulSet - DeploymentConfig - ImageStream - BuildConfig - CustomResourceDefinition - APIService - Ingress - MutatingWebhookConfiguration - ValidatingWebhookConfiguration - ServiceAccount It requires to add them to the scheme in main.go. Also `go mod tidy` is run to update modules information to make it buildable (keep bisectable). Autogenerated files: - go.mod - go.sum Closes: opendatahub-io#637 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com> --------- Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com> (cherry picked from commit 91fe6f2)
Is your feature request related to a problem? Please describe.
Currently operator is managing resources it creates, however it doesn't reconcile on update/deletion of resources if they are not listed as
Owns
under SetupWithManager function.Describe the solution you'd like
Extend the list of resources to include resource types previously defined in v1 -
List of resource types
Additional context
One of the tests that we can perform to verify the change is to ensure the resources that are not previously in the list get recreated on deletion -
workbenches
component to Managed in DSC instanceImagestream
underopendatahub
namespace.Imagestream
gets recreated.The text was updated successfully, but these errors were encountered: