Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It also implements participant-Intermediary APIs to interact with DMaap topic for control loop. When the Control loop element update event is received from DMaap, it invokes the helm client to install the corresponding chart based on the name and version of the chart.


When the k8s-participant receives event update from DMaap , it gets the parameters (chart name, version, release name, namespace). If the repository is not passed in the TOSCA, it does a lookup of the specified chart in all the configured repositories in the helm client as well as on the local directory where the helm charts are onboarded visa REST. It fetches the appropriate repository info and installs the chart via helm cli.


                                         

draw.io Diagram
bordertrue
diagramNamecontrolloop element update
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth881
revision3



Sample TOSCA  template passed during commissioning of control loops.  (Note: Repository name is an optional parameter in control loop TOSCA template.)

Code Block
languageyml
titleTosca template
org.onap.domain.database.HelloWorld_K8SMicroserviceControlLoopElement:
# Chart from any chart repository configured on helm client.
version: 1.2.3
type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement
type_version: 1.0.0
description: Control loop element for the K8S microservice for Hello World
properties:
provider: ONAP
participant_id:
name: org.onap.k8s.controlloop.K8SControlLoopParticipant
version: 2.3.4
chart:
release_name: helloworld
chart_name: hello
version: 0.1.0
repository: chartMuseum
namespace: onap

org.onap.domain.database.PMSH_K8SMicroserviceControlLoopElement:
# Chart from local file system 
version: 1.2.3
type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement
type_version: 1.0.0
description: Control loop element for the K8S microservice for PMSH
properties:
provider: ONAP
participant_id:
name: org.onap.k8s.controlloop.K8SControlLoopParticipant
version: 2.3.4
chart:
release_name: pmshmicroservice
chart_name: pmsh
version: 0.1.0
repository: /home/oom/helm-charts/PMSH
namespace: onap

org.onap.domain.database.Local_K8SMicroserviceControlLoopElement:
# Chart installation without passing repository name 
version: 1.2.3
type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement
type_version: 1.0.0
description: Control loop element for the K8S microservice for local chart
properties:
provider: ONAP
participant_id:
name: org.onap.k8s.controlloop.K8SControlLoopParticipant
version: 2.3.4
chart:
release_name: nginxms
chart_name: nginx-ingress
version: 0.9.1
namespace: onap

When the k8s-participant receives event update from DMaap , it gets the parameters (chart name, version, release name, namespace). If the repository is not passed in the TOSCA, it does a lookup of the specified chart in all the configured repositories in the helm client as well as on the local directory where the helm charts are onboarded visa REST. It fetches the appropriate repository info and installs the chart via helm cli.

...