From 6f3ee42079aba828f55b9b8879a7630743acec65 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Wed, 25 May 2022 11:11:53 +0200 Subject: [PATCH] Add documentation for Helm Proxy charms --- 05-osm-usage.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/05-osm-usage.md b/05-osm-usage.md index dd05328..da6b7cb 100644 --- a/05-osm-usage.md +++ b/05-osm-usage.md @@ -1330,6 +1330,28 @@ osm repo-delete elastic osm k8scluster-delete cluster ``` +#### Primitives in Helm Charts + +Proxy charms are used to implement primitives on Helm KNFs. In the VNF descriptor we can set the list of services exposed by the Helm chart, and the information of those services will be passed to the Proxy charm. + +```yaml +vnfd: + # ... + kdu: + - name: ldap + helm-chart: stable/openldap + # List of exposed services: + service: + - name: stable-openldap +``` + +If you are trying to connect to the exposed services from the Proxy charm, there should be connectivity between them. There are two options in terms of connectivity: + +1. **Proxy charm and Helm chart not living in the same K8s cluster.** Proxy charms can live in LXD or in a K8s cluster different from where the Helm chart is deployed. In these cases, the recommended solution is to expose LoadBalancer services, so that the Proxy charm will have reachability to the service. +2. **Proxy charm and Helm chart living in the same K8s cluster.** In this case, you can expose also the ClusterIP services of your Helm chart, because the Proxy charm will be able to reach it. + +The easiest way of creating a Proxy charm that is able to implement primitives to Helm chart is by the use of the [osm-libs Charm Library](https://charmhub.io/osm-libs/libraries/osm_config). This is an example of an [OpenLdap Helm-based KNF](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/blob/master/openldap_primitives_knf) with primitives that uses the mentioned library. + #### KNF Juju Bundle This is an example on how to onboard a service that uses a Juju Bundle. For this example the service to be onboarded is a mediawiki that is comprised by a mariadb-k8s database and a mediawiki-k8s frontend. -- GitLab