Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.

CSV resources status was not updated after creating some required resources #44

Closed
gyliu513 opened this issue Aug 19, 2019 · 7 comments
Closed
Assignees
Labels
triage/support Indicates an issue that is a support question.

Comments

@gyliu513
Copy link
Contributor

I followed the document at https://github.com/operator-framework/getting-started/blob/master/README.md#deploy-the-operator to deploy the CSV resource, the steps are as follows:

  1. Create the CSV first, but due to some required resources missing, the CSV keeps pending.
root@gyliu-dev1:~/test# kubectl get ClusterServiceVersion memcachedoperator.v0.0.1 -o json | jq '.status'
{
  "certsLastUpdated": null,
  "certsRotateAt": null,
  "conditions": [
    {
      "lastTransitionTime": "2019-08-19T06:53:50Z",
      "lastUpdateTime": "2019-08-19T06:53:50Z",
      "message": "requirements not yet checked",
      "phase": "Pending",
      "reason": "RequirementsUnknown"
    },
    {
      "lastTransitionTime": "2019-08-19T06:53:50Z",
      "lastUpdateTime": "2019-08-19T06:53:50Z",
      "message": "one or more requirements couldn't be found",
      "phase": "Pending",
      "reason": "RequirementsNotMet"
    }
  ],
  "lastTransitionTime": "2019-08-19T06:53:50Z",
  "lastUpdateTime": "2019-08-19T06:53:50Z",
  "message": "one or more requirements couldn't be found",
  "phase": "Pending",
  "reason": "RequirementsNotMet",
  "requirementStatus": [
    {
      "group": "operators.coreos.com",
      "kind": "ClusterServiceVersion",
      "message": "CSV missing minimum kube version specification",
      "name": "memcachedoperator.v0.0.1",
      "status": "NotPresent",
      "version": "v1alpha1"
    },
    {
      "group": "apiextensions.k8s.io",
      "kind": "CustomResourceDefinition",
      "message": "CRD is not present",
      "name": "memcacheds.cache.example.com",
      "status": "NotPresent",
      "version": "v1beta1"
    },
    {
      "group": "",
      "kind": "ServiceAccount",
      "message": "Service account does not exist",
      "name": "memcached-operator",
      "status": "NotPresent",
      "version": "v1"
    }
  ]
}
  1. Then I create the required CRD, SA etc, but the CVS status was not updated, and it keeps in above status.
@camilamacedo86 camilamacedo86 added the triage/support Indicates an issue that is a support question. label Sep 4, 2019
@camilamacedo86 camilamacedo86 self-assigned this Sep 4, 2019
@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Sep 4, 2019

HI @gyliu513,

Thank you for raise it. I will try to follow up these steps and I will let you know.
Could you please let us know what version of operator-sdk are you using? Could you please run operator-sdk version and add it here?

@gyliu513
Copy link
Contributor Author

gyliu513 commented Sep 4, 2019

@camilamacedo86

root@gyliu-dev1:~# operator-sdk version
operator-sdk version: v0.10.0-3-g9d6ffdd, commit: 9d6ffddcd86fba2bf56191b55f61215675aee3f1

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Sep 25, 2019

Hi @gyliu513,

I just would like to share with you that I am waiting for we are able to merge the PR operator-framework/operator-sdk#1162 because then we can update the CSV example easily. This file shows outdated.

If you wish to check some examples to see how it works, I'd recommend giving a look in the files used by the opers which are published in the https://operatorhub.io/ in https://github.com/operator-framework/community-operators/tree/master/upstream-community-operators.

@gyliu513
Copy link
Contributor Author

Thanks @camilamacedo86 , let me check.

@camilamacedo86
Copy link
Contributor

Hi @gyliu513,

The OLM steps in the Getting Started as its example was updated in the #57 in order to address this issue as well. Then, I am closing this task. However, please, feel free to re-open if you see that still required.

@shuawest
Copy link

I am getting this issue still. When I look at #57 its not clear what the root cause of the issue is. I'm trying to update an existing operator. The operator I'm working on has 3 CRDs. The first main CRD is found, but the additional ones state "CRD is not present". Is the root issue due to:
a) incorrect CSV?
b) incorrect generated code in the Operator go code?

@tahmmee
Copy link

tahmmee commented Aug 14, 2020

I had versioned CRD's and hit this issue with CSV going into pending. The solution is very strange because basically I needed to sort the version section such that v2 came BEFORE v1.

  versions:
  - name: v2
    served: true
    storage: true
  - name: v1
    served: true
    storage: false

This was the only change I made to CRDs, no CSV change and it worked. ::shrug::

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

4 participants