Skip to content

Commit 9d12c3b

Browse files
committed
additional lint fixes
1 parent 496de06 commit 9d12c3b

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

pkg/asset/agent/installconfig.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ func (a *OptionalInstallConfig) ClusterName() string {
257257
return "agent-cluster"
258258
}
259259

260+
// ClusterName returns the namespace of the cluster.
260261
func (a *OptionalInstallConfig) ClusterNamespace() string {
261262
if a.Config != nil && a.Config.ObjectMeta.Namespace != "" {
262263
return a.Config.ObjectMeta.Namespace

pkg/asset/agent/manifests/agentpullsecret.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ func (a *AgentPullSecret) generateSecret(name, namespace, pullSecret string) {
8888
},
8989
}
9090
a.Config = secret
91-
9291
}
9392

9493
// Files returns the files generated by the asset.

pkg/asset/agent/manifests/clusterimageset.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ func (a *ClusterImageSet) Load(f asset.FileFetcher) (bool, error) {
146146
}
147147

148148
func (a *ClusterImageSet) finish(workflowType workflow.AgentWorkflowType) error {
149-
150149
if a.Config == nil {
151150
return errors.New("missing configuration or manifest file")
152151
}
@@ -169,7 +168,6 @@ func (a *ClusterImageSet) validateClusterImageSet(workflowType workflow.AgentWor
169168
}
170169

171170
func (a *ClusterImageSet) validateReleaseVersion(workflowType workflow.AgentWorkflowType) field.ErrorList {
172-
173171
// skip release version check in case of add nodes workflow
174172
if workflowType == workflow.AgentWorkflowTypeAddNodes {
175173
return nil

pkg/asset/agent/manifests/infraenv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (i *InfraEnv) generateManifest(clusterName, clusterNamespace, sshKey, addit
107107

108108
// Input values (amd64, arm64) must be converted to rpmArch because infraEnv.Spec.CpuArchitecture expects x86_64 or aarch64.
109109
if architecture != "" {
110-
infraEnv.Spec.CpuArchitecture = arch.RpmArch(string(architecture))
110+
infraEnv.Spec.CpuArchitecture = arch.RpmArch(architecture)
111111
}
112112
if additionalTrustBundle != "" {
113113
infraEnv.Spec.AdditionalTrustBundle = additionalTrustBundle

pkg/nodejoiner/addnodes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package nodejoiner
22

33
import (
44
"github.com/openshift/installer/pkg/asset"
5+
"github.com/openshift/installer/pkg/asset/agent/image"
56
"github.com/openshift/installer/pkg/asset/agent/joiner"
6-
"github.com/openshift/installer/pkg/asset/agent/manifests"
77
"github.com/openshift/installer/pkg/asset/agent/workflow"
88
"github.com/openshift/installer/pkg/asset/store"
99
)
@@ -23,7 +23,7 @@ func NewAddNodesCommand(directory string, kubeConfig string) error {
2323
fetcher := store.NewAssetsFetcher(directory)
2424
return fetcher.FetchAndPersist([]asset.WritableAsset{
2525
&workflow.AgentWorkflowAddNodes{},
26-
&manifests.AgentPullSecret{},
26+
&image.AgentImage{},
2727
// To be completed
2828
})
2929
}

0 commit comments

Comments
 (0)