openyurtio / yurt-edgex-manager

yurt-edgex-manager is an operator for managing EdgeX lifecycle(including deploy, delete, update) in OpenYurt cluster.
Apache License 2.0
18 stars 24 forks source link

multi edgex instance support #10

Open huiwq1990 opened 2 years ago

huiwq1990 commented 2 years ago

1)If I want to deploy multi edgex instaces in same namespace, yurt-edgex-manager generate solid uniteddeployments, like edgex-core-consul. Could we generate uniteddeployments with nodepool name as prefix? 2) Config crd edgex is too complex , if I want add a ui component, I need write complex yamls. As a demo below:

apiVersion: device.openyurt.io/v1alpha1
kind: EdgeX
metadata:
  name: edgex-sample-$WORKER_NODEPOOL
spec:
  version: hanoi
  poolname: $WORKER_NODEPOOL
  additinalservices:
  - metadata:
      name: edgex-device-virtual
    spec:
      type: NodePort
      selector:
        app: edgex-device-virtual
      ports:
      - name: http
        port: 49990
        protocol: TCP
        targetPort: 49990
        nodePort: 30090
  - metadata:
      name: edgex-device-rest
    spec:
      type: NodePort
      selector:
        app: edgex-device-rest
      ports:
      - name: http
        port: 49986
        protocol: TCP
        targetPort: 49986

3) yurt-edgex-manager use EdgeXConfig as template, if deploy multi instances, error occur as below:

  Version:        jakarta
Status:
  Conditions:
    Last Transition Time:  2022-03-10T08:59:37Z
    Message:               Service "edgex-core-consul" is invalid: spec.ports[0].nodePort: Invalid value: 30850: provided port is already allocated
    Reason:                ServiceProvisioningFailed
    Severity:              Warning
    Status:                False
    Type:                  Ready
    Last Transition Time:  2022-03-10T08:59:37Z
    Status:                True
    Type:                  ConfigmapAvailable
    Last Transition Time:  2022-03-10T08:59:37Z
    Message:               Service "edgex-core-consul" is invalid: spec.ports[0].nodePort: Invalid value: 30850: provided port is already allocated
    Reason:                ServiceProvisioningFailed
    Severity:              Warning
    Status:                False
    Type:                  ServiceAvailable
  Initialized:             true

Could we use helm as template render, and user can custom select deploy which component and set component values.

lwmqwer commented 2 years ago

1)If I want to deploy multi edgex instaces in same namespace, yurt-edgex-manager generate solid uniteddeployments, like edgex-core-consul. Could we generate uniteddeployments with nodepool name as prefix? 3) yurt-edgex-manager use EdgeXConfig as template, if deploy multi instances, error occur as below: In our design, now we only support one instance in a nodepool. so this will not support.

2) Config crd edgex is too complex , if I want add a ui component, I need write complex yamls. As a demo below: The additional component of edgex, is complicate, we feel the same it about it, we could enhance the config of additional component.

lwmqwer commented 2 years ago

This first one should fixed by set the ud nodepool patch field. This second one track by #32