stolostron / deploy

Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

example-multiclusterhub-cr.yaml in multiclusterhub/ is incomplete

drkho opened this issue · comments

Current example-multiclusterhub-cr.yaml in multiclusterhub is incomplete. After I replace it with the content from README, the deployment of ACM became successful.

apiVersion: operators.open-cluster-management.io/v1beta1
kind: MultiClusterHub
metadata:
  name: multiclusterhub
  namespace: open-cluster-management
spec:
  imageRepository: "quay.io/open-cluster-management"
  imageTagSuffix: SNAPSHOT-2020-04-21-17-28-34
  imagePullPolicy: Always
  imagePullSecret: multiclusterhub-operator-pull-secret

Expected content is (from README):

apiVersion: operators.open-cluster-management.io/v1beta1
kind: MultiClusterHub
metadata:
  name: example-multiclusterhub
  namespace: open-cluster-management
spec:
  version: latest
  imageRepository: "quay.io/open-cluster-management"
  imageTagSuffix: "SNAPSHOT-2020-03-17-21-24-18"
  imagePullPolicy: Always
  imagePullSecret: multiclusterhub-operator-pull-secret
  foundation:
    apiserver:
      configuration:
        http2-max-streams-per-connection: "1000"
      replicas: 1
      apiserverSecret: "mcm-apiserver-self-signed-secrets"
      klusterletSecret: "mcm-klusterlet-self-signed-secrets"
    controller:
      configuration:
        enable-rbac: "true"
        enable-service-registry: "true"
      replicas: 1
  mongo:
    endpoints: mongo-0.mongo.open-cluster-management
    replicaSet: rs0
  hive:
    additionalCertificateAuthorities:
      - name: letsencrypt-ca
    managedDomains:
      - s1.openshiftapps.com
    globalPullSecret:
      name: private-secret
    failedProvisionConfig:
      skipGatherLogs: true

Readme is out of date, sorry about that. @zkayyali812 made changes so this should work with updated version. @zkayyali812 can you take a look?

@drkho
This example in the README -

apiVersion: operators.open-cluster-management.io/v1beta1
kind: MultiClusterHub
metadata:
  name: example-multiclusterhub
  namespace: open-cluster-management
spec:
  version: latest
  imageRepository: "quay.io/open-cluster-management"
  imageTagSuffix: "SNAPSHOT-2020-03-17-21-24-18"
  imagePullPolicy: Always
  imagePullSecret: multiclusterhub-operator-pull-secret
  foundation:
    apiserver:
      configuration:
        http2-max-streams-per-connection: "1000"
      replicas: 1
      apiserverSecret: "mcm-apiserver-self-signed-secrets"
      klusterletSecret: "mcm-klusterlet-self-signed-secrets"
    controller:
      configuration:
        enable-rbac: "true"
        enable-service-registry: "true"
      replicas: 1
  mongo:
    endpoints: mongo-0.mongo.open-cluster-management
    replicaSet: rs0
  hive:
    additionalCertificateAuthorities:
      - name: letsencrypt-ca
    managedDomains:
      - s1.openshiftapps.com
    globalPullSecret:
      name: private-secret
    failedProvisionConfig:
      skipGatherLogs: true

is using an older snapshot and format, and this example should be updated

Although the first example is valid. I tested this on a fresh cluster using this deploy repo with and it deployed successfully -

apiVersion: operators.open-cluster-management.io/v1beta1
kind: MultiClusterHub
metadata:
  name: multiclusterhub
  namespace: open-cluster-management
spec:
  imageRepository: "quay.io/open-cluster-management"
  imageTagSuffix: SNAPSHOT-2020-04-21-17-28-34
  imagePullPolicy: Always
  imagePullSecret: multiclusterhub-operator-pull-secret

Using -

Client Version: openshift-clients-4.3.7-202003130552
Server Version: 4.3.10
Kubernetes Version: v1.16.2

Are you still seeing this error, and if so can you update with your version info and any logs?

@zkayyali812 I actually used SNAPSHOT-2020-04-21-17-28-34 in both versions of multiclusterhub/example-multiclusterhub-cr.yaml (including the one in README).

This was the error when I used the short version (the first one).

[ec2-user@dho-449-04-17-14-install deploy]$ kubectl apply -f multiclusterhub/
unable to recognize "multiclusterhub/example-multiclusterhub-cr.yaml": no matches for kind "MultiClusterHub" in version "operators.open-cluster-management.io/v1alpha1"
unable to recognize "multiclusterhub/kustomization.yaml": no matches for kind "Kustomization" in version "kustomize.config.k8s.io/v1beta1"

However, as I first commented, I was able to deploy ACM when I used the one in README (with the new SNAPSHOT).

And the funny thing now is that I just uninstalled and switched back to the short version. The ACM can be deployed now. I am not sure what made the difference. 🤷‍♂️

Btw, my ocp is at 4.4.0-rc.9 version.

[ec2-user@dho-449-04-17-14-install deploy]$ oc version
Client Version: 4.4.0-rc.9
Server Version: 4.4.0-rc.9
Kubernetes Version: v1.17.1

I wonder if the previously successful installation has helped the subsequent attempt.

Im assuming this is due to an update we put in place yesterday, perhaps you didnt have the latest master when previously running an install? As we had updated the apiversion from v1alpha1 to v1beta1