-
Notifications
You must be signed in to change notification settings - Fork 114
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
Set CLUSTER_TYPE env variable in manifests #62
Set CLUSTER_TYPE env variable in manifests #62
Conversation
can you also undo my bad fix #52? |
Nothing to undo for #52 as it is not merged?
I would not be able to test this as I don't work with openshift. In the meantime I think that this change alleviates the issue. |
Re: autodiscovery if the underlying cluster is openshift or vanilla kubernetes, this is how it's addressed in another operator with similar need. cc @zshi-redhat |
@jcaamano - sorry I put the wrong commit number any I push PR to revert my bad change #66. |
yes but sriov-operator and the sriov daemon-config read it from ENV variable in the POD so this change doesn't have an effect and the CLUSTER_TYPE is still openshift in the POD. |
@moshe010 not when combined with this PR. The value set in
|
ha I see, Let wait for @zshi-redhat to be back from the PTO and see if we would go with this approach or auto-detect openshift (which I have problem to import github.com/RHsyseng/operator-utils/pkg/utils/openshift ) |
I hit a different issue importing the RHsyseng/operator-utils:
If above issue can be fixed, I think it's better to use auto-detection of platform in operator controller and publish the cluster type in SriovOperatorConfig Status unless there is case we want to force the CLUSTER_TYPE. sriov-network-config-daemon has a SriovOperatorConfig handler which can be used to set the CLUSTER_TYPE env var in its pod. Another thought for "detecting" platform is to use Namespace (currently we use different namespace for openshift and k8s). We can use this PR to enable k8s CLUSTER_TYPE and have another one for auto-detection when the importing issue is fixed or namespace detection is preferred. |
Btw, it is not straight forward to use operator-utils in sriov-network-config-daemon which relies on CLUSTER_TYPE to generate rest.Config: https://github.com/k8snetworkplumbingwg/sriov-network-operator/blob/master/cmd/sriov-network-config-daemon/start.go#L89 |
@zshi-redhat so maybe current approach is good enough for now |
Add CLUSTER_TYPE to the manifests so it can be customized without the need to rebuild the images.
74c74e7
to
e0f1613
Compare
/LGTM. @zshi-redhat Are you ok to proceed with this PR and then autodetection later? |
Add CLUSTER_TYPE to the manifests so it can be customized without the
need to rebuild the images.
fixes: #48