1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. Copyright 2018-2020 Amdocs, Bell Canada, Orange, Samsung
5 .. Modification copyright (C) 2022 Nordix Foundation
8 .. _Helm Charts: https://artifacthub.io/packages/search
9 .. _aai: https://github.com/onap/oom/tree/master/kubernetes/aai
10 .. _name.tpl: https://github.com/onap/oom/blob/master/kubernetes/common/common/templates/_name.tpl
11 .. _namespace.tpl: https://github.com/onap/oom/blob/master/kubernetes/common/common/templates/_namespace.tpl
13 .. _oom_helm_chart_info:
18 A Helm chart is a collection of files that describe a related set of Kubernetes
19 resources. A simple chart might be used to deploy something simple, like a
20 memcached pod, while a complex chart might contain many micro-service arranged
21 in a hierarchy as found in the `aai`_ ONAP component.
23 Charts are created as files laid out in a particular directory tree, then they
24 can be packaged into versioned archives to be deployed. There is a public
25 archive of `Helm Charts`_ on ArtifactHUB that includes many technologies applicable
26 to ONAP. Some of these charts have been used in ONAP and all of the ONAP charts
27 have been created following the guidelines provided.
29 An example structure of the OOM common helm charts is shown below:
38 │ │ │ └── docker-entrypoint.sh
43 │ │ │ ├── configmap.yaml
44 │ │ │ ├── cronjob.yaml
47 │ │ ├── configmap.yaml
50 │ │ └── statefulset.yaml
55 │ │ ├── _createPassword.tpl
60 │ │ ├── _namespace.tpl
61 │ │ ├── _repository.tpl
62 │ │ ├── _resources.tpl
74 The common section of charts consists of a set of templates that assist with
75 parameter substitution (`name.tpl`_, `namespace.tpl`_, etc) and a set of
76 charts for components used throughout ONAP. When the common components are used
77 by other charts they are instantiated each time or we can deploy a shared
78 instances for several components.
80 All of the ONAP components have charts that follow the pattern shown below:
87 │ └── subcomponent-folder
101 │ ├── deployment.yaml
108 Note that the /components sub dir may include a hierarchy of sub
109 components and in themselves can be quite complex.
111 You can use either `charts` or `components` folder for your subcomponents.
112 `charts` folder means that the subcomponent will always been deployed.
114 `components` folders means we can choose if we want to deploy the subcomponent.
116 This choice is done in root `values.yaml`:
129 Then in `Chart.yaml` dependencies section, you'll use these values:
140 repository: 'file://components/component1'
141 condition: component1.enabled
144 repository: 'file://components/component2'
145 condition: component2.enabled
147 Configuration of the components varies somewhat from component to component but
148 generally follows the pattern of one or more `configmap.yaml` files which can
149 directly provide configuration to the containers in addition to processing
150 configuration files stored in the `config` directory. It is the responsibility
151 of each ONAP component team to update these configuration files when changes
152 are made to the project containers that impact configuration.
154 The following section describes how the hierarchical ONAP configuration system
155 is key to management of such a large system.
160 .. Note that although OOM uses Kubernetes facilities to minimize the effort
161 .. required of the ONAP component owners to implement a successful rolling
162 .. upgrade strategy there are other considerations that must be taken into
164 .. For example, external APIs - both internal and external to ONAP - should be
165 .. designed to gracefully accept transactions from a peer at a different
166 .. software version to avoid deadlock situations. Embedded version codes in
167 .. messages may facilitate such capabilities.
169 .. Within each of the projects a new configuration repository contains all of
170 .. the project specific configuration artifacts. As changes are made within
171 .. the project, it's the responsibility of the project team to make appropriate
172 .. changes to the configuration data.