operator-framework / olm-docs

Hugo doc site for https://github.com/operator-framework/operator-lifecycle-manager
10 stars 82 forks source link

Getting Started - out of date, failed installation of KeyCloak operator #108

Open ceastus opened 3 years ago

ceastus commented 3 years ago

Updates requested on three pages: Getting Started, install-operator-with-olm, and how-to-install-an-operator

Getting Started error: unable to read URL "https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.15.1/crds.yaml", server reported 404 Not Found, status code=404

Setting olm_release=v0.17.0 and applying both crds.yaml and olm.yaml completes successfully, however, I am unable to successfully follow the remaining steps to create an operator for KeyCloak. The verification commands yielded the expected results. I followed the steps to create the OperatorGroup and the Subscription, each completing without error, but errors are logged as events in the default namespace.

operatorgroup.operators.coreos.com/svcs-operators created
subscription.operators.coreos.com/keycloak-sub created

The description of operatorgroup.operators.coreos.com/svcs-operators in the "svcs" namespace looks clean. The description of subscription.operators.coreos.com/keycloak-sub in the "svcs" namespace looks clean.

Spec:
  Channel:                alpha
  Install Plan Approval:  Manual
  Name:                   keycloak-op
  Source:                 operatorhubio-catalog
  Source Namespace:       olm
Status:
  Catalog Health:
    Catalog Source Ref:
      API Version:       operators.coreos.com/v1alpha1
      Kind:              CatalogSource
      Name:              operatorhubio-catalog
      Namespace:         olm
      Resource Version:  479420
      UID:               daf1981b-4f59-4675-baac-a10bf4264524
    Healthy:             true
    Last Updated:        2021-02-17T13:08:51Z
  Conditions:
    Last Transition Time:  2021-02-17T13:08:51Z
    Message:               all available catalogsources are healthy
    Reason:                AllCatalogSourcesHealthy
    Status:                False
    Type:                  CatalogSourcesUnhealthy
  Last Updated:            2021-02-17T13:08:51Z
Events:                    <none>

Global events:

olm              0s          Normal    Created               pod/packageserver-7d8b9d75b4-2vxck       Created container packageserver
olm              0s          Normal    Created               pod/packageserver-7d8b9d75b4-rn9gc       Created container packageserver
olm              0s          Normal    Started               pod/packageserver-7d8b9d75b4-2vxck       Started container packageserver
olm              0s          Normal    Started               pod/packageserver-7d8b9d75b4-rn9gc       Started container packageserver

olm              0s          Normal    InstallWaiting        clusterserviceversion/packageserver      installing: waiting for deployment packageserver to become ready: Waiting for rollout to finish: 1 of 2 updated replicas are available...
olm              0s          Normal    InstallWaiting        clusterserviceversion/packageserver      installing: waiting for deployment packageserver to become ready: Waiting for rollout to finish: 1 of 2 updated replicas are available...
olm              0s          Normal    InstallSucceeded      clusterserviceversion/packageserver      install strategy completed with no errors
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op has a dependency without any candidates to satisfy it, keycloak-op is mandatory
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op is mandatory, keycloak-op has a dependency without any candidates to satisfy it
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op has a dependency without any candidates to satisfy it, keycloak-op is mandatory
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op has a dependency without any candidates to satisfy it, keycloak-op is mandatory
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op is mandatory, keycloak-op has a dependency without any candidates to satisfy it
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op is mandatory, keycloak-op has a dependency without any candidates to satisfy it
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op has a dependency without any candidates to satisfy it, keycloak-op is mandatory
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op is mandatory, keycloak-op has a dependency without any candidates to satisfy it
default          0s          Warning   ResolutionFailed      namespace/svcs                           constraints not satisfiable: keycloak-op has a dependency without any candidates to satisfy it, keycloak-op is mandatory

The installPlanApproval was set to Manual, so the next step should have been to approve the plan, but there is no plan. BTW, https://olm.operatorframework.io/docs/tasks/install-operator-with-olm/ is also out of date - it references the "approval" field.

kubectl get -A ip
No resources found

kubectl get operator
NAME               AGE
keycloak-op.svcs   18m

The operator was created anyway:

kubectl describe operator/keycloak-op.svcs
Name:         keycloak-op.svcs
Namespace:    
Labels:       <none>
Annotations:  <none>
API Version:  operators.coreos.com/v1
Kind:         Operator
Metadata:
  Creation Timestamp:  2021-02-17T13:08:51Z
  Generation:          1
  Managed Fields:
    API Version:  operators.coreos.com/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:spec:
      f:status:
        .:
        f:components:
          .:
          f:labelSelector:
            .:
            f:matchExpressions:
          f:refs:
    Manager:         olm
    Operation:       Update
    Time:            2021-02-17T13:08:51Z
  Resource Version:  479550
  Self Link:         /apis/operators.coreos.com/v1/operators/keycloak-op.svcs
  UID:               ef29a483-eed8-4c5e-98b2-0f3ceb51946c
Spec:
Events:  <none>

In the svcs namespace, I have the keycloak-sub subscription, no csvs, and no new deployments. Trying again with installPlanApproval set to Automatic didn't seem to help.

https://operatorhub.io/how-to-install-an-operator I deleted the olm and operators namespaces (I had to use the raw replace workaround to remove the "kubernetes" finalizer), deleted my operator, operatorgroup, and subscription, and tried the quickstart.yaml.

kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml

Some resources already existed. I created the OperatorGroup and Subscription just like before, with no errors. The same failures show up as events in the default namespace.

The "object" in the events is "namespace/svcs". Operators are not namespace-scoped, but the name of the op is "keycloak-op.svcs".