Skip to content

Commit

Permalink
feedback updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dbw7 committed Oct 21, 2024
1 parent cdca128 commit 121fb87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions pkg/image/validation/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ func validateNetwork(k8s *image.Kubernetes) []FailedValidation {
var failures []FailedValidation

if k8s.Network.APIVIP == "" {
if len(k8s.Nodes) >= 1 {
if len(k8s.Nodes) > 1 {
failures = append(failures, FailedValidation{
UserMessage: "The 'apiVIP' field is required in the 'network' section when defining entries under 'nodes'.",
UserMessage: "The 'apiVIP' field is required in the 'network' section for multi node clusters.",
})
return failures
}

return failures
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubernetes/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func NewCluster(kubernetes *image.Kubernetes, configPath string) (*Cluster, erro
return &Cluster{ServerConfig: serverConfig}, nil
}

ip, ipErr := netip.ParseAddr(kubernetes.Network.APIVIP)
if ipErr != nil {
ip, err := netip.ParseAddr(kubernetes.Network.APIVIP)
if err != nil {
return nil, fmt.Errorf("parsing kubernetes APIVIP address: %w", ipErr)

Check failure on line 60 in pkg/kubernetes/cluster.go

View workflow job for this annotation

GitHub Actions / build

undefined: ipErr
}

Expand Down

0 comments on commit 121fb87

Please sign in to comment.