Skip to content

Commit 1fc954f

Browse files
committed
vsphere: types: fix example annotations
Without the ``, newer versions of controller-gen fail with: ``` /go/src/github.com/openshift/installer/pkg/types/vsphere/platform.go:286:2: extra arguments provided: ".8.8" (at <input>:1:4) /go/src/github.com/openshift/installer/pkg/types/vsphere/platform.go:276:2: extra arguments provided: ".1.100/24" (at <input>:1:8) /go/src/github.com/openshift/installer/pkg/types/vsphere/platform.go:277:2: extra arguments provided: ":DB8:0000:0000:244:17FF:FEB6:D37D/64" (at <input>:1:5) /go/src/github.com/openshift/installer/pkg/types/vsphere/platform.go:217:2: extra arguments provided: ":vmomi:InventoryServiceTag:5736bf56-49f5-4667-b38c-b97e09dc9578:GLOBAL" (at <input>:1:4) /go/src/github.com/openshift/installer/pkg/types/vsphere/platform.go:217:2: extra arguments provided: ":vmomi:InventoryServiceTag:5736bf56-49f5-4667-b38c-b97e09dc9578:GLOBAL" (at <input>:1:4) /go/src/github.com/openshift/installer/pkg/types/vsphere/platform.go:286:2: extra arguments provided: ".8.8" (at <input>:1:4) /go/src/github.com/openshift/installer/pkg/types/vsphere/platform.go:276:2: extra arguments provided: ".1.100/24" (at <input>:1:8) /go/src/github.com/openshift/installer/pkg/types/vsphere/platform.go:277:2: extra arguments provided: ":DB8:0000:0000:244:17FF:FEB6:D37D/64" (at <input>:1:5) ```
1 parent 7f396ca commit 1fc954f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/types/vsphere/platform.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ type Topology struct {
214214
Template string `json:"template,omitempty"`
215215
// tagIDs is an optional set of tags to add to an instance. Specified tagIDs
216216
// must use URN-notation instead of display names. A maximum of 10 tag IDs may be specified.
217-
// +kubebuilder:example=urn:vmomi:InventoryServiceTag:5736bf56-49f5-4667-b38c-b97e09dc9578:GLOBAL
217+
// +kubebuilder:example=`urn:vmomi:InventoryServiceTag:5736bf56-49f5-4667-b38c-b97e09dc9578:GLOBAL`
218218
// +optional
219219
TagIDs []string `json:"tagIDs,omitempty"`
220220
}
@@ -273,8 +273,8 @@ type NetworkDeviceSpec struct {
273273
// intended to allow explicit assignment of a machine's IP address.
274274
// +kubebuilder:validation:Format=ipv4
275275
// +kubebuilder:validation:Format=ipv6
276-
// +kubebuilder:example=192.168.1.100/24
277-
// +kubebuilder:example=2001:DB8:0000:0000:244:17FF:FEB6:D37D/64
276+
// +kubebuilder:example=`192.168.1.100/24`
277+
// +kubebuilder:example=`2001:DB8:0000:0000:244:17FF:FEB6:D37D/64`
278278
// +kubebuilder:validation:Required
279279
IPAddrs []string `json:"ipAddrs"`
280280

@@ -283,7 +283,7 @@ type NetworkDeviceSpec struct {
283283
// source of IP addresses for this network device, nameservers should include a valid nameserver.
284284
// +kubebuilder:validation:Format=ipv4
285285
// +kubebuilder:validation:Format=ipv6
286-
// +kubebuilder:example=8.8.8.8
286+
// +kubebuilder:example=`8.8.8.8`
287287
Nameservers []string `json:"nameservers,omitempty"`
288288
}
289289

0 commit comments

Comments
 (0)