summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.ci/check-bashisms.sh4
-rwxr-xr-x.ci/check-cla-for-multiple-commits.sh25
-rwxr-xr-x.ci/check-for-staging-images.sh (renamed from kubernetes/contrib/tools/check-for-staging-images.sh)5
-rwxr-xr-x.ci/common.sh50
-rwxr-xr-x.ci/find-tabs.sh38
-rwxr-xr-x.ci/find-trailing-whitespaces.sh39
-rw-r--r--.gitlab-ci.yml269
-rw-r--r--.gitlab/merge_request_templates/Default.md41
-rw-r--r--.pylintrc66
-rw-r--r--CODEOWNERS17
-rw-r--r--CONTRIBUTING.md88
-rw-r--r--README.md46
-rw-r--r--kubernetes/Makefile2
-rw-r--r--kubernetes/common/certInitializer/templates/_certInitializer.yaml15
-rw-r--r--kubernetes/common/common/templates/_utils.tpl3
-rw-r--r--kubernetes/common/readinessCheck/templates/_readinessCheck.tpl4
-rw-r--r--kubernetes/common/repositoryGenerator/values.yaml4
-rw-r--r--kubernetes/dcaegen2-services/components/dcae-restconf-collector/values.yaml4
-rw-r--r--kubernetes/dcaegen2-services/components/dcae-ves-collector/values.yaml1
-rw-r--r--kubernetes/dcaegen2-services/components/dcae-ves-mapper/values.yaml3
-rw-r--r--kubernetes/dmaap/components/message-router/components/message-router-kafka/templates/statefulset.yaml6
-rw-r--r--kubernetes/dmaap/components/message-router/components/message-router-kafka/values.yaml7
-rwxr-xr-xkubernetes/onap/values.yaml4
-rwxr-xr-xkubernetes/policy/components/policy-api/values.yaml2
-rw-r--r--kubernetes/policy/components/policy-clamp-be/resources/config/application.properties4
-rw-r--r--kubernetes/policy/components/policy-clamp-cl-pf-ppnt/values.yaml4
-rwxr-xr-xkubernetes/policy/components/policy-distribution/values.yaml4
-rwxr-xr-xkubernetes/policy/components/policy-drools-pdp/values.yaml2
-rwxr-xr-xkubernetes/policy/components/policy-pap/values.yaml4
-rwxr-xr-xkubernetes/policy/components/policy-xacml-pdp/values.yaml2
-rwxr-xr-xkubernetes/policy/values.yaml4
-rw-r--r--kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml2
-rw-r--r--kubernetes/sdnc/components/ueb-listener/templates/deployment.yaml2
-rw-r--r--kubernetes/sdnc/templates/statefulset.yaml2
34 files changed, 742 insertions, 31 deletions
diff --git a/.ci/check-bashisms.sh b/.ci/check-bashisms.sh
index 0dae2255b7..0915725bae 100755
--- a/.ci/check-bashisms.sh
+++ b/.ci/check-bashisms.sh
@@ -14,14 +14,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -eu
+
if ! which checkbashisms >/dev/null && ! sudo yum install devscripts-minimal && ! sudo apt-get install devscripts
then
printf "checkbashisms command not found - please install it \n\
(e.g. sudo apt-get install devscripts | yum install devscripts-minimal )\n" >&2
exit 2
fi
+
find . -not -path '*/.*' -name '*.sh' -exec checkbashisms {} + || exit 3
find . -not -path '*/.*' -name '*.failover' -exec checkbashisms -f \{\} + || exit 4
! find . -not -path '*/.*' -name '*.sh' -exec grep 'local .*=' {} + || exit 5
! find . -not -path '*/.*' -name '*.failover' -exec grep 'local .*=' {} + || exit 6
+
exit 0
diff --git a/.ci/check-cla-for-multiple-commits.sh b/.ci/check-cla-for-multiple-commits.sh
new file mode 100755
index 0000000000..13927d9a7d
--- /dev/null
+++ b/.ci/check-cla-for-multiple-commits.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Copyright © 2021 Orange
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -eu
+
+git fetch origin
+
+echo "<------------- AUTHORS LIST ------------->"
+# We are always running on a merge request
+COMMON_ANCESTOR=$(git merge-base HEAD origin/master)
+git log --format=%ae "$COMMON_ANCESTOR..HEAD" | sort | uniq
+echo "<---------------------------------------->"
diff --git a/kubernetes/contrib/tools/check-for-staging-images.sh b/.ci/check-for-staging-images.sh
index 9705ee6ea8..ae183b61f1 100755
--- a/kubernetes/contrib/tools/check-for-staging-images.sh
+++ b/.ci/check-for-staging-images.sh
@@ -1,6 +1,7 @@
#!/bin/sh
# Copyright © 2020 Samsung Electronics
+# Modification copyright © 2021 Orange
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,10 +17,6 @@
BASE_URL="https://nexus3.onap.org/repository/docker.release"
-if [ "$GERRIT_BRANCH" = "staging" ]; then
- exit 0
-fi
-
USED_IMAGES=$(grep -r -E -o -h ':\s*onap/.*:.*' | sed -e 's/^: //' -e 's/^ //' | sort | uniq)
REPO_IMAGES=$(curl -s $BASE_URL/v2/_catalog | jq -r '.repositories[]')
NOT_AVAILABLE_IMAGES=$(echo "$USED_IMAGES" | grep -vE "$(echo "$REPO_IMAGES" | tr "\n" "|" | sed 's/|$//')")
diff --git a/.ci/common.sh b/.ci/common.sh
new file mode 100755
index 0000000000..2a21f29779
--- /dev/null
+++ b/.ci/common.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Copyright © 2021 Orange
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+RED="\033[31m"
+YELLOW="\033[33m"
+BLUE="\033[94m"
+GREEN="\033[32m"
+NO_COLOR="\033[0m"
+
+title(){
+ MSG="$BLUE$1$NO_COLOR"
+ printf "%s" "$MSG"
+}
+
+subtitle() {
+ MSG="$YELLOW$1$NO_COLOR"
+ printf "%s" "$MSG"
+}
+
+
+# Utility method that prints SUCCESS if a test was succesful, or FAIL together with the test output
+handle_test_result(){
+ EXIT_CODE=$1
+ RESULT="$2"
+ # Change color to red or green depending on SUCCESS
+ if [ "$EXIT_CODE" -eq "0" ]; then
+ printf "%sSUCCESS" "${GREEN}"
+ else
+ printf "%sFAIL" "${RED}"
+ fi
+ # Print RESULT if not empty
+ if [ -n "$RESULT" ] ; then
+ printf "\n%s" "$RESULT"
+ fi
+ # Reset color
+ printf "%s" "${NO_COLOR}"
+}
diff --git a/.ci/find-tabs.sh b/.ci/find-tabs.sh
new file mode 100755
index 0000000000..9527445ff7
--- /dev/null
+++ b/.ci/find-tabs.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# Copyright © 2021 Orange
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+tabs_lines="" # Lines containing tabs
+
+for file in $(git grep --cached -Il '' | sed -e 's/^/.\//')
+do
+ lines=$(grep -ErnIH "\t" "$file" | grep -v Makefile | cut -f-2 -d ":")
+ if [ -n "$lines" ]; then
+ tabs_lines=$([ -z "$tabs_lines" ] && echo "$lines" || printf "%s\n%s" "$tabs_lines" "$lines")
+ fi
+done
+
+exit_code=0
+
+# If tabs_lines is not empty, change the exit code to 1 to fail the CI.
+if [ -n "$tabs_lines" ]; then
+ printf "\n***** Lines containing tabs *****\n\n"
+ echo "${tabs_lines}"
+ exit_code=1
+fi
+
+exit $exit_code
diff --git a/.ci/find-trailing-whitespaces.sh b/.ci/find-trailing-whitespaces.sh
new file mode 100755
index 0000000000..d01984b54b
--- /dev/null
+++ b/.ci/find-trailing-whitespaces.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Copyright © 2021 Orange
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+tw_lines="" # Lines containing trailing whitespaces.
+
+for file in $(git grep --cached -Il '' | sed -e 's/^/.\//')
+do
+ lines=$(grep -ErnIH " +$" $file | cut -f-2 -d ":")
+ if [ -n "$lines" ]; then
+ tw_lines=$([ -z "$tw_lines" ] && echo "$lines" || printf "%s\n%s" "$tw_lines" "$lines")
+ fi
+done
+
+exit_code=0
+
+
+# If tw_lines is not empty, change the exit code to 1 to fail the CI.
+if [ -n "$tw_lines" ]; then
+ printf "\n***** Lines containing trailing whitespace *****\n\n"
+ echo "${tw_lines}"
+ exit_code=1
+fi
+
+exit $exit_code
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000..4b15de00b1
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,269 @@
+---
+# Copyright © 2021 Orange
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+stages:
+ - linting
+ - build
+ - test
+
+cla_authors:
+ stage: linting
+ image: bitnami/git:2
+ script:
+ - . .ci/common.sh
+ - title "Running cla authors retrieval..."
+ - exit_code=0
+ - RESULT=$(.ci/check-cla-for-multiple-commits.sh 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ needs: []
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+
+
+pylint:
+ stage: linting
+ image: cytopia/pylint
+ script:
+ - . .ci/common.sh
+ - title "Running pylint check..."
+ - exit_code=0
+ - RESULT=$(find kubernetes/ TOSCA/ docs/ -name '*.py' -print0 | xargs -0 pylint 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ needs: []
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ changes:
+ - .ci/*
+ - .gitlab-ci.yml
+ - '**/*.py'
+
+commit-message:
+ stage: linting
+ image: jorisroovers/gitlint:0.16.0
+ script:
+ - . .ci/common.sh
+ - title "*** Running gitlint..."
+ - exit_code=0
+ - RESULT=$(gitlint 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ needs: []
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+
+
+trailing-whitespaces:
+ stage: linting
+ image: alpine/git:v2.24.1
+ script:
+ - . .ci/common.sh
+ - title "Running trailing whitespaces check..."
+ - exit_code=0
+ - RESULT=$(.ci/find-trailing-whitespaces.sh 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ needs: []
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+
+tabs:
+ stage: linting
+ image: alpine/git:v2.24.1
+ script:
+ - . .ci/common.sh
+ - title "Running tabs check..."
+ - exit_code=0
+ - RESULT=$(.ci/find-tabs.sh 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ needs: []
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+
+documentation:doc8:
+ stage: linting
+ image: testthedocs/ttd-doc8
+ script:
+ - . .ci/common.sh
+ - title "Running doc8 check..."
+ - exit_code=0
+ - RESULT=$(doc8 docs 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ changes:
+ - .ci/*
+ - .gitlab-ci.yml
+ - docs/**/*
+ needs: []
+
+documentation:link-check:
+ stage: linting
+ image: python:3.7
+ script:
+ - . .ci/common.sh
+ - pip install -r requirements.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
+ - title "Running documentation links check..."
+ - exit_code=0
+ - RESULT=$(sphinx-build -W -b linkcheck -d /tmp/doctrees ./docs/ ./docs/_build/linkcheck 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ changes:
+ - .ci/*
+ - .gitlab-ci.yml
+ - docs/**/*
+ needs: []
+
+documentation:spelling:
+ stage: linting
+ image: python:3.7
+ script:
+ - . .ci/common.sh
+ - apt-get update
+ - apt-get install -qq --yes curl libenchant-2-2
+ - curl -LO https://git.onap.org/doc/plain/docs/spelling_wordlist.txt
+ - pip install -r requirements.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
+ - title "Running documentation spelling check..."
+ - exit_code=0
+ - RESULT=$(sphinx-build -b spelling -d /tmp/doctrees ./docs/ ./docs/_build/spelling 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ changes:
+ - .ci/*
+ - .gitlab-ci.yml
+ - docs/**/*
+ needs: []
+
+bashisms:
+ stage: linting
+ image: manabu/checkbashisms-docker
+ script:
+ - . .ci/common.sh
+ - title "Running bashisms check..."
+ - exit_code=0
+ - RESULT=$(.ci/check-bashisms 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ needs: []
+
+helm:fast:
+ stage: linting
+ services:
+ - name: bitnami/chartmuseum:latest
+ alias: chartmuseum
+ image: alpine/helm:3.6.3
+ variables:
+ SKIP_LINT: "TRUE"
+ script:
+ - . .ci/common.sh
+ - apk add --no-cache make
+ - helm repo add local http://chartmuseum:8080/
+ - helm plugin install --version v0.9.0 https://github.com/chartmuseum/helm-push.git
+ - title "Running helm fast check..."
+ - cd kubernetes
+ - exit_code=0
+ - make all || exit_code=$?
+ - handle_test_result $exit_code ""
+ - exit $exit_code
+ needs: []
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ changes:
+ - .ci/*
+ - .gitlab-ci.yml
+ - kubernetes/**/*
+
+helm:full:
+ stage: build
+ services:
+ - name: bitnami/chartmuseum:latest
+ alias: chartmuseum
+ image: alpine/helm:3.6.3
+ script:
+ - . .ci/common.sh
+ - apk add --no-cache make
+ - helm repo add local http://chartmuseum:8080/
+ - helm plugin install --version v0.9.0 https://github.com/chartmuseum/helm-push.git
+ - title "Running full helm check..."
+ - cd kubernetes
+ - exit_code=0
+ - make all || exit_code=$?
+ - handle_test_result $exit_code ""
+ - exit $exit_code
+ needs:
+ - helm:fast
+ timeout: 6h
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ changes:
+ - .ci/*
+ - .gitlab-ci.yml
+ - kubernetes/**/*
+
+documentation:
+ stage: build
+ image: python:3.7
+ script:
+ - . .ci/common.sh
+ - apt-get update
+ - apt-get install --yes graphviz plantuml
+ - pip install -r requirements.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
+ - title "Running documentation build..."
+ - exit_code=0
+ - RESULT=$(sphinx-build -q -W -b html -d /tmp/doctrees ./docs/ ./docs/_build/html 2>&1) || exit_code=$?
+ - handle_test_result $exit_code "$RESULT"
+ - exit $exit_code
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ changes:
+ - .ci/*
+ - .gitlab-ci.yml
+ - docs/*
+ needs:
+ - documentation:spelling
+ - documentation:link-check
+ - documentation:doc8
+
+gating:launch:
+ stage: test
+ image: busybox
+ script:
+ - . .ci/common.sh
+ - title "Launching request for a gate"
+ needs:
+ - bashisms
+ - helm:fast
+ - tabs
+ - trailing-whitespaces
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+ changes:
+ - .ci/*
+ - .gitlab-ci.yml
+ - kubernetes/**/*
diff --git a/.gitlab/merge_request_templates/Default.md b/.gitlab/merge_request_templates/Default.md
new file mode 100644
index 0000000000..73c9e68a22
--- /dev/null
+++ b/.gitlab/merge_request_templates/Default.md
@@ -0,0 +1,41 @@
+## What does this MR do?
+
+<!-- Briefly describe what this MR is about. -->
+
+## Related issues
+
+<!-- Link related issues below. In form of:
+Issue-ID: PROJECT-1234 (PROJECT-1234 being the isue in ONAP jira)
+
+MR can have several Issue-Id
+-->
+
+## Author's checklist
+
+- [ ] The title of the MR is in form of `[IMPACTED] A title`
+ - `IMPACTED` being an ONAP component (`SO`, `AAI`, ...) or `OOM` component (
+ `DOC`, `COMMON`, `GENERAL`, `CI`, ...)
+- [ ] You have filled `What does thirs MR do?`
+- [ ] You have filled `Related issues`
+- [ ] Your last commit message follows the rule:
+
+ ```bash
+ [IMPACTED] A title
+
+ One or several sentences describing the isssue and the way it's solved
+
+ Issue-ID: PROJECT-1234
+ Signed-off-by: Your Name <your.email@company.com>
+ ```
+
+- [ ] Your CLA is submitted in LF
+
+## Maintener's checklist
+
+- [ ] Title is OK
+- [ ] Commit Message is OK
+- [ ] Administrative checks are green
+- [ ] Linting checks are green
+- [ ] Gate is OK
+
+/assign @maintainers
diff --git a/.pylintrc b/.pylintrc
new file mode 100644
index 0000000000..e76164c4b2
--- /dev/null
+++ b/.pylintrc
@@ -0,0 +1,66 @@
+# Copyright © 2021 Orange
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+[MASTER]
+# Specify a score threshold to be exceeded before program exits with error.
+fail-under=3.43
+
+[MESSAGES CONTROL]
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifiers separated by comma (,) or put this
+# option multiple times (only on the command line, not in the configuration
+# file where it should appear only once). You can also use "--disable=all" to
+# disable everything first and then reenable specific checks. For example, if
+# you want to run only the similarities checker, you can use "--disable=all
+# --enable=similarities". If you want to run only the classes checker, but have
+# no Warning level messages displayed, use "--disable=all --enable=classes
+# --disable=W".
+disable=raw-checker-failed,
+ bad-inline-option,
+ locally-disabled,
+ file-ignored,
+ suppressed-message,
+ useless-suppression,
+ deprecated-pragma,
+ use-symbolic-message-instead,
+ missing-docstring
+
+
+[REPORTS]
+# Set the output format. Available formats are text, parseable, colorized, json
+# and msvs (visual studio). You can also give a reporter class, e.g.
+# mypackage.mymodule.MyReporterClass.
+output-format=colorized
+
+# Tells whether to display a full report or only the messages.
+reports=yes
+
+# Activate the evaluation score.
+score=yes
+
+[FORMAT]
+# Maximum number of characters on a single line.
+max-line-length=120
+
+[BASIC]
+
+# Regular expression matching correct method names. Overrides method-naming-
+# style.
+method-rgx="(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$"
+
+# Regular expression matching correct variable names. Overrides variable-
+# naming-style.
+variable-rgx="[a-zA-Z_][a-zA-Z0-9_]{1,30}$"
+
diff --git a/CODEOWNERS b/CODEOWNERS
new file mode 100644
index 0000000000..c255f42940
--- /dev/null
+++ b/CODEOWNERS
@@ -0,0 +1,17 @@
+# Copyright © 2021 Orange
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Translation of INFO.yaml into standard file.
+# Mike and Borislav are not set here yet but will be when username is found.
+* @kopasiak @sylvainOL
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000000..a932d65a53
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,88 @@
+<!---
+Copyright © 2021 Orange
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Contributing to OOM
+
+Thanks for taking the time to contribute to OOM!
+Please see a few informations on how to dot it.
+
+## How to become a contributor and submit your own code
+
+### Environment setup
+
+In order to be able to check on your side before submitting, you'll need to
+install some binaries:
+
+* helm (satisfying the targeted version as seen in [setup guide](
+docs/oom_cloud_setup_guide.rst#software-requirements).
+* chartmuseum (in order to push dependency charts)
+* helm push (version 0.9.0 as of today)
+* make
+
+### Linting and testing
+
+OOM use helm linting in order to check that the templates rendering is correct
+with default values.
+
+first step is to start chartmuseum:
+
+```shell
+nohup chartmuseum --storage="local" --storage-local-rootdir="/tmp/chartstorage" \
+ --port 6464 &
+```
+
+then you add `local` repository to helm:
+
+```shell
+helm repo remove local && helm repo add local http://localhost:6464
+```
+
+As full rendering may be extremely long (~9h), you can only lint the common
+part and the component you're working on.
+Here's an example with AAI:
+
+```shell
+cd kubernetes
+make common && make aai
+```
+
+If you work on non default path, it's strongly advised to also render the
+template of your component / subcomponent to be sure it's as expected.
+
+Here's an example enabling service mesh on aai graphadmin:
+
+```shell
+cd aai/components/
+helm template --release-name onap --debug \
+ --set global.ingress.virtualhost.baseurl=toto \
+ --set global.ingress.enabled=true --set global.masterPassword="toto" \
+ --set global.serviceMesh.enabled=true --set global.serviceMesh.tls=true \
+ aai-graphadmin
+```
+
+All the output will be the rendered YAML if it's OK or you may see an error.
+Usually the errors comes from bad indentation or unknown value.
+
+### Contributing A Patch
+
+1. Fork the desired repo, develop and test your code changes.
+2. Sign the LFN CLA (<https://www.onap.org/cla>)
+3. Submit a pull request.
+4. Work with the reviewers on their suggestions.
+5. Ensure to rebase to the HEAD of your target branch and squash un-necessary
+ commits (
+ <https://blog.carbonfive.com/always-squash-and-rebase-your-git-commits/>)
+ before final merger of your contribution.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..cb4923d426
--- /dev/null
+++ b/README.md
@@ -0,0 +1,46 @@
+<!---
+Copyright © 2021 Orange
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# ONAP Operations Manager
+
+## Description
+
+The ONAP Operations Manager (OOM) is responsible for life-cycle management of
+the ONAP platform itself; components such as SO, SDNC, etc.
+
+It is not responsible for the management of services, VNFs or infrastructure
+instantiated by ONAP or used by ONAP to host such services or VNFs.
+
+OOM uses the open-source Kubernetes container management system as a means to
+manage the containers that compose ONAP where the containers are hosted either
+directly on bare-metal servers or on VMs hosted by a 3rd party management
+system.
+
+OOM ensures that ONAP is easily deployable and maintainable throughout its life
+cycle while using hardware resources efficiently.
+
+Full documentation is available in ONAP documentation in [operations and
+administration guides](
+https://docs.onap.org/en/latest/guides/onap-operator/index.html).
+
+## Contributing
+
+Please see [contributing](./CONTRIBUTING.md) file to learn on how to contribute
+
+## Issues
+
+All issues should be filled in [ONAP Jira](https://jira.onap.org).
+
diff --git a/kubernetes/Makefile b/kubernetes/Makefile
index f96a32a4f0..1b24a7962c 100644
--- a/kubernetes/Makefile
+++ b/kubernetes/Makefile
@@ -88,7 +88,7 @@ plugins:
@cp -R helm $(PACKAGE_DIR)/
check-for-staging-images:
- $(ROOT_DIR)/contrib/tools/check-for-staging-images.sh
+ $(ROOT_DIR)/../.ci/check-for-staging-images.sh
helm-repo-update:
@$(HELM_BIN) repo update
diff --git a/kubernetes/common/certInitializer/templates/_certInitializer.yaml b/kubernetes/common/certInitializer/templates/_certInitializer.yaml
index 32bba457ee..b1e85c00cc 100644
--- a/kubernetes/common/certInitializer/templates/_certInitializer.yaml
+++ b/kubernetes/common/certInitializer/templates/_certInitializer.yaml
@@ -84,12 +84,19 @@
env:
- name: APP_FQI
value: "{{ $initRoot.fqi }}"
+ {{- if $initRoot.aaf_namespace }}
- name: aaf_locate_url
- value: "https://aaf-locate.{{ $dot.Release.Namespace}}:8095"
- - name: aaf_locator_container
- value: "oom"
+ value: "https://aaf-locate.{{ $initRoot.aaf_namespace }}:8095"
+ - name: aaf_locator_container_ns
+ value: "{{ $initRoot.aaf_namespace }}"
+ {{- else }}
+ - name: aaf_locate_url
+ value: "https://aaf-locate.{{ $dot.Release.Namespace }}:8095"
- name: aaf_locator_container_ns
value: "{{ $dot.Release.Namespace }}"
+ {{- end }}
+ - name: aaf_locator_container
+ value: "oom"
- name: aaf_locator_fqdn
value: "{{ $initRoot.fqdn }}"
- name: aaf_locator_app_ns
@@ -183,7 +190,7 @@
{{- define "common.certInitializer._volumes" -}}
{{- $dot := default . .dot -}}
{{- $initRoot := default $dot.Values.certInitializer .initRoot -}}
-{{- $subchartDot := mergeOverwrite (deepCopy (omit $dot "Values")) (dict "Chart" (set (fromJson (toJson $dot.Chart)) "Name" $initRoot.nameOverride) "Values" (mergeOverwrite (deepCopy $initRoot) (dict "global" $dot.Values.global))) }}
+{{- $subchartDot := fromJson (include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot))}}
- name: {{ include "common.certInitializer._aafConfigVolumeName" $dot }}
emptyDir:
medium: Memory
diff --git a/kubernetes/common/common/templates/_utils.tpl b/kubernetes/common/common/templates/_utils.tpl
index ece786f49f..52826c2bd2 100644
--- a/kubernetes/common/common/templates/_utils.tpl
+++ b/kubernetes/common/common/templates/_utils.tpl
@@ -36,6 +36,5 @@ Usage:
{{- define "common.subChartDot" }}
{{- $initRoot := .initRoot }}
{{- $dot := .dot }}
-{{/* Our version of helm doesn't support deepCopy so we need this nasty trick */}}
-{{ mergeOverwrite (deepCopy (omit $dot "Values")) (dict "Chart" (set (fromJson (toJson $dot.Chart)) "Name" $initRoot.nameOverride) "Values" (mergeOverwrite (deepCopy $initRoot) (dict "global" $dot.Values.global))) | toJson }}
+{{ mergeOverwrite (deepCopy (omit $dot "Values" "Chart")) (dict "Chart" (set (set (fromJson (toJson $dot.Chart)) "Name" $initRoot.nameOverride) "Version" $dot.Chart.Version) "Values" (mergeOverwrite (deepCopy $initRoot) (dict "global" $dot.Values.global))) | toJson }}
{{- end -}}
diff --git a/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl b/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl
index 71201a1cc6..90c278e4c5 100644
--- a/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl
+++ b/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl
@@ -83,10 +83,14 @@
{{- end }}
env:
- name: NAMESPACE
+ {{- if $subchartDot.Values.namespace }}
+ value: {{ $subchartDot.Values.namespace }}
+ {{- else }}
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
+ {{- end }}
resources:
limits:
cpu: {{ $subchartDot.Values.limits.cpu }}
diff --git a/kubernetes/common/repositoryGenerator/values.yaml b/kubernetes/common/repositoryGenerator/values.yaml
index ee56577c63..e36ad4904c 100644
--- a/kubernetes/common/repositoryGenerator/values.yaml
+++ b/kubernetes/common/repositoryGenerator/values.yaml
@@ -24,12 +24,12 @@ global:
# common global images
busyboxImage: busybox:1.32
- curlImage: curlimages/curl:7.69.1
+ curlImage: curlimages/curl:7.80.0
envsubstImage: dibi/envsubst:1
# there's only latest image for htpasswd
htpasswdImage: xmartlabs/htpasswd:latest
jettyImage: jetty:9-jdk11-slim
- jreImage: onap/integration-java11:7.1.0
+ jreImage: onap/integration-java11:10.0.0
kubectlImage: bitnami/kubectl:1.19
loggingImage: beats/filebeat:5.5.0
mariadbImage: bitnami/mariadb:10.6.5
diff --git a/kubernetes/dcaegen2-services/components/dcae-restconf-collector/values.yaml b/kubernetes/dcaegen2-services/components/dcae-restconf-collector/values.yaml
index ad29e33a90..66c781cb3b 100644
--- a/kubernetes/dcaegen2-services/components/dcae-restconf-collector/values.yaml
+++ b/kubernetes/dcaegen2-services/components/dcae-restconf-collector/values.yaml
@@ -107,6 +107,10 @@ credentials:
uid: *controllerCredsUID
key: password
+# application environments
+applicationEnv:
+ LOG4J_FORMAT_MSG_NO_LOOKUPS: 'true'
+
# Initial Application Configuration
applicationConfig:
collector.rcc.appDescription: DCAE RestConf Collector Application
diff --git a/kubernetes/dcaegen2-services/components/dcae-ves-collector/values.yaml b/kubernetes/dcaegen2-services/components/dcae-ves-collector/values.yaml
index f863ff8641..31007f2dde 100644
--- a/kubernetes/dcaegen2-services/components/dcae-ves-collector/values.yaml
+++ b/kubernetes/dcaegen2-services/components/dcae-ves-collector/values.yaml
@@ -107,6 +107,7 @@ service:
# application environments
applicationEnv:
CBS_CLIENT_CONFIG_PATH: '/app-config-input/application_config.yaml'
+ LOG4J_FORMAT_MSG_NO_LOOKUPS: 'true'
# initial application configuration
applicationConfig:
diff --git a/kubernetes/dcaegen2-services/components/dcae-ves-mapper/values.yaml b/kubernetes/dcaegen2-services/components/dcae-ves-mapper/values.yaml
index a7186a4d98..93214d3057 100644
--- a/kubernetes/dcaegen2-services/components/dcae-ves-mapper/values.yaml
+++ b/kubernetes/dcaegen2-services/components/dcae-ves-mapper/values.yaml
@@ -70,6 +70,9 @@ service:
port: 80
port_protocol: http
+# application environments
+applicationEnv:
+ LOG4J_FORMAT_MSG_NO_LOOKUPS: 'true'
# Initial Application Configuration
applicationConfig:
diff --git a/kubernetes/dmaap/components/message-router/components/message-router-kafka/templates/statefulset.yaml b/kubernetes/dmaap/components/message-router/components/message-router-kafka/templates/statefulset.yaml
index 7cedbf89d1..ebb5f7e392 100644
--- a/kubernetes/dmaap/components/message-router/components/message-router-kafka/templates/statefulset.yaml
+++ b/kubernetes/dmaap/components/message-router/components/message-router-kafka/templates/statefulset.yaml
@@ -169,6 +169,12 @@ spec:
value: "{{ include "common.kafkaNodes" (dict "dot" . "replicaCount" .Values.zookeeper.replicaCount "componentName" .Values.zookeeper.name "port" .Values.zookeeper.port ) }}"
- name: KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE
value: "{{ .Values.kafka.enableSupport }}"
+ - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
+ value: "{{ .Values.config.offsets_topic_replication_factor | default .Values.replicaCount }}"
+ - name: KAFKA_NUM_PARTITIONS
+ value: "{{ .Values.config.num_partition | default .Values.replicaCount }}"
+ - name: KAFKA_DEFAULT_REPLICATION_FACTOR
+ value: "{{ .Values.config.default_replication_factor | default .Values.replicaCount }}"
{{- if .Values.global.aafEnabled }}
- name: KAFKA_OPTS
value: "{{ .Values.kafka.jaasOptionsAaf }}"
diff --git a/kubernetes/dmaap/components/message-router/components/message-router-kafka/values.yaml b/kubernetes/dmaap/components/message-router/components/message-router-kafka/values.yaml
index 16a4c0fccb..be0de969c1 100644
--- a/kubernetes/dmaap/components/message-router/components/message-router-kafka/values.yaml
+++ b/kubernetes/dmaap/components/message-router/components/message-router-kafka/values.yaml
@@ -77,17 +77,18 @@ kafka:
interBrokerListernerAaf: INTERNAL_SASL_PLAINTEXT
interBrokerListerner: INTERNAL_PLAINTEXT
+config: {}
+ # offsets_topic_replication_factor:
+ # num_partition:
+ # default_replication_factor:
configurationOverrides:
- "offsets.topic.replication.factor": "3"
"log.dirs": "/var/lib/kafka/data"
"log.retention.hours": "168"
- "num.partitions": "3"
"transaction.state.log.replication.factor": "1"
"transaction.state.log.min.isr": "1"
"num.recovery.threads.per.data.dir": "5"
"zookeeper.connection.timeout.ms": "6000"
- "default.replication.factor": "3"
"zookeeper.set.acl": "true"
jmx:
diff --git a/kubernetes/onap/values.yaml b/kubernetes/onap/values.yaml
index aecac0f71a..1b6099a0cd 100755
--- a/kubernetes/onap/values.yaml
+++ b/kubernetes/onap/values.yaml
@@ -81,7 +81,7 @@ global:
busyboxImage: busybox:1.32
# curl image
- curlImage: curlimages/curl:7.69.1
+ curlImage: curlimages/curl:7.80.0
# env substitution image
envsubstImage: dibi/envsubst:1
@@ -112,7 +112,7 @@ global:
pullPolicy: Always
# default java image
- jreImage: onap/integration-java11:7.2.0
+ jreImage: onap/integration-java11:10.0.0
# default clusterName
# {{ template "common.fullname" . }}.{{ template "common.namespace" . }}.svc.{{ .Values.global.clusterName }}
diff --git a/kubernetes/policy/components/policy-api/values.yaml b/kubernetes/policy/components/policy-api/values.yaml
index 26ed0a77eb..43ec1d7e62 100755
--- a/kubernetes/policy/components/policy-api/values.yaml
+++ b/kubernetes/policy/components/policy-api/values.yaml
@@ -93,7 +93,7 @@ db:
internalPort: 3306
restServer:
- user: healthcheck
+ user: policyadmin
password: none
# default number of instances
diff --git a/kubernetes/policy/components/policy-clamp-be/resources/config/application.properties b/kubernetes/policy/components/policy-clamp-be/resources/config/application.properties
index aa9870ae41..cd6c6faa03 100644
--- a/kubernetes/policy/components/policy-clamp-be/resources/config/application.properties
+++ b/kubernetes/policy/components/policy-clamp-be/resources/config/application.properties
@@ -53,10 +53,10 @@ clamp.config.files.sdcController=file:/opt/policy/clamp/sdc-controllers-config-p
#
# Configuration Settings for Policy Engine Components
clamp.config.policy.api.url=https://policy-api.{{ include "common.namespace" . }}:6969
-clamp.config.policy.api.userName=healthcheck
+clamp.config.policy.api.userName=policyadmin
clamp.config.policy.api.password=zb!XztG34
clamp.config.policy.pap.url=https://policy-pap.{{ include "common.namespace" . }}:6969
-clamp.config.policy.pap.userName=healthcheck
+clamp.config.policy.pap.userName=policyadmin
clamp.config.policy.pap.password=zb!XztG34
#DCAE Inventory Url Properties
diff --git a/kubernetes/policy/components/policy-clamp-cl-pf-ppnt/values.yaml b/kubernetes/policy/components/policy-clamp-cl-pf-ppnt/values.yaml
index 791b785502..a831da8df4 100644
--- a/kubernetes/policy/components/policy-clamp-cl-pf-ppnt/values.yaml
+++ b/kubernetes/policy/components/policy-clamp-cl-pf-ppnt/values.yaml
@@ -89,10 +89,10 @@ replicaCount: 1
# application configuration
restServer:
api:
- user: healthcheck
+ user: policyadmin
password: none
pap:
- user: healthcheck
+ user: policyadmin
password: none
nodeSelector: {}
diff --git a/kubernetes/policy/components/policy-distribution/values.yaml b/kubernetes/policy/components/policy-distribution/values.yaml
index 2d80fbb216..ef676bb2c4 100755
--- a/kubernetes/policy/components/policy-distribution/values.yaml
+++ b/kubernetes/policy/components/policy-distribution/values.yaml
@@ -79,10 +79,10 @@ restServer:
user: healthcheck
password: zb!XztG34
apiParameters:
- user: healthcheck
+ user: policyadmin
password: zb!XztG34
papParameters:
- user: healthcheck
+ user: policyadmin
password: zb!XztG34
sdcBe:
user: policy
diff --git a/kubernetes/policy/components/policy-drools-pdp/values.yaml b/kubernetes/policy/components/policy-drools-pdp/values.yaml
index fa0fda80e1..4d7c0f2fac 100755
--- a/kubernetes/policy/components/policy-drools-pdp/values.yaml
+++ b/kubernetes/policy/components/policy-drools-pdp/values.yaml
@@ -124,7 +124,7 @@ db:
password: policy_user
pap:
- user: healthcheck
+ user: policyadmin
password: zb!XztG34
pdp:
diff --git a/kubernetes/policy/components/policy-pap/values.yaml b/kubernetes/policy/components/policy-pap/values.yaml
index d7135524d3..e7db99e2c6 100755
--- a/kubernetes/policy/components/policy-pap/values.yaml
+++ b/kubernetes/policy/components/policy-pap/values.yaml
@@ -108,12 +108,12 @@ db:
internalPort: 3306
restServer:
- user: healthcheck
+ user: policyadmin
password: none
healthCheckRestClient:
api:
- user: healthcheck
+ user: policyadmin
password: none
distribution:
user: healthcheck
diff --git a/kubernetes/policy/components/policy-xacml-pdp/values.yaml b/kubernetes/policy/components/policy-xacml-pdp/values.yaml
index 7c2d1b13a8..2007ab29c6 100755
--- a/kubernetes/policy/components/policy-xacml-pdp/values.yaml
+++ b/kubernetes/policy/components/policy-xacml-pdp/values.yaml
@@ -103,7 +103,7 @@ restServer:
password: zb!XztG34
apiServer:
- user: healthcheck
+ user: policyadmin
password: zb!XztG34
# default number of instances
diff --git a/kubernetes/policy/values.yaml b/kubernetes/policy/values.yaml
index 5204aa7568..851c8957ae 100755
--- a/kubernetes/policy/values.yaml
+++ b/kubernetes/policy/values.yaml
@@ -183,9 +183,9 @@ mariadb-galera:
nameOverride: *policy-mariadb
restServer:
- policyPapUserName: healthcheck
+ policyPapUserName: policyadmin
policyPapUserPassword: zb!XztG34
- policyApiUserName: healthcheck
+ policyApiUserName: policyadmin
policyApiUserPassword: zb!XztG34
# Resource Limit flavor -By Default using small
diff --git a/kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml b/kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml
index 69b0fd3bb8..b788a36248 100644
--- a/kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml
+++ b/kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml
@@ -79,6 +79,8 @@ spec:
value: "{{ .Values.config.configDir }}"
- name: SDNC_CONFIG_DIR
value: "{{ .Values.config.configDir }}"
+ - name: LOG4J_FORMAT_MSG_NO_LOOKUPS
+ value: "true"
volumeMounts:
- mountPath: /etc/localtime
name: localtime
diff --git a/kubernetes/sdnc/components/ueb-listener/templates/deployment.yaml b/kubernetes/sdnc/components/ueb-listener/templates/deployment.yaml
index 603f3a3f99..a23a6af460 100644
--- a/kubernetes/sdnc/components/ueb-listener/templates/deployment.yaml
+++ b/kubernetes/sdnc/components/ueb-listener/templates/deployment.yaml
@@ -84,6 +84,8 @@ spec:
value: "{{ .Values.config.configDir }}"
- name: SDNC_CONFIG_DIR
value: "{{ .Values.config.configDir }}"
+ - name: LOG4J_FORMAT_MSG_NO_LOOKUPS
+ value: "true"
volumeMounts:
- mountPath: /etc/localtime
name: localtime
diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml
index f53c41c0f5..d252c9a3fb 100644
--- a/kubernetes/sdnc/templates/statefulset.yaml
+++ b/kubernetes/sdnc/templates/statefulset.yaml
@@ -285,6 +285,8 @@ spec:
value: "{{ .Values.config.javaHome}}"
- name: JAVA_OPTS
value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
+ - name: LOG4J_FORMAT_MSG_NO_LOOKUPS
+ value: "true"
- name: KARAF_CONSOLE_LOG_LEVEL
value: "{{ include "common.log.level" . }}"
- name: SDNRWT