...
In Istanbul release, Kubernetes participant in control loop supports installation of helm charts in below ways via control loop :
- Install a helm chart that is present in the local file system where the kubernetes participant is hosted.
- Install charts from the helm repositories that are configured on the helm client.
...
While commissioning the control loops, the helm chart parameters are passed via TOSCA template to the control loop runtime database. And when the control loop is instantiated, kubernetes-participant receives control loop element update event from DMaap, it then invokes the helm client running on the host machine to install the corresponding helm charts associated with the affected control loop elements.
The k8s-participant gets the parameters (chart name, version, release name and namespace) of the chart from the control loop runtime. If the repository of the chart had not been specified in the TOSCA, it performs "chart lookup" on all the configured repositories of the helm client as well as on the local chart directory where the helm charts are manually onboarded by the operator. It fetches the appropriate repository info and installs the chart via helm cli.
...
Sample TOSCA template passed during commissioning of control loops. Below are the ways , the charts can be commissioned via TOSCA.
Chart parameters: name, version, release_name and namespace are mandatory in TOSCA.
Repository can be specified with either configured helm repository name or any local directory where the helm charts are available.
(Note: Repository name is an optional parameter in control loop TOSCA template. If not specified, the k8s-particpant will do a look-up on the available repos)
Code Block | ||||
---|---|---|---|---|
| ||||
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 any 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 |
...