Skip to content

Commit f541aab

Browse files
committed
Use constants for Group/Version
1 parent 3dc204e commit f541aab

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pkg/asset/agent/manifests/clusterdeployment.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1111
"sigs.k8s.io/yaml"
1212

13+
hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1"
1314
hivev1 "github.com/openshift/hive/apis/hive/v1"
1415
"github.com/openshift/installer/pkg/asset"
1516
"github.com/openshift/installer/pkg/asset/agent"
@@ -70,8 +71,8 @@ func (cd *ClusterDeployment) Generate(dependencies asset.Parents) error {
7071
Name: getPullSecretName(installConfig.ClusterName()),
7172
},
7273
ClusterInstallRef: &hivev1.ClusterInstallLocalReference{
73-
Group: "extensions.hive.openshift.io",
74-
Version: "v1beta1",
74+
Group: hiveext.Group,
75+
Version: hiveext.Version,
7576
Kind: "AgentClusterInstall",
7677
Name: getAgentClusterInstallName(installConfig),
7778
},

pkg/asset/agent/manifests/nmstateconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (n *NMStateConfig) Generate(dependencies asset.Parents) error {
104104
nmStateConfig := aiv1beta1.NMStateConfig{
105105
TypeMeta: metav1.TypeMeta{
106106
Kind: "NMStateConfig",
107-
APIVersion: "agent-install.openshift.io/v1beta1",
107+
APIVersion: aiv1beta1.GroupVersion.String(),
108108
},
109109
ObjectMeta: metav1.ObjectMeta{
110110
Name: fmt.Sprintf(getNMStateConfigName(installConfig)+"-%d", i),

0 commit comments

Comments
 (0)