camunda-community-hub / zeebe-operator

Zeebe Kubernetes Operator
Apache License 2.0
7 stars 3 forks source link

cannot list resource in API group at the cluster scope #9

Closed zhaoyanj closed 4 years ago

zhaoyanj commented 4 years ago

Hi, I'm following the instructions at this zeebe-operator tutorial.

However, on installing zeebe-operator via Helm, the container encounters an error:

$ kubectl get pod -n zhao-zeebe-operator 
NAME                                                  READY   STATUS    RESTARTS   AGE
tekton-pipelines-controller-586c6f8dd9-xqzjw          1/1     Running   0          7m9s
tekton-pipelines-webhook-56b6867945-pn7bd             1/1     Running   0          7m9s
zhao-zeebe-operator-zeebe-operator-866668cb77-pb752   1/1     Running   0          7m9s

$ kubectl logs --tail=20  zhao-zeebe-operator-zeebe-operator-866668cb77-pb752
E0914 06:51:59.608958       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Workflow: workflows.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "workflows" in API group "zeebe.io" at the cluster scope
E0914 06:51:59.666694       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ZeebeCluster: zeebeclusters.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "zeebeclusters" in API group "zeebe.io" at the cluster scope
E0914 06:51:59.667760       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Service: services is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "services" in API group "" at the cluster scope
E0914 06:52:00.259578       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "configmaps" in API group "" at the cluster scope
E0914 06:52:00.269689       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.StatefulSet: statefulsets.apps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "statefulsets" in API group "apps" at the cluster scope
E0914 06:52:00.611026       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Workflow: workflows.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "workflows" in API group "zeebe.io" at the cluster scope
E0914 06:52:00.668450       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ZeebeCluster: zeebeclusters.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "zeebeclusters" in API group "zeebe.io" at the cluster scope
E0914 06:52:00.669439       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Service: services is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "services" in API group "" at the cluster scope
E0914 06:52:01.261817       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "configmaps" in API group "" at the cluster scope
E0914 06:52:01.271403       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.StatefulSet: statefulsets.apps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "statefulsets" in API group "apps" at the cluster scope
E0914 06:52:01.613157       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Workflow: workflows.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "workflows" in API group "zeebe.io" at the cluster scope
E0914 06:52:01.670052       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ZeebeCluster: zeebeclusters.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "zeebeclusters" in API group "zeebe.io" at the cluster scope
E0914 06:52:01.671114       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Service: services is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "services" in API group "" at the cluster scope
E0914 06:52:02.263949       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "configmaps" in API group "" at the cluster scope
E0914 06:52:02.273246       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.StatefulSet: statefulsets.apps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "statefulsets" in API group "apps" at the cluster scope
E0914 06:52:02.615205       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Workflow: workflows.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "workflows" in API group "zeebe.io" at the cluster scope
E0914 06:52:02.672258       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ZeebeCluster: zeebeclusters.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "zeebeclusters" in API group "zeebe.io" at the cluster scope
E0914 06:52:02.672725       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Service: services is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "services" in API group "" at the cluster scope
E0914 06:52:03.266423       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "configmaps" in API group "" at the cluster scope
E0914 06:52:03.275045       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.StatefulSet: statefulsets.apps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "statefulsets" in API group "apps" at the cluster scope

What's going on here?

salaboy commented 4 years ago

@zhaoyanj hi there.. thanks for reporting this back. Can you run helm list to share the Operator Helm Chart version that you are using? So I can try to reproduce that.. Are you using Helm 3+? It looks like the CRDs are not being installed in your cluster for some reason. Also, can you share in which cloud provider are you running the Operator?

zhaoyanj commented 4 years ago

@zhaoyanj hi there.. thanks for reporting this back. Can you run helm list to share the Operator Helm Chart version that you are using? So I can try to reproduce that.. Are you using Helm 3+? It looks like the CRDs are not being installed in your cluster for some reason. Also, can you share in which cloud provider are you running the Operator?

Hi, thanks for your reply. I change to helm3 to reinstall it. And i am running the operator locally.

$ helm3 version
version.BuildInfo{Version:"v3.2.1", GitCommit:"fe51cd1e31e6a202cba7dead9552a6d418ded79a", GitTreeState:"clean", GoVersion:"go1.13.10"}

$ helm3 list
NAME                        NAMESPACE           REVISION    UPDATED                                 STATUS      CHART                   APP VERSION
zeebe-operator-1600135057   zhao-zeebe-operator 1           2020-09-15 09:57:37.661025595 +0800 CST deployed    zeebe-operator-0.0.90   0.0.90

But the error still exists.

$ kubectl get pod -n zhao-zeebe-operator 
NAME                                                        READY   STATUS    RESTARTS   AGE
tekton-pipelines-controller-586c6f8dd9-wvhqh                1/1     Running   0          16m
tekton-pipelines-webhook-56b6867945-wcl86                   1/1     Running   0          16m
zeebe-operator-1600135057-zeebe-operator-7d754d6897-x86b9   1/1     Running   0          16m

$ kubectl logs --tail=10 zeebe-operator-1600135057-zeebe-operator-7d754d6897-x86b9 -n zhao-zeebe-operator 
E0915 02:14:21.324238       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ZeebeCluster: zeebeclusters.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "zeebeclusters" in API group "zeebe.io" at the cluster scope
E0915 02:14:21.602042       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "configmaps" in API group "" at the cluster scope
E0915 02:14:21.762843       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Service: services is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "services" in API group "" at the cluster scope
E0915 02:14:21.865161       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Workflow: workflows.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "workflows" in API group "zeebe.io" at the cluster scope
E0915 02:14:21.888030       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.StatefulSet: statefulsets.apps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "statefulsets" in API group "apps" at the cluster scope
E0915 02:14:22.326514       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ZeebeCluster: zeebeclusters.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "zeebeclusters" in API group "zeebe.io" at the cluster scope
E0915 02:14:22.604686       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "configmaps" in API group "" at the cluster scope
E0915 02:14:22.765082       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Service: services is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "services" in API group "" at the cluster scope
E0915 02:14:22.867336       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.Workflow: workflows.zeebe.io is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "workflows" in API group "zeebe.io" at the cluster scope
E0915 02:14:22.890019       1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1.StatefulSet: statefulsets.apps is forbidden: User "system:serviceaccount:zhao-zeebe-operator:default" cannot list resource "statefulsets" in API group "apps" at the cluster scope

Looking forward to your reply.

salaboy commented 4 years ago

@zhaoyanj hi there.. thanks for sharing those details, I will try to reproduce the issue, but I need to know which Kubernetes installation are you using and which version. Are you using Minikube, Docker For Mac Kubernetes, KIND? The error is clearly related with a service account, so we need to figure out why that is not getting installed for you, and I cannot reproduce it unless I know where are you trying to run it.

zhaoyanj commented 4 years ago

@zhaoyanj hi there.. thanks for sharing those details, I will try to reproduce the issue, but I need to know which Kubernetes installation are you using and which version. Are you using Minikube, Docker For Mac Kubernetes, KIND? The error is clearly related with a service account, so we need to figure out why that is not getting installed for you, and I cannot reproduce it unless I know where are you trying to run it.

Hi, thanks for your reply. I create a cluster with kubeadm.

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:43:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

And i find there is something wrong with clusterrolebinding.

$ kubectl get clusterrolebinding -o wide
NAME                                                   ROLE                                                                               AGE     USERS                            GROUPS                                            SERVICEACCOUNTS
zeebe-operator-rolebinding                             ClusterRole/zeebe-operator-role                                                    145m                                                                                       default/default

So i create a new clusterrolebinding.

$ kubectl get clusterrolebinding -o wide
NAME                                                   ROLE                                                                               AGE     USERS                            GROUPS                                            SERVICEACCOUNTS
zeebe-operator-rolebinding-ns                          ClusterRole/zeebe-operator-role                                                    3h29m                                                                                      zhao-zeebe-operator/default

And the previous error is gone, but a new error appears in the log of operator.

 2020-09-16T06:21:39.264Z   ERROR   controllers.ZeebeCluster    Error Creating task {"zeebecluster": "default", "error": "Internal error occurred: failed calling webhook \"webhook.tekton.dev\": Post https://tekton-pipelines-webhook.zhao-zeebe-operator.svc:443/?timeout=30s: context deadline exceeded"}
github.com/go-logr/zapr.(*zapLogger).Error
    /home/jenkins/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128
zeebe-operator/controllers.(*PipelineRunner).createTaskAndTaskRunDelete
    /workspace/source/controllers/zeebecluster_controller.go:155
zeebe-operator/controllers.(*ZeebeClusterReconciler).Reconcile
    /workspace/source/controllers/zeebecluster_controller.go:271
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:216
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:192
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:171
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:88
2020-09-16T06:21:39.264Z    INFO    controllers.ZeebeCluster    > Creating Task:    {"zeebecluster": "default", "task": {"metadata":{"name":"delete-task-my-zeebe-cluster-cf6902ae-f7e4-11ea-8433-eed2f0a81ddb","namespace":"default","creationTimestamp":null},"spec":{"inputs":{"resources":[{"name":"zeebe-version-stream","type":"git"}]},"steps":[{"name":"clone-base-helm-chart","image":"gcr.io/camunda-consulting-de/helm-builder:0.0.1","command":["make","-C","/workspace/zeebe-version-stream/","delete"],"env":[{"name":"CLUSTER_NAME","value":"my-zeebe-cluster"}],"resources":{}}]}}}
2020-09-16T06:21:39.264Z    INFO    controllers.ZeebeCluster    > Creating TaskRun:     {"zeebecluster": "default", "taskrun": {"metadata":{"name":"delete-task-run-my-zeebe-cluster","namespace":"default","creationTimestamp":null},"spec":{"inputs":{"resources":[{"name":"zeebe-version-stream","resourceRef":{"name":"zeebe-version-stream"}}]},"outputs":{},"serviceAccountName":"tekton-bot","serviceAccount":"tekton-bot","taskRef":{"name":"delete-task-my-zeebe-cluster-cf6902ae-f7e4-11ea-8433-eed2f0a81ddb"},"timeout":"1h0m0s","podTemplate":{}},"status":{"podName":""}}}

Thanks for your help.

salaboy commented 4 years ago

@zhaoyanj It will be quite difficult for me to reproduce with a cluster created with kubeadm as most users will use a cloud provider or one of the popular ones that you can run on your laptop like minikube or KIND. There are a lot of things that can go wrong with a cluster created with kubeadm that it will be quite difficult to trouble shoot your errors. it might not be even related with the zeebe-operator itself. This last error sounds more like the cluster cannot connect to external sites. The Zeebe Operator is designed to fetch existing helm chart hosted in http://helm.zeebe.io hence Tekton creates a webhook to a Git Repository where the definition of the charts are stored. But without having more details about why is that failing it is quite difficult to understand if that is the reason or not. Can you check the tekton pods log?

zhaoyanj commented 4 years ago

@zhaoyanj It will be quite difficult for me to reproduce with a cluster created with kubeadm as most users will use a cloud provider or one of the popular ones that you can run on your laptop like minikube or KIND. There are a lot of things that can go wrong with a cluster created with kubeadm that it will be quite difficult to trouble shoot your errors. it might not be even related with the zeebe-operator itself. This last error sounds more like the cluster cannot connect to external sites. The Zeebe Operator is designed to fetch existing helm chart hosted in http://helm.zeebe.io hence Tekton creates a webhook to a Git Repository where the definition of the charts are stored. But without having more details about why is that failing it is quite difficult to understand if that is the reason or not. Can you check the tekton pods log?

Hi, the logs of tekton pods are as follows.

$ kubectl logs -f tekton-pipelines-webhook-56b6867945-49t9h
{"level":"info","caller":"logging/config.go:100","msg":"Successfully created the logger.","knative.dev/jsonconfig":"{\n  \"level\": \"info\",\n  \"development\": false,\n  \"sampling\": {\n    \"initial\": 100,\n    \"thereafter\": 100\n  },\n  \"outputPaths\": [\"stdout\"],\n  \"errorOutputPaths\": [\"stderr\"],\n  \"encoding\": \"json\",\n  \"encoderConfig\": {\n    \"timeKey\": \"\",\n    \"levelKey\": \"level\",\n    \"nameKey\": \"logger\",\n    \"callerKey\": \"caller\",\n    \"messageKey\": \"msg\",\n    \"stacktraceKey\": \"stacktrace\",\n    \"lineEnding\": \"\",\n    \"levelEncoder\": \"\",\n    \"timeEncoder\": \"\",\n    \"durationEncoder\": \"\",\n    \"callerEncoder\": \"\"\n  }\n}\n"}
{"level":"info","caller":"logging/config.go:101","msg":"Logging level set to info"}
{"level":"info","caller":"logging/config.go:69","msg":"Fetch GitHub commit ID from kodata failed: open /var/run/ko/HEAD: no such file or directory"}
{"level":"info","logger":"webhook","caller":"webhook/main.go:56","msg":"Starting the Configuration Webhook","knative.dev/controller":"webhook"}
{"level":"info","logger":"webhook.config-store","caller":"configmap/store.go:169","msg":"defaults config \"config-defaults\" config was added or updated: &config.Defaults{DefaultTimeoutMinutes:60, DefaultServiceAccount:\"\"}","knative.dev/controller":"webhook"}
{"level":"info","logger":"webhook","caller":"webhook/webhook.go:296","msg":"Did not find existing secret, creating one","knative.dev/controller":"webhook"}
{"level":"info","logger":"webhook","caller":"webhook/webhook.go:159","msg":"Found certificates for webhook...","knative.dev/controller":"webhook"}
{"level":"info","logger":"webhook","caller":"webhook/resource_admission_controller.go:193","msg":"Created a webhook","knative.dev/controller":"webhook"}
{"level":"info","logger":"webhook","caller":"webhook/webhook.go:172","msg":"Successfully registered webhook","knative.dev/controller":"webhook"}
$ kubectl logs -f tekton-pipelines-controller-75c8778b69-nkh7k
2020/09/16 08:27:43 Registering 3 clients
2020/09/16 08:27:43 Registering 2 informer factories
2020/09/16 08:27:43 Registering 8 informers
2020/09/16 08:27:43 Registering 2 controllers
{"level":"info","caller":"logging/config.go:100","msg":"Successfully created the logger.","knative.dev/jsonconfig":"{\n  \"level\": \"info\",\n  \"development\": false,\n  \"sampling\": {\n    \"initial\": 100,\n    \"thereafter\": 100\n  },\n  \"outputPaths\": [\"stdout\"],\n  \"errorOutputPaths\": [\"stderr\"],\n  \"encoding\": \"json\",\n  \"encoderConfig\": {\n    \"timeKey\": \"\",\n    \"levelKey\": \"level\",\n    \"nameKey\": \"logger\",\n    \"callerKey\": \"caller\",\n    \"messageKey\": \"msg\",\n    \"stacktraceKey\": \"stacktrace\",\n    \"lineEnding\": \"\",\n    \"levelEncoder\": \"\",\n    \"timeEncoder\": \"\",\n    \"durationEncoder\": \"\",\n    \"callerEncoder\": \"\"\n  }\n}\n"}
{"level":"info","caller":"logging/config.go:101","msg":"Logging level set to info"}
{"level":"info","caller":"logging/config.go:69","msg":"Fetch GitHub commit ID from kodata failed: open /var/run/ko/HEAD: no such file or directory"}
{"level":"info","logger":"tekton.taskrun-controller","caller":"taskrun/controller.go:85","msg":"Setting up event handlers","knative.dev/controller":"taskrun-controller"}
{"level":"info","logger":"tekton.taskrun-controller","caller":"taskrun/controller.go:100","msg":"Setting up Entrypoint cache","knative.dev/controller":"taskrun-controller"}
{"level":"info","logger":"tekton.pipeline-controller","caller":"pipelinerun/controller.go:89","msg":"Setting up event handlers","knative.dev/controller":"pipeline-controller"}
{"level":"info","logger":"tekton.pipeline-controller","caller":"pipelinerun/controller.go:101","msg":"Setting up ConfigMap receivers","knative.dev/controller":"pipeline-controller"}
{"level":"info","logger":"tekton","caller":"profiling/server.go:60","msg":"Profiling enabled: false"}
{"level":"info","logger":"tekton","caller":"metrics/config.go:234","msg":"Flushing the existing exporter before setting up the new exporter."}
{"level":"info","logger":"tekton","caller":"metrics/prometheus_exporter.go:37","msg":"Created Opencensus Prometheus exporter with config: &{tekton.dev/pipeline tekton prometheus 5000000000 9090  false false  }. Start the server for Prometheus exporter."}
{"level":"info","logger":"tekton","caller":"metrics/config.go:243","msg":"Successfully updated the metrics exporter; old config: <nil>; new config &{tekton.dev/pipeline tekton prometheus 5000000000 9090  false false  }"}
{"level":"info","logger":"tekton.pipeline-controller.config-store","caller":"configmap/store.go:169","msg":"pipelinerun config \"config-artifact-bucket\" config was added or updated: &v1alpha1.ArtifactBucket{Name:\"\", Location:\"\", Secrets:[]v1alpha1.SecretParam(nil), BashNoopImage:\"gcr.io/abayer-pipeline-crd/tekton-for-jx/bash:v20200414-2b72e7c6\", GsutilImage:\"gcr.io/abayer-pipeline-crd/tekton-for-jx/gsutil:v20200414-2b72e7c6\"}","knative.dev/controller":"pipeline-controller"}
{"level":"info","logger":"tekton","caller":"sharedmain/main.go:150","msg":"Starting informers."}
{"level":"info","logger":"tekton","caller":"sharedmain/main.go:156","msg":"Starting controllers..."}
{"level":"info","logger":"tekton.taskrun-controller","caller":"controller/controller.go:280","msg":"Starting controller and workers","knative.dev/controller":"taskrun-controller"}
{"level":"info","logger":"tekton.taskrun-controller","caller":"controller/controller.go:290","msg":"Started workers","knative.dev/controller":"taskrun-controller"}
{"level":"info","logger":"tekton.pipeline-controller","caller":"controller/controller.go:280","msg":"Starting controller and workers","knative.dev/controller":"pipeline-controller"}
{"level":"info","logger":"tekton.pipeline-controller","caller":"controller/controller.go:290","msg":"Started workers","knative.dev/controller":"pipeline-controller"}
W0916 08:35:47.554770       1 reflector.go:256] k8s.io/client-go/informers/factory.go:131: watch of *v1.ConfigMap ended with: too old resource version: 31725028 (31725870)

Can you figure out what's wrong with it? Or i will try to run with minikube. Thanks very much.

salaboy commented 4 years ago

@zhaoyanj there seems to be nothing wrong with Tekton there.. so it might be that there is a connectivity issue.. can you please check with minikube and report back? I am happy to help if I can reproduce the problem, but If I cannot reproduce it is quite hard to figure out what is going wrong.

zhaoyanj commented 4 years ago

@zhaoyanj there seems to be nothing wrong with Tekton there.. so it might be that there is a connectivity issue.. can you please check with minikube and report back? I am happy to help if I can reproduce the problem, but If I cannot reproduce it is quite hard to figure out what is going wrong.

Ok, i will try with minikube and report back later. Thanks!

zhaoyanj commented 4 years ago

@zhaoyanj there seems to be nothing wrong with Tekton there.. so it might be that there is a connectivity issue.. can you please check with minikube and report back? I am happy to help if I can reproduce the problem, but If I cannot reproduce it is quite hard to figure out what is going wrong.

Hi, i tried with minikube and the versions are as follows.

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:41:02Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.0", GitCommit:"e19964183377d0ec2052d1f1fa930c4d7575bd50", GitTreeState:"clean", BuildDate:"2020-08-26T14:23:04Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
$ minikube version
minikube version: v1.13.0
commit: 0c5e9de4ca6f9c55147ae7f90af97eff5befef5f-dirty
$ helm version
version.BuildInfo{Version:"v3.3.1", GitCommit:"249e5215cde0c3fa72e27eb7a30e8d55c9696144", GitTreeState:"clean", GoVersion:"go1.14.7"}

And i follow the instructions.

$ kubectl get pod
NAME                                            READY   STATUS    RESTARTS   AGE
tekton-pipelines-controller-77c845896-vgq4m     1/1     Running   0          10s
tekton-pipelines-webhook-7bfb647b78-lv4g5       1/1     Running   0          10s
zeebe-operator-zeebe-operator-d794f5967-dlv72   1/1     Running   0          10s

But there is something wrong in operator's log.

$ kubectl logs -f zeebe-operator-zeebe-operator-d794f5967-dlv72
2020-09-17T07:21:48.095Z    INFO    controller-runtime.metrics  metrics server is starting to listen    {"addr": ":8080"}
2020-09-17T07:21:48.096Z    INFO    controller-runtime.controller   Starting EventSource    {"controller": "zeebecluster", "source": "kind source: /, Kind="}
2020-09-17T07:21:48.096Z    INFO    controller-runtime.controller   Starting EventSource    {"controller": "zeebecluster", "source": "kind source: /, Kind="}
2020-09-17T07:21:48.096Z    INFO    controller-runtime.controller   Starting EventSource    {"controller": "zeebecluster", "source": "kind source: /, Kind="}
2020-09-17T07:21:48.096Z    INFO    controller-runtime.controller   Starting EventSource    {"controller": "zeebecluster", "source": "kind source: /, Kind="}
2020-09-17T07:21:48.096Z    INFO    controller-runtime.controller   Starting EventSource    {"controller": "zeebecluster", "source": "kind source: /, Kind="}
2020-09-17T07:21:48.096Z    INFO    controller-runtime.controller   Starting EventSource    {"controller": "workflow", "source": "kind source: /, Kind="}
2020-09-17T07:21:48.096Z    INFO    setup   starting manager
2020-09-17T07:21:48.096Z    INFO    controller-runtime.manager  starting metrics server {"path": "/metrics"}
2020-09-17T07:21:48.697Z    INFO    controller-runtime.controller   Starting Controller {"controller": "workflow"}
2020-09-17T07:21:48.697Z    INFO    controller-runtime.controller   Starting Controller {"controller": "zeebecluster"}
2020-09-17T07:21:48.797Z    INFO    controller-runtime.controller   Starting workers    {"controller": "zeebecluster", "worker count": 1}
2020-09-17T07:21:48.797Z    INFO    controller-runtime.controller   Starting workers    {"controller": "workflow", "worker count": 1}
2020-09-17T07:21:48.798Z    INFO    controllers.ZeebeCluster    > Zeebe Cluster:    {">>> Reconcile: zeebecluster": "default/my-zeebe-cluster", "cluster": {"kind":"ZeebeCluster","apiVersion":"zeebe.io/v1","metadata":{"name":"my-zeebe-cluster","namespace":"default","selfLink":"/apis/zeebe.io/v1/namespaces/default/zeebeclusters/my-zeebe-cluster","uid":"6b71e398-377f-4c6a-9128-e07541736452","resourceVersion":"1980","generation":1,"creationTimestamp":"2020-09-17T07:07:38Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"zeebe.io/v1\",\"kind\":\"ZeebeCluster\",\"metadata\":{\"annotations\":{},\"name\":\"my-zeebe-cluster\",\"namespace\":\"default\"}}\n"},"managedFields":[{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion":"zeebe.io/v1","time":"2020-09-17T07:07:38Z"},{"manager":"manager","operation":"Update","apiVersion":"zeebe.io/v1","time":"2020-09-17T07:07:38Z"}]},"spec":{},"status":{"clusterName":"my-zeebe-cluster","statusName":"FailedToInstall","health":"","conditions":[{"type":"InstallationFailed","status":"Unhealthy","lastProbeTime":"2020-09-17T07:07:38Z","lastTransitionTime":"2020-09-17T07:07:38Z","reason":"Installation Pipelines Failed","message":"Zeebe Cluster Installation Failed"}]}}}
2020-09-17T07:21:48.905Z    INFO    controllers.ZeebeCluster    > Creating PipelineResource for ZeebeCluster:   {"pipelineresource": "default", "pipelineResourceZeebeCluster": {"metadata":{"name":"zeebe-version-stream","namespace":"default","creationTimestamp":null},"spec":{"type":"git","params":[{"name":"revision","value":"master"},{"name":"url","value":"http://github.com/zeebe-io/zeebe-version-stream-helm"}]},"status":{}}}
2020-09-17T07:21:49.096Z    ERROR   controllers.ZeebeCluster    Error Creating task {"createTaskAndRun": "default", "error": "admission webhook \"webhook.tekton.dev\" denied the request: mutation failed: cannot decode incoming new object: json: unknown field \"managedFields\""}
github.com/go-logr/zapr.(*zapLogger).Error
    /home/jenkins/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128
zeebe-operator/controllers.(*PipelineRunner).createTaskAndTaskRunInstall
    /workspace/source/controllers/zeebecluster_controller.go:116
zeebe-operator/controllers.(*ZeebeClusterReconciler).Reconcile
    /workspace/source/controllers/zeebecluster_controller.go:303
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:216
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:192
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:171
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:88
2020-09-17T07:21:49.096Z    INFO    controllers.ZeebeCluster    > Creating Task:    {"createTaskAndRun": "default", "task": {"metadata":{"name":"install-task-my-zeebe-cluster","namespace":"default","creationTimestamp":null,"ownerReferences":[{"apiVersion":"zeebe.io/v1","kind":"ZeebeCluster","name":"my-zeebe-cluster","uid":"6b71e398-377f-4c6a-9128-e07541736452","controller":true,"blockOwnerDeletion":true}]},"spec":{"inputs":{"resources":[{"name":"zeebe-version-stream","type":"git"}]},"steps":[{"name":"clone-base-helm-chart","image":"gcr.io/camunda-consulting-de/helm-builder:0.0.1","command":["make","-C","/workspace/zeebe-version-stream/","build","install"],"env":[{"name":"CLUSTER_NAME","value":"my-zeebe-cluster"},{"name":"OPERATE_ENABLED","value":"false"},{"name":"NAMESPACE","value":"my-zeebe-cluster"}],"resources":{}}]}}}
2020-09-17T07:21:49.096Z    INFO    controllers.ZeebeCluster    > Creating TaskRun:     {"createTaskAndRun": "default", "taskrun": {"metadata":{"name":"install-task-run-my-zeebe-cluster","namespace":"default","creationTimestamp":null,"ownerReferences":[{"apiVersion":"zeebe.io/v1","kind":"ZeebeCluster","name":"my-zeebe-cluster","uid":"6b71e398-377f-4c6a-9128-e07541736452","controller":true,"blockOwnerDeletion":true}]},"spec":{"inputs":{"resources":[{"name":"zeebe-version-stream","resourceRef":{"name":"zeebe-version-stream"}}]},"outputs":{},"serviceAccountName":"tekton-bot","serviceAccount":"tekton-bot","taskRef":{"name":"install-task-my-zeebe-cluster"},"timeout":"1h0m0s","podTemplate":{}},"status":{"podName":""}}}
2020-09-17T07:21:49.204Z    ERROR   controllers.ZeebeCluster    Error Creating taskRun  {"createTaskAndRun": "default", "error": "admission webhook \"webhook.tekton.dev\" denied the request: mutation failed: cannot decode incoming new object: json: unknown field \"managedFields\""}
github.com/go-logr/zapr.(*zapLogger).Error
    /home/jenkins/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128
zeebe-operator/controllers.(*PipelineRunner).createTaskAndTaskRunInstall
    /workspace/source/controllers/zeebecluster_controller.go:137
zeebe-operator/controllers.(*ZeebeClusterReconciler).Reconcile
    /workspace/source/controllers/zeebecluster_controller.go:303
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:216
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:192
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:171
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:88
salaboy commented 4 years ago

@zhaoyanj ok.. that error makes a litte bit of more sense.. that sounds like Kubernetes APIs changes .. let me see if I can reproduce that error tomorrow so we can fix it and retest..

salaboy commented 4 years ago

@zhaoyanj I've seen this issue before.. and it is something that I need to add to the CRD types to be valid in a newer version

zhaoyanj commented 4 years ago

@salaboy Please tell me after you fix it and i will try it again. Thanks!

salaboy commented 4 years ago

@zhaoyanj hi there.. I've just released a new version of the operator (version 0.0.96) and I've used this cluster definition

apiVersion: zeebe.io/v1
kind: ZeebeCluster
metadata:
  name: my-zeebe-cluster
spec:
  elasticSearchEnabled: true
  elasticSearchHost: elasticsearch-master
  elasticSearchPort: 9200
  zeebeHealthChecksEnabled: true

Running in minikube that works.. it creates a new namespace and it start a simple cluster. I will make those values for elasticsearch default later on.. but this version requires them for now.. Can you give that a try? remember to run helm repo update

zhaoyanj commented 4 years ago

@salaboy Hi, i tried again.

# helm install zeebe-operator zeebe/zeebe-operator
NAME: zeebe-operator
LAST DEPLOYED: Wed Sep 23 09:35:41 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Get the application URL by running these commands:

kubectl get ingress zeebe-operator-zeebe-operator
# kubectl get pod --namespace default
NAME                                             READY   STATUS    RESTARTS   AGE
tekton-pipelines-controller-647d869887-9vwfd     1/1     Running   0          3m17s
tekton-pipelines-webhook-59b6b4cd9b-5vvcf        1/1     Running   0          3m17s
zeebe-operator-zeebe-operator-6796cc7b4f-qbd77   1/1     Running   0          3m17s

And there is nothing wrong in logs of pods. Then run kubectl apply -f using the file you provide.

# kubectl apply -f create-zeebe-cluster.yaml 
zeebecluster.zeebe.io/my-zeebe-cluster created

But some errors occurr when creating the cluster.

# kubectl get pod
NAME                                             READY   STATUS    RESTARTS   AGE
install-task-run-my-zeebe-cluster-pod-wrfsl      0/2     Error     0          118s
tekton-pipelines-controller-647d869887-9vwfd     1/1     Running   0          7m50s
tekton-pipelines-webhook-59b6b4cd9b-5vvcf        1/1     Running   0          7m50s
zeebe-operator-zeebe-operator-6796cc7b4f-qbd77   1/1     Running   0          7m50s
# kubectl get ns
NAME               STATUS   AGE
default            Active   19h
kube-node-lease    Active   19h
kube-public        Active   19h
kube-system        Active   19h
my-zeebe-cluster   Active   2m6s

Here is the error in the log of operator.

2020-09-23T01:47:24.943Z    ERROR   controllers.ZeebeCluster    unable to update cluster spec   {">>> Reconcile: zeebecluster": "default/my-zeebe-cluster", "error": "ZeebeCluster.zeebe.io \"my-zeebe-cluster\" is invalid: status.health: Required value"}
github.com/go-logr/zapr.(*zapLogger).Error
    /home/jenkins/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128
zeebe-operator/controllers.(*ZeebeClusterReconciler).Reconcile
    /workspace/source/controllers/zeebecluster_controller.go:402
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:216
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:192
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:171
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:88
2020-09-23T01:47:24.943Z    ERROR   controller-runtime.controller   Reconciler error    {"controller": "zeebecluster", "request": "default/my-zeebe-cluster", "error": "ZeebeCluster.zeebe.io \"my-zeebe-cluster\" is invalid: status.health: Required value"}
github.com/go-logr/zapr.(*zapLogger).Error
    /home/jenkins/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:218
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:192
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
    /home/jenkins/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:171
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
    /home/jenkins/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:88

Is there something wrong with my steps? Thanks for your reply!

salaboy commented 4 years ago

@zhaoyanj no.. that is kinda expected.. did you tried with the yaml file that I've shared?

apiVersion: zeebe.io/v1
kind: ZeebeCluster
metadata:
  name: my-zeebe-cluster
spec:
  elasticSearchEnabled: true
  elasticSearchHost: elasticsearch-master
  elasticSearchPort: 9200
  zeebeHealthChecksEnabled: true

Those errors in the output might mean that it is trying to reconcile the state but the components are not yet up.. I need to fix those logs.. Can you check the pods in your zeebe cluster namespace? Also I can see that the pipeline failed so you might want to take a look at the logs for the following pod:

install-task-run-my-zeebe-cluster-pod-wrfsl

Check that the Pod contains two containers so you will need to choose one that is called something like step-helm-clone, there you will find the actual error of why your cluster is not being provisioned.

zhaoyanj commented 4 years ago

@salaboy Hi, i did try with the file you shared. And there is no pods in my-zeebe-cluster namespace.

# kubectl get pod -n my-zeebe-cluster 
No resources found in my-zeebe-cluster namespace.

Here is the status of pod install-task-run-my-zeebe-cluster-pod-wrfsl and the logs of containers.

# kubectl describe pod install-task-run-my-zeebe-cluster-pod-wrfsl
Name:         install-task-run-my-zeebe-cluster-pod-wrfsl
Namespace:    default
Priority:     0
Node:         zhaoyj-hp-elitebook-830-g5/10.9.54.253
Start Time:   Wed, 23 Sep 2020 09:41:33 +0800
Labels:       app.kubernetes.io/managed-by=tekton-pipelines
              tekton.dev/task=install-task-my-zeebe-cluster
              tekton.dev/taskRun=install-task-run-my-zeebe-cluster
Annotations:  pipeline.tekton.dev/release: devel
              tekton.dev/ready: READY
Status:       Failed
IP:           172.17.0.7
IPs:
  IP:           172.17.0.7
Controlled By:  TaskRun/install-task-run-my-zeebe-cluster
Init Containers:
  place-tools:
    Container ID:  docker://f33ea1c18161603dd0e9049c48972ea622d5b610ce752161ac4ea7829fbb2c2e
    Image:         gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/entrypoint:v0.11.3
    Image ID:      docker://sha256:474510caf792dca9c4c823199ed8f193d6f13f79ca007c89ca364c6771c7b916
    Port:          <none>
    Host Port:     <none>
    Command:
      cp
      /ko-app/entrypoint
      /tekton/tools/entrypoint
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Wed, 23 Sep 2020 09:41:35 +0800
      Finished:     Wed, 23 Sep 2020 09:41:35 +0800
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /tekton/tools from tekton-internal-tools (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from tekton-bot-token-gpgjs (ro)
Containers:
  step-git-source-zeebe-version-stream-ql6d2:
    Container ID:  docker://c541ec4778dee1cb059ad9d4e5fdc3b67ebeed4f59ccb93d5271a2f65cb887bd
    Image:         gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.11.3
    Image ID:      docker://sha256:ec5e35738eb178dd23c6a920e34b49f80cb71e1015eda7d769c79ec7e871f0d6
    Port:          <none>
    Host Port:     <none>
    Command:
      /tekton/tools/entrypoint
    Args:
      -wait_file
      /tekton/downward/ready
      -wait_file_content
      -post_file
      /tekton/tools/0
      -termination_path
      /tekton/termination
      -entrypoint
      /ko-app/git-init
      --
      -url
      http://github.com/zeebe-io/zeebe-version-stream-helm
      -revision
      master
      -path
      /workspace/zeebe-version-stream
    State:          Terminated
      Reason:       Error
      Message:      [{"key":"StartedAt","value":"2020-09-23T01:41:38Z","resourceRef":{}}]
      Exit Code:    1
      Started:      Wed, 23 Sep 2020 09:41:37 +0800
      Finished:     Wed, 23 Sep 2020 09:41:48 +0800
    Ready:          False
    Restart Count:  0
    Requests:
      cpu:                0
      ephemeral-storage:  0
      memory:             0
    Environment:
      HOME:                  /tekton/home
      TEKTON_RESOURCE_NAME:  zeebe-version-stream
    Mounts:
      /tekton/downward from tekton-internal-downward (rw)
      /tekton/home from tekton-internal-home (rw)
      /tekton/results from tekton-internal-results (rw)
      /tekton/tools from tekton-internal-tools (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from tekton-bot-token-gpgjs (ro)
      /workspace from tekton-internal-workspace (rw)
  step-clone-base-helm-chart:
    Container ID:  docker://550ee2cf6829f4b828b301c75fd46cd19e304b518b5d8d4b9d689b3e5d1253c6
    Image:         gcr.io/camunda-consulting-de/helm-builder:0.0.1
    Image ID:      docker://sha256:bb10d9c0b3232e4396697bd85f10fe235b57ccf7364bba47bb3489cf3d6285b5
    Port:          <none>
    Host Port:     <none>
    Command:
      /tekton/tools/entrypoint
    Args:
      -wait_file
      /tekton/tools/0
      -post_file
      /tekton/tools/1
      -termination_path
      /tekton/termination
      -entrypoint
      make
      --
      -C
      /workspace/zeebe-version-stream/
      build
      install
    State:          Terminated
      Reason:       Error
      Exit Code:    1
      Started:      Wed, 23 Sep 2020 09:41:38 +0800
      Finished:     Wed, 23 Sep 2020 09:41:49 +0800
    Ready:          False
    Restart Count:  0
    Requests:
      cpu:                0
      ephemeral-storage:  0
      memory:             0
    Environment:
      HOME:                   /tekton/home
      CLUSTER_NAME:           my-zeebe-cluster
      OPERATE_ENABLED:        false
      ELASTICSEARCH_ENABLED:  true
      ELASTICSEARCH_HOST:     elasticsearch-master
      ELASTICSEARCH_PORT:     9200
      KIBANA_ENABLED:         false
      PROMETHEUS_ENABLED:     false
      NAMESPACE:              my-zeebe-cluster
    Mounts:
      /tekton/home from tekton-internal-home (rw)
      /tekton/results from tekton-internal-results (rw)
      /tekton/tools from tekton-internal-tools (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from tekton-bot-token-gpgjs (ro)
      /workspace from tekton-internal-workspace (rw)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  tekton-internal-workspace:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  <unset>
  tekton-internal-home:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  <unset>
  tekton-internal-results:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  <unset>
  tekton-internal-tools:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  <unset>
  tekton-internal-downward:
    Type:  DownwardAPI (a volume populated by information about the pod)
    Items:
      metadata.annotations['tekton.dev/ready'] -> ready
  tekton-bot-token-gpgjs:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  tekton-bot-token-gpgjs
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:          <none>

# kubectl logs -f install-task-run-my-zeebe-cluster-pod-wrfsl
error: a container name must be specified for pod install-task-run-my-zeebe-cluster-pod-wrfsl, choose one of: [step-git-source-zeebe-version-stream-ql6d2 step-clone-base-helm-chart] or one of the init containers: [place-tools]
# kubectl logs -f install-task-run-my-zeebe-cluster-pod-wrfsl -c step-git-source-zeebe-version-stream-ql6d2
{"level":"error","ts":1600825303.6720014,"caller":"git/git.go:41","msg":"Error running git [fetch --recurse-submodules=yes --depth=1 origin master]: exit status 128\nfatal: unable to access 'http://github.com/zeebe-io/zeebe-version-stream-helm/': Could not resolve host: github.com\n","stacktrace":"github.com/tektoncd/pipeline/pkg/git.run\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:41\ngithub.com/tektoncd/pipeline/pkg/git.Fetch\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:93\nmain.main\n\tgithub.com/tektoncd/pipeline/cmd/git-init/main.go:53\nruntime.main\n\truntime/proc.go:203"}
{"level":"error","ts":1600825308.6942859,"caller":"git/git.go:41","msg":"Error running git [pull --recurse-submodules=yes origin]: exit status 1\nfatal: unable to access 'http://github.com/zeebe-io/zeebe-version-stream-helm/': Could not resolve host: github.com\n","stacktrace":"github.com/tektoncd/pipeline/pkg/git.run\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:41\ngithub.com/tektoncd/pipeline/pkg/git.Fetch\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:96\nmain.main\n\tgithub.com/tektoncd/pipeline/cmd/git-init/main.go:53\nruntime.main\n\truntime/proc.go:203"}
{"level":"warn","ts":1600825308.694419,"caller":"git/git.go:97","msg":"Failed to pull origin : exit status 1"}
{"level":"error","ts":1600825308.6980257,"caller":"git/git.go:41","msg":"Error running git [checkout master]: exit status 1\nerror: pathspec 'master' did not match any file(s) known to git\n","stacktrace":"github.com/tektoncd/pipeline/pkg/git.run\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:41\ngithub.com/tektoncd/pipeline/pkg/git.Fetch\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:99\nmain.main\n\tgithub.com/tektoncd/pipeline/cmd/git-init/main.go:53\nruntime.main\n\truntime/proc.go:203"}
{"level":"fatal","ts":1600825308.6981473,"caller":"git-init/main.go:54","msg":"Error fetching git repository: exit status 1","stacktrace":"main.main\n\tgithub.com/tektoncd/pipeline/cmd/git-init/main.go:54\nruntime.main\n\truntime/proc.go:203"}

# kubectl logs -f install-task-run-my-zeebe-cluster-pod-wrfsl -c step-clone-base-helm-chart
2020/09/23 01:41:49 Skipping step because a previous step failed

Add 192.30.255.112 github.com in /etc/hosts file and the error still exists.

# ping github.com
PING github.com (192.30.255.112) 56(84) bytes of data.
64 bytes from github.com (192.30.255.112): icmp_seq=1 ttl=48 time=315 ms
64 bytes from github.com (192.30.255.112): icmp_seq=2 ttl=48 time=283 ms
64 bytes from github.com (192.30.255.112): icmp_seq=3 ttl=48 time=413 ms
^C
--- github.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 283.163/337.282/413.528/55.475 ms

Looking forward to your reply.

salaboy commented 4 years ago

@zhaoyanj unfortunately there is not much that I can do to help you there.. it is a connectivity issue that you need to sort out in your cluster setup.. From inside the pods it cannot reach github.com ..

Where did you added this:

Add 192.30.255.112 github.com in /etc/hosts file and the error still exists.

It is not clear where you did that.. also I bet that github have a number of different IPs.. you need to make sure that a pod in your setup can do git clone http://github.com/zeebe-io/zeebe-version-stream-helm/

salaboy commented 4 years ago

Notice that for me that setup is working in GKE and Minikube

salaboy commented 4 years ago

@zhaoyanj any news about that?

zhaoyanj commented 4 years ago

@salaboy Sorry to reply you late. I found that there is a problem with coredns in the minikube. And now zeebe-operator is successfully installed.

# kubectl get pod
NAME                                             READY   STATUS      RESTARTS   AGE
install-task-run-my-zeebe-cluster-pod-68khd      0/2     Completed   0          21m
tekton-pipelines-controller-647d869887-8st8d     1/1     Running     0          60m
tekton-pipelines-webhook-59b6b4cd9b-rwz6p        1/1     Running     0          60m
zeebe-operator-zeebe-operator-6796cc7b4f-vqdkp   1/1     Running     0          60m

# kubectl get pod -n my-zeebe-cluster
NAME                                              READY   STATUS    RESTARTS   AGE
elasticsearch-master-0                            1/1     Running   0          19m
my-zeebe-cluster-zeebe-0                          1/1     Running   0          19m
my-zeebe-cluster-zeebe-gateway-7fcb78f669-wb29f   1/1     Running   0          19m

Thanks for your help!

salaboy commented 4 years ago

@zhaoyanj awesome! Would you like to help me to make this project better? Feel free to reach out so we can make this project easier to use and support more features out of the box. Also, if this is resolved, would you mind closing the issue?

zhaoyanj commented 4 years ago

@salaboy I am very glad to make this project better together. I will contact you If I encounter some problems. Thanks again for your help!

salaboy commented 4 years ago

@zhaoyanj would you like me to assign you a simple issue to get started?

zhaoyanj commented 4 years ago

@salaboy Ok, I'd like to handle a issue.

salaboy commented 4 years ago

@zhaoyanj I will assign you one then :)