Skip to content

Commit 92e7b42

Browse files
authored
fix: fix azurePropertyCheckerOptions not correctly passin (#1236)
2 parents 66704a2 + 32614e2 commit 92e7b42

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

cmd/hubagent/options/azureoptions.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,8 @@ type AzurePropertyCheckerOptions struct {
1616
ComputeServiceAddressWithBasePath string
1717
}
1818

19-
// NewAzurePropertyCheckerOptions creates a new AzurePropertyCheckerOptions with default values.
20-
func NewAzurePropertyCheckerOptions() AzurePropertyCheckerOptions {
21-
return AzurePropertyCheckerOptions{
22-
IsEnabled: false,
23-
ComputeServiceAddressWithBasePath: "http://localhost:8421/compute",
24-
}
25-
}
26-
2719
// AddFlags adds flags for Azure Property Checker options to the given FlagSet.
28-
func (o AzurePropertyCheckerOptions) AddFlags(flags *flag.FlagSet) {
29-
flags.BoolVar(&o.IsEnabled, "azure-property-checker-enabled", o.IsEnabled, "Enable Azure property checker for validating Azure-specific cluster properties.")
30-
flags.StringVar(&o.ComputeServiceAddressWithBasePath, "azure-compute-server-address", o.ComputeServiceAddressWithBasePath, "The address of the Azure compute service with base path.")
20+
func (o *AzurePropertyCheckerOptions) AddFlags(flags *flag.FlagSet) {
21+
flags.BoolVar(&o.IsEnabled, "azure-property-checker-enabled", false, "Enable Azure property checker for validating Azure-specific cluster properties.")
22+
flags.StringVar(&o.ComputeServiceAddressWithBasePath, "azure-compute-server-address", "http://localhost:8421/compute", "The address of the Azure compute service with base path.")
3123
}

cmd/hubagent/options/options.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ func NewOptions() *Options {
136136
PprofPort: 6065,
137137
ResourceSnapshotCreationMinimumInterval: 30 * time.Second,
138138
ResourceChangesCollectionDuration: 15 * time.Second,
139-
AzurePropertyCheckerOpts: NewAzurePropertyCheckerOptions(),
140139
}
141140
}
142141

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ require (
1111
github.com/gofrs/uuid v4.4.0+incompatible
1212
github.com/google/go-cmp v0.7.0
1313
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0
14-
github.com/kubefleet-dev/kubefleet v0.0.1
1514
github.com/onsi/ginkgo/v2 v2.23.4
1615
github.com/onsi/gomega v1.37.0
1716
github.com/prometheus/client_golang v1.22.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
203203
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
204204
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
205205
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
206-
github.com/kubefleet-dev/kubefleet v0.0.1 h1:Xo/DvRlKq7YLvzjGp8GFD8G6SLAyI41l4Sw4+df534g=
207-
github.com/kubefleet-dev/kubefleet v0.0.1/go.mod h1:EXicokCzLknCzcpQ/8ehtXqBokr0/xUfzsSsU++rReY=
208206
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
209207
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
210208
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=

0 commit comments

Comments
 (0)