Skip to content
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
12 changes: 6 additions & 6 deletions Gopkg.lock

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

10 changes: 9 additions & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ required = [
name = "github.com/openshift/cluster-api"
revision = "91fca585a85b163ddfd119fd09c128c9feadddca"

[[override]]
name = "github.com/openshift/api"
branch = "master"

[[override]]
name = "github.com/openshift/client-go"
branch = "master"

[[override]]
name = "k8s.io/code-generator"
# revision for tag "kubernetes-1.11.2"
Expand All @@ -58,7 +66,7 @@ required = [
name = "k8s.io/client-go"
# revision for tag "kubernetes-1.11.2"
revision = "1f13a808da65775f22cbf47862c4e5898d8f4ca1"

[[override]]
name = "sigs.k8s.io/controller-runtime"
version = "v0.1.4"
Expand Down
5 changes: 5 additions & 0 deletions install/0000_30_machine-api-operator_15_clusteroperator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
name: machine-api
spec: {}
23 changes: 20 additions & 3 deletions pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const (
ReasonSyncFailed StatusReason = "SyncingFailed"
)

const (
clusterOperatorName = "machine-api"
)

// statusProgressing sets the Progressing condition to True, with the given
// reason and message, and sets both the Available and Failing conditions to
// False.
Expand Down Expand Up @@ -97,13 +101,26 @@ func (optr *Operator) statusFailing(reason StatusReason, message string) error {
//syncStatus applies the new condition to the mao ClusterOperator object.
func (optr *Operator) syncStatus(conds []osconfigv1.ClusterOperatorStatusCondition) error {
// to report the status of all the managed components.
// TODO we will report the version of the operands (so our machine api implementation version)
// NOTE: related objects lets openshift/must-gather collect diagnostic content
clusterOperator := &osconfigv1.ClusterOperator{
ObjectMeta: metav1.ObjectMeta{
Namespace: optr.namespace,
Name: optr.name,
Name: clusterOperatorName,
},
Status: osconfigv1.ClusterOperatorStatus{
Version: version.Raw,
Versions: []osconfigv1.OperandVersion{
{
Name: "machine-api",
Version: version.Raw,
},
},
RelatedObjects: []osconfigv1.ObjectReference{
{
Group: "",
Resource: "namespaces",
Name: optr.namespace,
},
},
},
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/operator_expectations.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (tc *testConfig) ExpectOneClusterObject() error {
}

func (tc *testConfig) ExpectClusterOperatorStatusAvailable() error {
name := "machine-api-operator"
name := "machine-api"
key := types.NamespacedName{
Namespace: namespace,
Name: name,
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.

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

Loading