[COMMON] Add pre/postfix and customized port option for Istio Ingress
[oom.git] / docs / sections / guides / deployment_guides / oom_customize_overrides.rst
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 (C) 2022 Nordix Foundation
5
6 .. Links
7 .. _helm deploy: https://github.com/onap/oom/blob/master/kubernetes/helm/plugins/deploy/deploy.sh
8
9 .. _oom_customize_overrides:
10
11 OOM Custom Overrides
12 ####################
13
14 The OOM `helm deploy`_ plugin requires deployment configuration as input, usually in the form of override yaml files.
15 These input files determine what ONAP components get deployed, and the configuration of the OOM deployment.
16
17 Other helm config options like `--set log.enabled=true|false` are available.
18
19 See the `helm deploy`_ plugin usage section for more detail, or it the plugin has already been installed, execute the following::
20
21     > helm deploy --help
22
23 Users can customize the override files to suit their required deployment.
24
25 .. note::
26   Standard and example override files (e.g. `onap-all.yaml`, `onap-all-ingress-istio.yaml`)
27   can be found in the `oom/kubernetes/onap/resources/overrides/` directory.
28
29  * Users can selectively enable or disable ONAP components by changing the ``enabled: true/false`` flags.
30
31  * Add to the command line a value for the global master password (ie. --set global.masterPassword=My_superPassw0rd).
32
33
34 Enabling/Disabling Components
35 *****************************
36 Here is an example of the nominal entries that need to be provided.
37 Different values files are available for different contexts.
38
39 .. collapse:: Default ONAP values.yaml
40
41     .. include:: ../../../../kubernetes/onap/values.yaml
42        :code: yaml
43
44 |
45
46 (Optional) "ONAP on Service Mesh"
47 *********************************
48
49 To enable "ONAP on Service Mesh" both "ServiceMesh" and "Ingress"
50 configuration entries need to be configured before deployment.
51
52 Global settings relevant for ServiceMesh:
53
54 .. code-block:: yaml
55
56   global:
57     ingress:
58       # generally enable ingress for ONAP components
59       enabled: false
60       # enable all component's Ingress interfaces
61       enable_all: false
62       # default Ingress base URL
63       # All http requests via ingress will be redirected
64       virtualhost:
65         # Default Ingress base URL
66         # can be overwritten in component by setting ingress.baseurlOverride
67         baseurl: "simpledemo.onap.org"
68         # prefix for baseaddr
69         # can be overwritten in component by setting ingress.preaddrOverride
70         preaddr: ""
71         # postfix for baseaddr
72         # can be overwritten in component by setting ingress.postaddrOverride
73         postaddr: ""
74       # All http requests via ingress will be redirected on Ingress controller
75       # only valid for Istio Gateway (ServiceMesh enabled)
76       config:
77         ssl: "redirect"
78       # you can set an own Secret containing a certificate
79       # only valid for Istio Gateway (ServiceMesh enabled)
80       #  tls:
81       #    secret: 'my-ingress-cert'
82       # optional: Namespace of the Istio IngressGateway
83       # only valid for Istio Gateway (ServiceMesh enabled)
84       namespace: istio-ingress
85   ...
86     serviceMesh:
87       enabled: true
88       tls: true
89       # be aware that linkerd is not well tested
90       engine: "istio" # valid value: istio or linkerd
91     aafEnabled: false
92     cmpv2Enabled: false
93     tlsEnabled: false
94     msbEnabled: false
95
96 ServiceMesh settings:
97
98 - enabled: true → enables ServiceMesh functionality in the ONAP Namespace (Istio: enables Sidecar deployment)
99 - tls: true → enables mTLS encryption in Sidecar communication
100 - engine: istio → sets the SM engine (currently only Istio is supported)
101 - aafEnabled: false → disables AAF usage for TLS interfaces
102 - tlsEnabled: false → disables creation of TLS in component services
103 - cmpv2Enabled: false → disable cmpv2 feature
104 - msbEnabled: false → MSB is not used in Istio setup (Open, if all components are MSB independend)
105
106 Ingress settings:
107
108 - enabled: true → enables Ingress using: Nginx (when SM disabled), Istio IngressGateway (when SM enabled)
109 - enable_all: true → enables Ingress configuration in each component
110 - virtualhost.baseurl: "simpledemo.onap.org" → sets globally the URL for all Interfaces set by the components,
111     resulting in e.g. "aai-api.simpledemo.onap.org", can be overwritten in the component via: ingress.baseurlOverride
112 - virtualhost.preaddr: "pre-" → sets globally a prefix for the Application name for all Interfaces set by the components,
113     resulting in e.g. "pre-aai-api.simpledemo.onap.org", can be overwritten in the component via: ingress.preaddrOverride
114 - virtualhost.postaddr: "-post" → sets globally a postfix for the Application name for all Interfaces set by the components,
115     resulting in e.g. "aai-api-post.simpledemo.onap.org", can be overwritten in the component via: ingress.postaddrOverride
116 - config.ssl: redirect → sets in the Ingress globally the redirection of all Interfaces from http (port 80) to https (port 443)
117 - config.tls.secret: "..." → (optional) overrides the default selfsigned SSL certificate with a certificate stored in the specified secret
118 - namespace: istio-ingress → (optional) overrides the namespace of the ingress gateway which is used for the created SSL certificate
119
120 .. note::
121   For "ONAP on Istio" an example override file (`onap-all-ingress-istio.yaml`)
122   can be found in the `oom/kubernetes/onap/resources/overrides/` directory.