Skip to content

The Operator injected with proxy failed to start. #32

Closed
@qiuming520

Description

@qiuming520

General Question

My Operator : mysql-operator
k8s version : v1.21.5
controller-mesh : v0.1.2
shardingconfig-root :

apiVersion: ctrlmesh.kusionstack.io/v1alpha1
kind: ShardingConfig
metadata:
  name: sharding-root
  namespace: test-mysql
spec:
  root:
    prefix: mysql-operator
    targetStatefulSet: mysql-operator
    canary:
      replicas: 1
      inNamespaces:
      - demo-0a
      - demo-0b
      - demo-0c
    auto:
      everyShardReplicas: 2
      shardingSize: 2
    resourceSelector:
    - relateResources:
      - apiGroups:
        - '*'
        resources:
        - '*'
  controller:
    leaderElectionName: mysql-operator-leader-election

My Operator has 2 containers (operator and orchestrator). When not using patch to add the labels required by ctrlmesh (ctrlmesh.kusionstack.io/enable-proxy: "true", ctrlmesh.kusionstack.io/watching: "true") , can be started successfully. After using patch to request labeling, ctrlmesh-proxy and operator can start normally, but orchestrator fails to start with the following error:

Error starting command: `--kubeconfig=/etc/kubernetes/kubeconfig/fake-kubeconfig.yaml` - fork/exec --kubeconfig=/etc/kubernetes/kubeconfig/fake-kubeconfig.yaml: no such file or directory

kubectl get pod/mysql-operator-0 -oyaml Check the pod and find that the /etc/kubernetes/kubeconfig/fake-kubeconfig.yaml file has been mounted

Who can help me?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions