openshift-kni / eco-goinfra

Apache License 2.0
6 stars 32 forks source link

daemonset CreateAndWaitUntilReady method uses optional conditions field #313

Open ajaggapa opened 3 months ago

ajaggapa commented 3 months ago

CreateAndWaitUntilReady method in daemonset package uses conditions field which is optional. https://github.com/openshift-kni/eco-goinfra/blob/8f863fc74b84fc749117eaba6eb9ea02e97adafa/pkg/daemonset/daemonset.go#L290 https://github.com/openshift-kni/eco-goinfra/blob/8f863fc74b84fc749117eaba6eb9ea02e97adafa/pkg/daemonset/daemonset.go#L313

Whereas, IsReady method uses desired pod count == ready pod count https://github.com/openshift-kni/eco-goinfra/blob/8f863fc74b84fc749117eaba6eb9ea02e97adafa/pkg/daemonset/daemonset.go#L372 https://github.com/openshift-kni/eco-goinfra/blob/8f863fc74b84fc749117eaba6eb9ea02e97adafa/pkg/daemonset/daemonset.go#L395

We are not able utilise CreateAndWaitUntilReady method because conditions field is not getting populated. https://docs.openshift.com/container-platform/4.15/rest_api/workloads_apis/daemonset-apps-v1.html#status

Wondering if we have any particular reason to use conditions field ?