open-horizon / anax

Horizon agent control system
https://open-horizon.github.io/docs/anax/docs/
Apache License 2.0
73 stars 98 forks source link

MMSinCluster: add MMS example operator and services #3982

Open LiilyZhang opened 8 months ago

LiilyZhang commented 8 months ago

MMS service should use sidecar pattern, sidecar container runs with MMS helper service, main container with MMS consumer service. They both attach to a shared volume.

  1. MMS helper service will need to
    • [ ] read auth and cert from binded secret, read objectType, agent-namespace from env.
    • [ ] making calls to agent service to poll updated models.
    • [ ] save or delete model based on the response
  2. MMS example operator will need:
    • [ ] bind 2 ESS secrets to MMS helper, helper service will use those 2 secrets to make https call
    • [ ] read envs from configmap: ESS envs, agent-namespace, agent storageclass. The storageclass and pvc size could be pass in from userinput. If storageclass not passed in as input during registering, will use agent storageclass as default. Default will be 10G (? not decide yet). The objectType could be read from userinput -> configmap -> env. The default value of objectType needs to be defined in service definition.
    • [ ] operator needs to create shared volume for MMS helper and MMS consumer service
    • [ ] operator needs to deploy MMS helper and consumer service using sidecar pattern, and binding the volume
    • [ ] remove MMS deployment, and volume when agreement is terminated