Skip to content

Commit

Permalink
Fixing CDIStatus generate-verify issues (kubevirt#1412)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Dzon <[email protected]>
  • Loading branch information
Jakub Dzon authored Oct 2, 2020
1 parent b91887e commit 68e9be2
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 38 deletions.
2 changes: 1 addition & 1 deletion api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3508,7 +3508,7 @@
}
},
"v1beta1.CDIStatus": {
"description": "CDIStatus defines the status of the CDI installation",
"description": "CDIStatus defines the status of the installation",
"type": "object",
"nullable": true,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require (
k8s.io/klog v1.0.0
k8s.io/kube-aggregator v0.18.6
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6
kubevirt.io/controller-lifecycle-operator-sdk v0.1.0
kubevirt.io/controller-lifecycle-operator-sdk v0.1.1
kubevirt.io/qe-tools v0.1.6
sigs.k8s.io/controller-runtime v0.6.2
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,8 @@ k8s.io/kubernetes v1.14.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7MpmSnvtrOieolJKoE=
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
kubevirt.io/controller-lifecycle-operator-sdk v0.1.0 h1:wi6kO+nd9fbMDjdMy7rO6dbKXTxLdt6RjVZBpjddOew=
kubevirt.io/controller-lifecycle-operator-sdk v0.1.0/go.mod h1:M+UuZsp90mmKUVGb5zXDZtIIY1noY5pJk9i2YCQwSnk=
kubevirt.io/controller-lifecycle-operator-sdk v0.1.1 h1:dqURkr5Q5f4qJM7uLHL0akFxTatt0MUekKL0xifmVjs=
kubevirt.io/controller-lifecycle-operator-sdk v0.1.1/go.mod h1:M+UuZsp90mmKUVGb5zXDZtIIY1noY5pJk9i2YCQwSnk=
kubevirt.io/qe-tools v0.1.6 h1:S6z9CATmgV2/z9CWetij++Rhu7l/Z4ObZqerLdNMo0Y=
kubevirt.io/qe-tools v0.1.6/go.mod h1:PJyH/YXC4W0AmxfheDmXWMbLNsMSboVGXKpMAwfKzVE=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0=
Expand Down
15 changes: 8 additions & 7 deletions pkg/apis/core/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions pkg/apis/core/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,17 @@ const (
// CDIPhase is the current phase of the CDI deployment
type CDIPhase string

// CDIStatus defines the status of the CDI installation
// CDIStatus defines the status of the installation
type CDIStatus struct {
// Phase is the current phase of the deployment
Phase CDIPhase `json:"phase,omitempty"`
// A list of current conditions of the CDI resource
// A list of current conditions of the resource
Conditions []conditions.Condition `json:"conditions,omitempty" optional:"true"`
// The version of the CDI resource as defined by the operator
// The version of the resource as defined by the operator
OperatorVersion string `json:"operatorVersion,omitempty" optional:"true"`
// The desired version of the CDI resource
// The desired version of the resource
TargetVersion string `json:"targetVersion,omitempty" optional:"true"`
// The observed version of the CDI resource
// The observed version of the resource
ObservedVersion string `json:"observedVersion,omitempty" optional:"true"`
}

Expand Down
11 changes: 6 additions & 5 deletions pkg/apis/core/v1alpha1/types_swagger_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/core/v1beta1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/core/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ const (
// CDIPhase is the current phase of the CDI deployment
type CDIPhase string

// CDIStatus defines the status of the CDI installation
// CDIStatus defines the status of the installation
type CDIStatus struct {
sdkapi.Status `json:",inline"`
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/core/v1beta1/types_swagger_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/operator/resources/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ func createCDIListCRD() *extv1.CustomResourceDefinition {
Type: "object",
Description: "CDISpec defines our specification for the CDI installation",
},
"status": sdkopenapi.OperatorConfigStatus("CDIStatus", "CDI"),
"status": sdkopenapi.OperatorConfigStatus("CDIStatus"),
},
Required: []string{
"spec",
Expand Down Expand Up @@ -2754,7 +2754,7 @@ func createCDIListCRD() *extv1.CustomResourceDefinition {
Type: "object",
Description: "CDISpec defines our specification for the CDI installation",
},
"status": sdkopenapi.OperatorConfigStatus("CDIStatus", "CDI"),
"status": sdkopenapi.OperatorConfigStatus("CDIStatus"),
},
Required: []string{
"spec",
Expand Down
4 changes: 2 additions & 2 deletions tests/explain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ var _ = Describe("Explain tests", func() {
It("[test_id:4964]explain should have descriptions for CDI", func() {
out, err := tests.RunKubectlCommand(f, "explain", "CDI")
Expect(err).ToNot(HaveOccurred())
Expect(out).To(ContainSubstring("CDIStatus defines the status of the CDI installation"))
Expect(out).To(ContainSubstring("CDIStatus defines the status of the installation"))
out, err = tests.RunKubectlCommand(f, "explain", "CDI.status")
Expect(err).ToNot(HaveOccurred())
Expect(out).To(ContainSubstring("The desired version of the CDI resource"))
Expect(out).To(ContainSubstring("The desired version of the resource"))
})

It("[test_id:4965]explain should have descriptions for CDIConfig", func() {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# kubevirt.io/controller-lifecycle-operator-sdk v0.1.0
# kubevirt.io/controller-lifecycle-operator-sdk v0.1.1
## explicit
kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk
kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api
Expand Down

0 comments on commit 68e9be2

Please sign in to comment.