Skip to content

Commit

Permalink
updated maintainer info with working tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kensipe committed Sep 11, 2019
1 parent ab712e1 commit 20ddd7e
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 9 deletions.
7 changes: 6 additions & 1 deletion config/crds/kudo_v1alpha1_operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ spec:
type: string
maintainers:
items:
type: string
properties:
name:
type: string
email:
type: string
type: object
type: array
url:
type: string
Expand Down
3 changes: 2 additions & 1 deletion config/samples/first-operator/operator.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: "first-operator"
version: "0.1.0"
maintainers:
- Your name <your@email.com>
- name: Your name
email: <your@email.com>
url: https://kudo.dev
tasks:
app:
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ sigs.k8s.io/controller-runtime v0.2.0 h1:5gL30PXOisGZl+Osi4CmLhvMUj77BO3wJeouKF2
sigs.k8s.io/controller-runtime v0.2.0/go.mod h1:ZHqrRDZi3f6BzONcvlUxkqCKgwasGk5FZrnSv9TVZF4=
sigs.k8s.io/controller-tools v0.2.0 h1:AmQ/0JKBJAjyAiPAkrAf9QW06jkx2lc5hpxMjamsFpw=
sigs.k8s.io/controller-tools v0.2.0/go.mod h1:8t/X+FVWvk6TaBcsa+UKUBbn7GMtvyBKX30SGl4em6Y=
sigs.k8s.io/controller-tools v0.2.1 h1:HoCik83vXOpPi7KSJWdPRmiGntyOzK0v0BTV4U+pl8o=
sigs.k8s.io/kind v0.4.0 h1:C/QMxmF5Sp3yyKkTJ5+VJPcclZyu/JV8wLyihZbsHaI=
sigs.k8s.io/kind v0.4.0/go.mod h1:bgGo2cWxKGQ7esVxtGp9H17Ttlexju92CTMjCg08HNQ=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
Expand Down
12 changes: 10 additions & 2 deletions pkg/kudoctl/cmd/init/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,22 @@ func operatorCrd() *apiextv1beta1.CustomResourceDefinition {
}

func generateOperator() *apiextv1beta1.CustomResourceDefinition {

maintainers := map[string]apiextv1beta1.JSONSchemaProps{
"name": apiextv1beta1.JSONSchemaProps{Type: "string"},
"email": apiextv1beta1.JSONSchemaProps{Type: "string"},
}

crd := generateCrd("Operator", "operators")
specProps := map[string]apiextv1beta1.JSONSchemaProps{
"description": apiextv1beta1.JSONSchemaProps{Type: "string"},
"kubernetesVersion": apiextv1beta1.JSONSchemaProps{Type: "string"},
"kudoVersion": apiextv1beta1.JSONSchemaProps{Type: "string"},
"maintainers": apiextv1beta1.JSONSchemaProps{
Type: "array",
Items: &apiextv1beta1.JSONSchemaPropsOrArray{Schema: &apiextv1beta1.JSONSchemaProps{Type: "string"}, JSONSchemas: []apiextv1beta1.JSONSchemaProps{}},
Items: &apiextv1beta1.JSONSchemaPropsOrArray{Schema: &apiextv1beta1.JSONSchemaProps{
Type: "object",
Properties: maintainers,
}, JSONSchemas: []apiextv1beta1.JSONSchemaProps{}},
},
"url": apiextv1beta1.JSONSchemaProps{Type: "string"},
}
Expand Down
8 changes: 6 additions & 2 deletions pkg/kudoctl/cmd/testdata/deploy-kudo.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ spec:
type: string
maintainers:
items:
type: string
type: array
properties:
email:
type: string
name:
type: string
type: object
url:
type: string
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ version: "0.1.0"
kudoVersion: 0.3.0
kubernetesVersion: 1.5.1
maintainers:
- Justin Taylor-Barrick <jbarrick-mesosphere@mesosphere.com>
- name: Justin Taylor-Barrick
email: jbarrick-mesosphere@mesosphere.com
tasks:
infra:
resources:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: "upgrade-operator"
version: "0.1.0"
maintainers:
- Your name <your@email.com>
- name: Your name
email: <your@email.com>
url: https://kudo.dev
tasks:
app:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: "upgrade-operator"
version: "0.2.0"
maintainers:
- Your name <your@email.com>
- name: Your name
email: <your@email.com>
url: https://kudo.dev
tasks:
app:
Expand Down

0 comments on commit 20ddd7e

Please sign in to comment.