hyperledger-labs / hyperledger-labs/fabric-operator
fail to use make deploy on local kind cluster for development
- Dominant language
- Go
- Stars
- 78
- Forks
- 47
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 3
Description
Hi team,
ref to https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/#2-run-as-a-deployment-inside-the-cluster
I am plan to use `make deploy` to deploy some local change on a kind cluster (started with `./network kind`)
but an error occurs as
```
The Deployment "operator-controller-manager" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"control-plane":"controller-manager"}: `selector` does not match template `labels`
```
full steps and logs
```
yuanyi@yuanyideMacBook-Pro sample-network % ./network kind
Initializing kind cluster "kind":
✅ - Creating cluster "kind" ...
✅ - Launching container registry "kind-registry" at localhost:5000 ...
🏁 - Cluster is ready.
yuanyi@yuanyideMacBook-Pro sample-network % cd ..
yuanyi@yuanyideMacBook-Pro fabric-operator % make deploy
/usr/local/bin/controller-gen "crd:crdVersions=v1" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
cd config/manager && /usr/local/bin/kustomize edit set image controller=controller:latest
/usr/local/bin/kustomize build config/default | kubectl apply -f -
namespace/operator-system created
customresourcedefinition.apiextensions.k8s.io/ibpcas.ibp.com created
customresourcedefinition.apiextensions.k8s.io/ibpconsoles.ibp.com created
customresourcedefinition.apiextensions.k8s.io/ibporderers.ibp.com created
customresourcedefinition.apiextensions.k8s.io/ibppeers.ibp.com created
serviceaccount/operator-controller-manager created
role.rbac.authorization.k8s.io/operator-leader-election-role created
clusterrole.rbac.authorization.k8s.io/operator-manager-role created
clusterrole.rbac.authorization.k8s.io/operator-metrics-reader created
clusterrole.rbac.authorization.k8s.io/operator-proxy-role created
rolebinding.rbac.authorization.k8s.io/operator-leader-election-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/operator-operator created
clusterrolebinding.rbac.authorization.k8s.io/operator-proxy-rolebinding created
service/operator-controller-manager-metrics-service created
The Deployment "operator-controller-manager" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"control-plane":"controller-manager"}: `selector` does not match template `labels`
make: *** [deploy] Error 1
yuanyi@yuanyideMacBook-Pro fabric-operator %
```
please advise
Contributor guide
Research direction
Start by reproducing `make deploy` on a kind cluster created with `./network kind`, then inspect the generated deployment from `config/manager` and `config/default`. Use the reported selector and template-label error to locate the manifest mismatch; done means the deployment applies successfully without the validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100