Skip to content

Commit

Permalink
Add appVersion and version to CRD to match the structs. (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
porridge authored and Jan Schlicht committed Dec 18, 2019
1 parent 6b31202 commit 23b777c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/crds/kudo_v1beta1_operatorversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ spec:
type: object
spec:
properties:
appVersion:
type: string
connectionString:
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
Expand Down Expand Up @@ -87,6 +89,8 @@ spec:
items:
type: object
type: array
version:
type: string
type: object
status:
type: object
Expand Down
4 changes: 4 additions & 0 deletions pkg/kudoctl/cmd/testdata/deploy-kudo-ns.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ spec:
type: object
spec:
properties:
appVersion:
type: string
connectionString:
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
Expand Down Expand Up @@ -144,6 +146,8 @@ spec:
items:
type: object
type: array
version:
type: string
type: object
status:
type: object
Expand Down
4 changes: 4 additions & 0 deletions pkg/kudoctl/cmd/testdata/deploy-kudo-sa.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ spec:
type: object
spec:
properties:
appVersion:
type: string
connectionString:
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
Expand Down Expand Up @@ -144,6 +146,8 @@ spec:
items:
type: object
type: array
version:
type: string
type: object
status:
type: object
Expand Down
4 changes: 4 additions & 0 deletions pkg/kudoctl/cmd/testdata/deploy-kudo-webhook.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ spec:
type: object
spec:
properties:
appVersion:
type: string
connectionString:
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
Expand Down Expand Up @@ -144,6 +146,8 @@ spec:
items:
type: object
type: array
version:
type: string
type: object
status:
type: object
Expand Down
4 changes: 4 additions & 0 deletions pkg/kudoctl/cmd/testdata/deploy-kudo.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ spec:
type: object
spec:
properties:
appVersion:
type: string
connectionString:
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
Expand Down Expand Up @@ -144,6 +146,8 @@ spec:
items:
type: object
type: array
version:
type: string
type: object
status:
type: object
Expand Down
2 changes: 2 additions & 0 deletions pkg/kudoctl/kudoinit/crd/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ func operatorVersionCrd() *apiextv1beta1.CustomResourceDefinition {
"spec": {Type: "object"},
}
specProps := map[string]apiextv1beta1.JSONSchemaProps{
"appVersion": {Type: "string"},
"connectionString": {Type: "string", Description: "ConnectionString defines a templated string that can be used to connect to an instance of the Operator."},
"operator": {Type: "object"},
"parameters": {
Expand All @@ -191,6 +192,7 @@ func operatorVersionCrd() *apiextv1beta1.CustomResourceDefinition {
Items: &apiextv1beta1.JSONSchemaPropsOrArray{Schema: &apiextv1beta1.JSONSchemaProps{Type: "object"}, JSONSchemas: []apiextv1beta1.JSONSchemaProps{}},
},
"crdVersion": {Type: "string"},
"version": {Type: "string"},
}

validationProps := map[string]apiextv1beta1.JSONSchemaProps{
Expand Down

0 comments on commit 23b777c

Please sign in to comment.