Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the group of Service in the examples and tests #156

Merged
merged 1 commit into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ spec:
matchLabels:
app.kubernetes.io/name: "wordpress-01"
componentKinds:
- group: ""
- group: v1
kind: Service
- group: apps
kind: StatefulSet
Expand Down
2 changes: 1 addition & 1 deletion config/samples/app_v1beta1_application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
matchLabels:
app.kubernetes.io/name: "wordpress-01"
componentKinds:
- group: core
- group: v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this change. Why change "" to v1 in the others ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per Janet's comment: #112 (comment).
It seems v1 makes more sense than "".

kind: Service
- group: apps
kind: Deployment
Expand Down
8 changes: 4 additions & 4 deletions controllers/application_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ var _ = Describe("Application Reconciler", func() {
Kind: "Job",
},
{
Group: "", // NOTICE: The group of Service should be empty, instead of "core"
Group: "v1",
Kind: "Service",
},
{
Group: "", // NOTICE: The group of PVC should be empty, instead of "core"
Group: "v1",
Kind: "PersistentVolumeClaim",
},
{
Group: "", // NOTICE: The group of Pod should be empty, instead of "core"
Group: "v1",
Kind: "Pod",
},
{
Expand Down Expand Up @@ -263,7 +263,7 @@ var _ = Describe("Application Reconciler", func() {
Kind: "Deployment",
},
{
Group: "", // NOTICE: The group of Service should be empty, instead of "core"
Group: "v1",
Kind: "Service",
},
},
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/wordpress/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
matchLabels:
app.kubernetes.io/name: "wordpress-01"
componentKinds:
- group: ""
- group: v1
kind: Service
- group: apps
kind: StatefulSet
Expand Down
2 changes: 1 addition & 1 deletion e2e/wordpress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var _ = Describe("Application status should be updated", func() {

list := &unstructured.UnstructuredList{}
list.SetGroupVersionKind(schema.GroupVersionKind{
Group: "",
Group: "v1",
Kind: "Service",
})
validateComponentOwnerReferences(kubeClient, list, matchingLabels)
Expand Down