diff --git a/pkg/clusterversion/clusterversion.go b/pkg/clusterversion/clusterversion.go index 48290dd5a..eba802a1f 100644 --- a/pkg/clusterversion/clusterversion.go +++ b/pkg/clusterversion/clusterversion.go @@ -10,7 +10,7 @@ import ( "github.com/golang/glog" "github.com/openshift-kni/eco-goinfra/pkg/clients" "github.com/openshift-kni/eco-goinfra/pkg/msg" - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" @@ -24,9 +24,9 @@ const ( // Builder provides a struct for clusterversion object from the cluster and a clusterversion definition. type Builder struct { // clusterversion definition, used to create the clusterversion object. - Definition *v1.ClusterVersion + Definition *configv1.ClusterVersion // Created clusterversion object. - Object *v1.ClusterVersion + Object *configv1.ClusterVersion // api client to interact with the cluster. apiClient *clients.Settings // Used in functions that define or mutate clusterversion definition. errorMsg is processed before the @@ -40,7 +40,7 @@ func Pull(apiClient *clients.Settings) (*Builder, error) { builder := Builder{ apiClient: apiClient, - Definition: &v1.ClusterVersion{ + Definition: &configv1.ClusterVersion{ ObjectMeta: metav1.ObjectMeta{ Name: clusterVersionName, }, @@ -90,7 +90,7 @@ func (builder *Builder) WithDesiredUpdateImage(desiredUpdateImage string, force return builder } - builder.Definition.Spec.DesiredUpdate = &v1.Update{Image: desiredUpdateImage, Force: force} + builder.Definition.Spec.DesiredUpdate = &configv1.Update{Image: desiredUpdateImage, Force: force} return builder } @@ -150,7 +150,7 @@ func (builder *Builder) WaitUntilAvailable(timeout time.Duration) error { // WaitUntilConditionTrue waits for timeout duration or until clusterversion gets to a specific status. func (builder *Builder) WaitUntilConditionTrue( - conditionType v1.ClusterStatusConditionType, timeout time.Duration) error { + conditionType configv1.ClusterStatusConditionType, timeout time.Duration) error { if valid, err := builder.validate(); !valid { return err } @@ -193,7 +193,7 @@ func (builder *Builder) WaitUntilUpdateIsCompleted(timeout time.Duration) error // WaitUntilUpdateHistoryStateTrue waits until there is a history entry indicating an updateHistoryState. func (builder *Builder) WaitUntilUpdateHistoryStateTrue( - updateHistoryState v1.UpdateState, timeout time.Duration) error { + updateHistoryState configv1.UpdateState, timeout time.Duration) error { if valid, err := builder.validate(); !valid { return err } diff --git a/pkg/console/console.go b/pkg/console/console.go index 6ee3d6c87..aaa4ef690 100644 --- a/pkg/console/console.go +++ b/pkg/console/console.go @@ -9,16 +9,16 @@ import ( "github.com/golang/glog" "github.com/openshift-kni/eco-goinfra/pkg/clients" "github.com/openshift-kni/eco-goinfra/pkg/msg" - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Builder provides a struct for console object from the cluster and a console definition. type Builder struct { // Console definition, used to create the pod object. - Definition *v1.Console + Definition *configv1.Console // Created console object. - Object *v1.Console + Object *configv1.Console // api client to interact with the cluster. apiClient *clients.Settings // errorMsg is processed before console object is created. @@ -31,7 +31,7 @@ func NewBuilder(apiClient *clients.Settings, name string) *Builder { builder := Builder{ apiClient: apiClient, - Definition: &v1.Console{ + Definition: &configv1.Console{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, @@ -51,7 +51,7 @@ func NewBuilder(apiClient *clients.Settings, name string) *Builder { func Pull(apiClient *clients.Settings, name string) (*Builder, error) { builder := Builder{ apiClient: apiClient, - Definition: &v1.Console{ + Definition: &configv1.Console{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, diff --git a/pkg/infrastructure/infrastructure.go b/pkg/infrastructure/infrastructure.go index c652f1d2a..63712f683 100644 --- a/pkg/infrastructure/infrastructure.go +++ b/pkg/infrastructure/infrastructure.go @@ -7,7 +7,7 @@ import ( "github.com/golang/glog" "github.com/openshift-kni/eco-goinfra/pkg/clients" "github.com/openshift-kni/eco-goinfra/pkg/msg" - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -19,9 +19,9 @@ const ( // Builder provides a struct for infrastructure object from the cluster and a infrastructure definition. type Builder struct { // infrastructure definition, used to create the infrastructure object. - Definition *v1.Infrastructure + Definition *configv1.Infrastructure // Created infrastructure object. - Object *v1.Infrastructure + Object *configv1.Infrastructure // api client to interact with the cluster. apiClient *clients.Settings } @@ -32,7 +32,7 @@ func Pull(apiClient *clients.Settings) (*Builder, error) { builder := Builder{ apiClient: apiClient, - Definition: &v1.Infrastructure{ + Definition: &configv1.Infrastructure{ ObjectMeta: metav1.ObjectMeta{ Name: infrastructureName, }, diff --git a/pkg/network/network.go b/pkg/network/network.go index 79df67820..38451deb5 100644 --- a/pkg/network/network.go +++ b/pkg/network/network.go @@ -7,7 +7,7 @@ import ( "github.com/golang/glog" "github.com/openshift-kni/eco-goinfra/pkg/clients" "github.com/openshift-kni/eco-goinfra/pkg/msg" - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -19,9 +19,9 @@ const ( // ConfigBuilder provides a struct for network object from the cluster and a network definition. type ConfigBuilder struct { // network definition, used to create the network object. - Definition *v1.Network + Definition *configv1.Network // Created network object. - Object *v1.Network + Object *configv1.Network // api client to interact with the cluster. apiClient *clients.Settings } @@ -32,7 +32,7 @@ func PullConfig(apiClient *clients.Settings) (*ConfigBuilder, error) { builder := ConfigBuilder{ apiClient: apiClient, - Definition: &v1.Network{ + Definition: &configv1.Network{ ObjectMeta: metav1.ObjectMeta{ Name: clusterNetworkName, }, diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 1f2973f56..f7fe1bc25 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -7,7 +7,7 @@ import ( "github.com/golang/glog" "github.com/openshift-kni/eco-goinfra/pkg/clients" "github.com/openshift-kni/eco-goinfra/pkg/msg" - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -19,9 +19,9 @@ const ( // Builder provides a struct for proxy object from the cluster and a proxy definition. type Builder struct { // proxy definition, used to create the proxy object. - Definition *v1.Proxy + Definition *configv1.Proxy // Created proxy object. - Object *v1.Proxy + Object *configv1.Proxy // api client to interact with the cluster. apiClient *clients.Settings } @@ -32,7 +32,7 @@ func Pull(apiClient *clients.Settings) (*Builder, error) { builder := Builder{ apiClient: apiClient, - Definition: &v1.Proxy{ + Definition: &configv1.Proxy{ ObjectMeta: metav1.ObjectMeta{ Name: clusterProxyName, },