Skip to content

install ClusterOperator CRD as part of release payload #383

Closed

Description

@cgwalters

Currently we install it dynamically; this means the CVO is unaware of our status and won't e.g. error out if we start failing.

Doing this will be a way to get gating on degraded status.

Activity

  1. cgwalters commented on Feb 5, 2019

    @cgwalters
    MemberAuthor

    And then we'd need to start e.g.

    diff --git a/pkg/operator/status.go b/pkg/operator/status.go
    index 066f289..2d365a2 100644
    --- a/pkg/operator/status.go
    +++ b/pkg/operator/status.go
    @@ -114,12 +114,6 @@ func (optr *Operator) syncFailingStatus(ierr error) error {
     
     func (optr *Operator) fetchClusterOperator() (*configv1.ClusterOperator, error) {
     	co, err := optr.configClient.ConfigV1().ClusterOperators().Get(optr.name, metav1.GetOptions{})
    -	if meta.IsNoMatchError(err) {
    -		return nil, nil
    -	}
    -	if apierrors.IsNotFound(err) {
    -		return optr.initializeClusterOperator()
    -	}
     	if err != nil {
     		return nil, err
     	}
    

    Looking at the code in the CKCMO repo I think we need this:

    	v1helpers.EnsureOperatorConfigExists(
    		dynamicClient,
    		v311_00_assets.MustAsset("v3.11.0/kube-controller-manager/operator-config.yaml"),
    		schema.GroupVersionResource{Group: operatorv1.GroupName, Version: operatorv1.GroupVersion.Version, Resource: "kubecontrollermanagers"},
    	)
    
    
  2. runcom commented on Feb 6, 2019

    @runcom
    Member

    Looking at the code in the CKCMO repo I think we need this:

    (all boils down to https://github.com/openshift/cluster-version-operator/blob/master/docs/dev/clusteroperator.md also)

    Taking a stab at this if no one is already doing it

  3. runcom commented on Feb 6, 2019

    @runcom
    Member

    CVO will NOT install your clusteroperator

    @abhinavdahiya could you elaborate on that and tell me how to proceed? like, is there code you can point me to so I can check there? I assumed https://github.com/openshift/cluster-version-operator/blob/master/docs/dev/clusteroperator.md#why-i-want-clusteroperator-custom-resource-in-manifests would just take and apply the CO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions