[COMMON] Remove hostPath entries
[oom.git] / CONTRIBUTING.md
1 <!---
2 Copyright © 2021 Orange
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 -->
16
17 # Contributing to OOM
18
19 Thanks for taking the time to contribute to OOM!
20 Please see a few informations on how to dot it.
21
22 ## How to become a contributor and submit your own code
23
24 ### Environment setup
25
26 In order to be able to check on your side before submitting, you'll need to
27 install some binaries:
28
29 * helm (satisfying the targeted version as seen in [setup guide](
30 docs/oom_cloud_setup_guide.rst#software-requirements).
31 * chartmuseum (in order to push dependency charts)
32 * helm push (version 0.9.0 as of today)
33 * make
34
35 ### Linting and testing
36
37 OOM use helm linting in order to check that the templates rendering is correct
38 with default values.
39
40 first step is to start chartmuseum:
41
42 ```shell
43 nohup chartmuseum --storage="local" --storage-local-rootdir="/tmp/chartstorage" \
44   --port 6464 &
45 ```
46
47 then you add `local` repository to helm:
48
49 ```shell
50 helm repo remove local && helm repo add local http://localhost:6464
51 ```
52
53 As full rendering may be extremely long (~9h), you can only lint the common
54 part and the component you're working on.
55 Here's an example with AAI:
56
57 ```shell
58 cd kubernetes
59 make common && make aai
60 ```
61
62 If you work on non default path, it's strongly advised to also render the
63 template of your component / subcomponent to be sure it's as expected.
64
65 Here's an example enabling service mesh on aai graphadmin:
66
67 ```shell
68 cd aai/components/
69 helm template --release-name onap --debug \
70   --set global.ingress.virtualhost.baseurl=toto \
71   --set global.ingress.enabled=true --set global.masterPassword="toto" \
72   --set global.serviceMesh.enabled=true --set global.serviceMesh.tls=true \
73   aai-graphadmin
74 ```
75
76 All the output will be the rendered YAML if it's OK or you may see an error.
77 Usually the errors comes from bad indentation or unknown value.
78
79 ### Contributing A Patch
80
81 1. Fork the desired repo, develop and test your code changes.
82 2. Sign the LFN CLA (<https://www.onap.org/cla>)
83 3. Submit a pull request.
84 4. Work with the reviewers on their suggestions.
85 5. Ensure to rebase to the HEAD of your target branch and squash un-necessary
86    commits (
87    <https://blog.carbonfive.com/always-squash-and-rebase-your-git-commits/>)
88    before final merger of your contribution.