Skip to content

Commit

Permalink
Merge pull request #391 from mgugino-upstream-stage/related-resources
Browse files Browse the repository at this point in the history
Add machine resource to related objects
  • Loading branch information
openshift-merge-robot committed Sep 3, 2019
2 parents a094922 + 27ee9f7 commit 474e14e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/operator/status.go
Expand Up @@ -185,6 +185,18 @@ func (optr *Operator) getOrCreateClusterOperator() (*osconfigv1.ClusterOperator,
Resource: "namespaces",
Name: optr.namespace,
},
{
Group: "machine.openshift.io",
Resource: "machines",
Name: "",
Namespace: optr.namespace,
},
{
Group: "machine.openshift.io",
Resource: "machinesets",
Name: "",
Namespace: optr.namespace,
},
}
if !equality.Semantic.DeepEqual(co.Status.RelatedObjects, relatedObjects) {
co.Status.RelatedObjects = relatedObjects
Expand Down
24 changes: 24 additions & 0 deletions pkg/operator/status_test.go
Expand Up @@ -165,6 +165,18 @@ func TestGetOrCreateClusterOperator(t *testing.T) {
Resource: "namespaces",
Name: namespace,
},
{
Group: "machine.openshift.io",
Resource: "machines",
Name: "",
Namespace: namespace,
},
{
Group: "machine.openshift.io",
Resource: "machinesets",
Name: "",
Namespace: namespace,
},
},
},
},
Expand All @@ -189,6 +201,18 @@ func TestGetOrCreateClusterOperator(t *testing.T) {
Resource: "namespaces",
Name: namespace,
},
{
Group: "machine.openshift.io",
Resource: "machines",
Name: "",
Namespace: namespace,
},
{
Group: "machine.openshift.io",
Resource: "machinesets",
Name: "",
Namespace: namespace,
},
},
Conditions: conditions,
},
Expand Down

0 comments on commit 474e14e

Please sign in to comment.