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

CSV keeps pending due to "CSV missing minimum kube version specification" #43

Closed
gyliu513 opened this issue Aug 19, 2019 · 9 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. triage/support Indicates an issue that is a support question.

Comments

@gyliu513
Copy link
Contributor

gyliu513 commented Aug 19, 2019

I followed the document at https://github.com/operator-framework/getting-started/blob/master/README.md#deploy-the-operator to deploy the CSV, but the CSV keeps pending due to following errors of CSV missing minimum kube version specification.

root@gyliu-dev1:~/test# kubectl get ClusterServiceVersion memcachedoperator.v0.0.1 -o json | jq '.status'
{
  "certsLastUpdated": null,
  "certsRotateAt": null,
  "conditions": [
    {
      "lastTransitionTime": "2019-08-19T06:57:16Z",
      "lastUpdateTime": "2019-08-19T06:57:16Z",
      "message": "requirements not yet checked",
      "phase": "Pending",
      "reason": "RequirementsUnknown"
    },
    {
      "lastTransitionTime": "2019-08-19T06:57:16Z",
      "lastUpdateTime": "2019-08-19T06:57:16Z",
      "message": "one or more requirements couldn't be found",
      "phase": "Pending",
      "reason": "RequirementsNotMet"
    }
  ],
  "lastTransitionTime": "2019-08-19T06:57:16Z",
  "lastUpdateTime": "2019-08-19T06:57:16Z",
  "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 present and Established condition is true",
      "name": "memcacheds.cache.example.com",
      "status": "Present",
      "uuid": "51b571c2-c24e-11e9-be38-0242d843cc68",
      "version": "v1beta1"
    },
    {
      "dependents": [
        {
          "group": "rbac.authorization.k8s.io",
          "kind": "PolicyRule",
          "message": "namespaced rule:{\"verbs\":[\"*\"],\"apiGroups\":[\"\"],\"resources\":[\"pods\",\"services\",\"endpoints\",\"persistentvolumeclaims\",\"events\",\"configmaps\",\"secrets\"]}",
          "status": "Satisfied",
          "version": "v1beta1"
        },
        {
          "group": "rbac.authorization.k8s.io",
          "kind": "PolicyRule",
          "message": "namespaced rule:{\"verbs\":[\"get\"],\"apiGroups\":[\"\"],\"resources\":[\"namespaces\"]}",
          "status": "NotSatisfied",
          "version": "v1beta1"
        },
        {
          "group": "rbac.authorization.k8s.io",
          "kind": "PolicyRule",
          "message": "namespaced rule:{\"verbs\":[\"*\"],\"apiGroups\":[\"apps\"],\"resources\":[\"deployments\",\"daemonsets\",\"replicasets\",\"statefulsets\"]}",
          "status": "Satisfied",
          "version": "v1beta1"
        },
        {
          "group": "rbac.authorization.k8s.io",
          "kind": "PolicyRule",
          "message": "namespaced rule:{\"verbs\":[\"get\",\"create\"],\"apiGroups\":[\"monitoring.coreos.com\"],\"resources\":[\"servicemonitors\"]}",
          "status": "Satisfied",
          "version": "v1beta1"
        },
        {
          "group": "rbac.authorization.k8s.io",
          "kind": "PolicyRule",
          "message": "namespaced rule:{\"verbs\":[\"update\"],\"apiGroups\":[\"apps\"],\"resources\":[\"deployments/finalizers\"],\"resourceNames\":[\"memcached-operator\"]}",
          "status": "Satisfied",
          "version": "v1beta1"
        },
        {
          "group": "rbac.authorization.k8s.io",
          "kind": "PolicyRule",
          "message": "namespaced rule:{\"verbs\":[\"*\"],\"apiGroups\":[\"cache.example.com\"],\"resources\":[\"*\"]}",
          "status": "Satisfied",
          "version": "v1beta1"
        }
      ],
      "group": "",
      "kind": "ServiceAccount",
      "message": "Policy rule not satisfied for service account",
      "name": "memcached-operator",
      "status": "PresentNotSatisfied",
      "version": "v1"
    }
  ]
}
@gyliu513 gyliu513 changed the title CSV keeps pending due to CSV keeps pending due to "CSV missing minimum kube version specification" Aug 19, 2019
@gyliu513
Copy link
Contributor Author

root@gyliu-dev1:~/test# kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-03-20T16:54:39Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
root@gyliu-dev1:~/test# operator-sdk version
operator-sdk version: v0.10.0-3-g9d6ffdd, commit: 9d6ffddcd86fba2bf56191b55f61215675aee3f1

@camilamacedo86
Copy link
Contributor

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/ https://github.com/operator-framework/community-operators/tree/master/upstream-community-operators.

@camilamacedo86 camilamacedo86 added kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. and removed kind/bug Categorizes issue or PR as related to a bug. labels Oct 23, 2019
@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Oct 23, 2019

Hi @gyliu513,

I have been working a PR operator-framework/operator-sdk#2095 in order to try to make clear that this field is required and avoid the msg that the min Kube version is missing.

I remember that I said it in other OLM/CSV issue raised by you and give some examples, however, it is important to highlight, that the issues faced are because the example is outdated and not exactly the min Kube version.

@gyliu513
Copy link
Contributor Author

Thanks @camilamacedo86 , got it. Any latest example that I can try?

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Oct 24, 2019

HI @gyliu513,

My proposal to this doc to try to make what/how is required to do more understandable and easier is in the PR #57. It is essential to highlight that it is just an idea/suggestion and needs the consent of the others too, however, you are free to check.

So, please let me know if this PR help you have a better understanding and get it done. See that new links/examples are associated with it as well. Note that to check it I'd suggested to you follow up all using the SDK version v0.11.0.

Currently, the SDK can help you integrate your project with OLM by generating the CSV file, but it needs to be updated as described there. Then, it is required to create the OLM bundle and follow its steps to test the project locally.

The project has some PRs and proposals for improvements in these areas well. See, for example, operator-framework/operator-sdk#1162 (which may help you to generate the file) and operator-framework/operator-sdk#1913.

I hope that it helps you with.

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Oct 24, 2019

HI @gyliu513,

In order to help you with. See a PR to upgrade the Memcached sample to use SDK 0.11.

Also, if you wish to try to use operator-framework/operator-sdk#1162 to generate the CSV file in your projects, the see here my personal project which I used this PR to do the file. May it helps you check how to use the metadatas in the type to do that. This project is available in the operatorHub and you can check/test/use it as well if you wish.

@gyliu513
Copy link
Contributor Author

@camilamacedo86 I will do some test for this. Thanks!

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Oct 31, 2019

Hi @gyliu513,

I'd like to share that since the minKubeVersion is not a requirement for the project works in the OLM we raised an issue for it be fixed/changed. See operator-framework/operator-lifecycle-manager#1093 which is solved now.

Thank you for raising it.

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Nov 5, 2019

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 as we could address the change/fix regards the minKubeVersion to make it more clear in the OLM project as well.(See operator-framework/operator-lifecycle-manager#1093)

In this way, I am closing this task. However, please, feel free to re-open if you see that still required.

@camilamacedo86 camilamacedo86 added kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

2 participants