From 7723ffe4fbf131cf3562343cc91a7b88c984b55f Mon Sep 17 00:00:00 2001 From: Jack Lucas Date: Thu, 13 Feb 2020 17:19:01 -0500 Subject: [PATCH] Add dcaemod charts Issue-ID: DCAEGEN2-1866 Change-Id: I0179e1e75529ad8017b1a5c23747dbd80aa6f625 Signed-off-by: Jack Lucas Signed-off-by: Krzysztof Opasiak Signed-off-by: Sylvain Desbureaux --- kubernetes/dcaemod/.helmignore | 21 ++++ kubernetes/dcaemod/Chart.yaml | 21 ++++ kubernetes/dcaemod/Makefile | 36 +++++++ .../components/dcaemod-designtool/Chart.yaml | 21 ++++ .../dcaemod-designtool/requirements.yaml | 21 ++++ .../dcaemod-designtool/templates/deployment.yaml | 86 +++++++++++++++ .../dcaemod-designtool/templates/ingress.yaml | 16 +++ .../dcaemod-designtool/templates/service.yaml | 18 ++++ .../components/dcaemod-designtool/values.yaml | 95 +++++++++++++++++ .../components/dcaemod-distributor-api/Chart.yaml | 21 ++++ .../dcaemod-distributor-api/requirements.yaml | 21 ++++ .../templates/deployment.yaml | 74 +++++++++++++ .../dcaemod-distributor-api/templates/ingress.yaml | 16 +++ .../dcaemod-distributor-api/templates/service.yaml | 18 ++++ .../components/dcaemod-distributor-api/values.yaml | 94 +++++++++++++++++ .../components/dcaemod-genprocessor/Chart.yaml | 21 ++++ .../dcaemod-genprocessor/requirements.yaml | 21 ++++ .../dcaemod-genprocessor/templates/deployment.yaml | 63 +++++++++++ .../dcaemod-genprocessor/templates/ingress.yaml | 16 +++ .../dcaemod-genprocessor/templates/pv.yaml | 18 ++++ .../dcaemod-genprocessor/templates/pvc.yaml | 17 +++ .../dcaemod-genprocessor/templates/service.yaml | 18 ++++ .../components/dcaemod-genprocessor/values.yaml | 99 ++++++++++++++++++ .../components/dcaemod-nifi-registry/Chart.yaml | 21 ++++ .../dcaemod-nifi-registry/requirements.yaml | 21 ++++ .../templates/deployment.yaml | 75 +++++++++++++ .../dcaemod-nifi-registry/templates/pv.yaml | 19 ++++ .../dcaemod-nifi-registry/templates/pvc.yaml | 17 +++ .../dcaemod-nifi-registry/templates/secrets.yaml | 17 +++ .../dcaemod-nifi-registry/templates/service.yaml | 18 ++++ .../components/dcaemod-nifi-registry/values.yaml | 93 +++++++++++++++++ .../components/dcaemod-onboarding-api/.helmignore | 21 ++++ .../components/dcaemod-onboarding-api/Chart.yaml | 21 ++++ .../dcaemod-onboarding-api/requirements.yaml | 24 +++++ .../templates/deployment.yaml | 80 ++++++++++++++ .../dcaemod-onboarding-api/templates/ingress.yaml | 16 +++ .../dcaemod-onboarding-api/templates/secret.yaml | 15 +++ .../dcaemod-onboarding-api/templates/service.yaml | 18 ++++ .../components/dcaemod-onboarding-api/values.yaml | 116 +++++++++++++++++++++ .../components/dcaemod-runtime-api/.helmignore | 21 ++++ .../components/dcaemod-runtime-api/Chart.yaml | 21 ++++ .../dcaemod-runtime-api/requirements.yaml | 22 ++++ .../dcaemod-runtime-api/templates/deployment.yaml | 55 ++++++++++ .../dcaemod-runtime-api/templates/secrets.yaml | 17 +++ .../dcaemod-runtime-api/templates/service.yaml | 18 ++++ .../components/dcaemod-runtime-api/values.yaml | 89 ++++++++++++++++ kubernetes/dcaemod/requirements.yaml | 37 +++++++ kubernetes/onap/requirements.yaml | 4 + kubernetes/onap/resources/overrides/onap-all.yaml | 2 + kubernetes/onap/values.yaml | 2 + 50 files changed, 1732 insertions(+) create mode 100644 kubernetes/dcaemod/.helmignore create mode 100644 kubernetes/dcaemod/Chart.yaml create mode 100644 kubernetes/dcaemod/Makefile create mode 100644 kubernetes/dcaemod/components/dcaemod-designtool/Chart.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-designtool/requirements.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-designtool/templates/deployment.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-designtool/templates/ingress.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-designtool/templates/service.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-designtool/values.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-distributor-api/Chart.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-distributor-api/requirements.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-distributor-api/templates/deployment.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-distributor-api/templates/ingress.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-distributor-api/templates/service.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-distributor-api/values.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-genprocessor/Chart.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-genprocessor/requirements.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-genprocessor/templates/ingress.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-genprocessor/templates/pv.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-genprocessor/templates/pvc.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-genprocessor/templates/service.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-genprocessor/values.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-nifi-registry/Chart.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-nifi-registry/requirements.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/deployment.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/pv.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/pvc.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/secrets.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/service.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-nifi-registry/values.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-onboarding-api/.helmignore create mode 100644 kubernetes/dcaemod/components/dcaemod-onboarding-api/Chart.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-onboarding-api/requirements.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/deployment.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/ingress.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/secret.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/service.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-onboarding-api/values.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-runtime-api/.helmignore create mode 100644 kubernetes/dcaemod/components/dcaemod-runtime-api/Chart.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-runtime-api/requirements.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-runtime-api/templates/deployment.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-runtime-api/templates/secrets.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-runtime-api/templates/service.yaml create mode 100644 kubernetes/dcaemod/components/dcaemod-runtime-api/values.yaml create mode 100644 kubernetes/dcaemod/requirements.yaml diff --git a/kubernetes/dcaemod/.helmignore b/kubernetes/dcaemod/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/dcaemod/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/dcaemod/Chart.yaml b/kubernetes/dcaemod/Chart.yaml new file mode 100644 index 0000000000..9fe96fb7e2 --- /dev/null +++ b/kubernetes/dcaemod/Chart.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: v1 +description: ONAP DCAE MOD +name: dcaemod +version: 6.0.0 diff --git a/kubernetes/dcaemod/Makefile b/kubernetes/dcaemod/Makefile new file mode 100644 index 0000000000..b1e5a7355e --- /dev/null +++ b/kubernetes/dcaemod/Makefile @@ -0,0 +1,36 @@ +# Copyright © 2020 AT&T Intellectual Property. All rights reserved. +# +# 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. +make-dcaemod: make-dcaemod-distributor-api make-dcaemod-genprocessor make-dcaemod-designtool make-dcaemod-onboarding-api make-dcaemod-runtime-api make-dcaemod-nifi-registry + +make-dcaemod-distributor-api: + cd components && helm dep up dcaemod-genprocessor && helm lint dcaemod-genprocessor + +make-dcaemod-genprocessor: + cd components && helm dep up dcaemod-distributor-api && helm lint dcaemod-distributor-api + +make-dcaemod-designtool: + cd components && helm dep up dcaemod-designtool && helm lint dcaemod-designtool + +make-dcaemod-onboarding-api: + cd components && helm dep up dcaemod-onboarding-api && helm lint dcaemod-onboarding-api + +make-dcaemod-runtime-api: + cd components && helm dep up dcaemod-runtime-api && helm lint dcaemod-runtime-api + +make-dcaemod-nifi-registry: + cd components && helm dep up dcaemod-nifi-registry && helm lint dcaemod-nifi-registry + +clean: + @find . -type f -name '*.tgz' -delete + @find . -type f -name '*.lock' -delete diff --git a/kubernetes/dcaemod/components/dcaemod-designtool/Chart.yaml b/kubernetes/dcaemod/components/dcaemod-designtool/Chart.yaml new file mode 100644 index 0000000000..eeda833f76 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-designtool/Chart.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: v1 +description: ONAP DCAE MOD Design Tool +name: dcaemod-designtool +version: 6.0.0 diff --git a/kubernetes/dcaemod/components/dcaemod-designtool/requirements.yaml b/kubernetes/dcaemod/components/dcaemod-designtool/requirements.yaml new file mode 100644 index 0000000000..54c2049db2 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-designtool/requirements.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +dependencies: + - name: common + version: ~5.x-0 + repository: '@local' diff --git a/kubernetes/dcaemod/components/dcaemod-designtool/templates/deployment.yaml b/kubernetes/dcaemod/components/dcaemod-designtool/templates/deployment.yaml new file mode 100644 index 0000000000..2144418fbb --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-designtool/templates/deployment.yaml @@ -0,0 +1,86 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: apps/v1 +kind: Deployment +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +spec: + replicas: 1 + selector: {{- include "common.selectors" . | nindent 4 }} + template: + metadata: {{- include "common.templateMetadata" . | nindent 6 }} + spec: + initContainers: + - name: {{ include "common.name" . }}-readiness + image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - /root/ready.py + args: + - --container-name + - dcaemod-genprocessor-http + - --container-name + - dcaemod-nifi-registry + - --container-name + - dcaemod-distributor-api + - "-t" + - "15" + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: {{ include "common.name" . }}-create-bucket + image: {{ .Values.config.curlImage }} + args: + - -kv + - -X + - POST + - -H + - "Content-Type: application/json" + - --data-binary + - '{"name": "dcaemod-flows"}' + - http://dcaemod-nifi-registry:18080/nifi-registry-api/buckets + + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: {{ include "common.containerPorts" . | nindent 12 }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.liveness.port }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + httpGet: + path: {{ .Values.readiness.path }} + port: {{ .Values.readiness.port }} + scheme: {{ .Values.readiness.scheme }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: {{ include "common.resources" . | nindent 12 }} + env: + - name: NIFI_DCAE_JARS_INDEX_URL + value: {{ .Values.config.nifiJarsIndexURL }} + - name: NIFI_DCAE_DISTRIBUTOR_API_URL + value: {{ .Values.config.distributorAPIURL }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dcaemod/components/dcaemod-designtool/templates/ingress.yaml b/kubernetes/dcaemod/components/dcaemod-designtool/templates/ingress.yaml new file mode 100644 index 0000000000..6bc21e341d --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-designtool/templates/ingress.yaml @@ -0,0 +1,16 @@ +# ================================================================================ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +{{ include "common.ingress" . }} \ No newline at end of file diff --git a/kubernetes/dcaemod/components/dcaemod-designtool/templates/service.yaml b/kubernetes/dcaemod/components/dcaemod-designtool/templates/service.yaml new file mode 100644 index 0000000000..85d137b4b3 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-designtool/templates/service.yaml @@ -0,0 +1,18 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.service" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-designtool/values.yaml b/kubernetes/dcaemod/components/dcaemod-designtool/values.yaml new file mode 100644 index 0000000000..d9e00ace0f --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-designtool/values.yaml @@ -0,0 +1,95 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +################################################################# +# Global configuration defaults. +################################################################# +global: + persistence: {} + nodePortPrefix: 302 + nodePortPrefixExt: 304 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + + ingress: + enabled: true + virtualhost: + enabled: false + +config: + nifiJarsIndexURL: http://dcaemod-genprocessor/nifi-jars + distributorAPIURL: /distributor + curlImage: curlimages/curl:7.68.0 + +# application image +repository: nexus3.onap.org:10001 +image: onap/org.onap.dcaegen2.platform.mod.designtool-web:1.0.0 + +service: + type: ClusterIP + name: dcaemod-designtool + ports: + - name: http + port: 8080 + +ingress: + enabled: true + service: + - baseaddr: "nifi" + name: "dcaemod-designtool" + port: 8080 + - baseaddr: "nifi-api" + name: "dcaemod-designtool" + port: 8080 + config: + ssl: "none" + +# probe configuration parameters +liveness: + initialDelaySeconds: 90 + periodSeconds: 30 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + port: http + +readiness: + initialDelaySeconds: 60 + periodSeconds: 20 + path: /nifi-api/system-diagnostics + scheme: HTTP + port: http + +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 2 + memory: 2Gi + unlimited: {} diff --git a/kubernetes/dcaemod/components/dcaemod-distributor-api/Chart.yaml b/kubernetes/dcaemod/components/dcaemod-distributor-api/Chart.yaml new file mode 100644 index 0000000000..e56e62f701 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-distributor-api/Chart.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: v1 +description: ONAP DCAE MOD Distributor API +name: dcaemod-distributor-api +version: 6.0.0 diff --git a/kubernetes/dcaemod/components/dcaemod-distributor-api/requirements.yaml b/kubernetes/dcaemod/components/dcaemod-distributor-api/requirements.yaml new file mode 100644 index 0000000000..f6868efb55 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-distributor-api/requirements.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +dependencies: + - name: common + version: ~5.x-0 + repository: '@local' diff --git a/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/deployment.yaml b/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/deployment.yaml new file mode 100644 index 0000000000..a70cc4af5a --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/deployment.yaml @@ -0,0 +1,74 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: apps/v1 +kind: Deployment +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +spec: + replicas: 1 + selector: {{- include "common.selectors" . | nindent 4 }} + template: + metadata: {{- include "common.templateMetadata" . | nindent 6 }} + spec: + initContainers: + - name: {{ include "common.name" . }}-readiness + image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - /root/ready.py + args: + - --container-name + - dcaemod-runtime-api + - --container-name + - dcaemod-nifi-registry + - --container-name + - dcaemod-onboarding-api + - "-t" + - "15" + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: {{ include "common.containerPorts" . | nindent 12 }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.liveness.port }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + httpGet: + path: {{ .Values.readiness.path }} + port: {{ .Values.readiness.port }} + scheme: {{ .Values.readiness.scheme }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + - name: NIFI_REGISTRY_URL + value: {{ .Values.config.nifiRegistryURL }} + - name : ONBOARDING_API_URL + value: {{ .Values.config.onboardingAPIURL }} + resources: {{ include "common.resources" . | nindent 12 }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/ingress.yaml b/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/ingress.yaml new file mode 100644 index 0000000000..a996d3c1ad --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/ingress.yaml @@ -0,0 +1,16 @@ +# ================================================================================ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +{{ include "common.ingress" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/service.yaml b/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/service.yaml new file mode 100644 index 0000000000..2314610a04 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-distributor-api/templates/service.yaml @@ -0,0 +1,18 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.service" . }} \ No newline at end of file diff --git a/kubernetes/dcaemod/components/dcaemod-distributor-api/values.yaml b/kubernetes/dcaemod/components/dcaemod-distributor-api/values.yaml new file mode 100644 index 0000000000..3d9c377885 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-distributor-api/values.yaml @@ -0,0 +1,94 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +################################################################# +# Global configuration defaults. +################################################################# +global: + persistence: {} + nodePortPrefix: 302 + nodePortPrefixExt: 304 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + + ingress: + enabled: true + virtualhost: + enabled: false + +config: + nifiRegistryURL: http://dcaemod-nifi-registry:18080/nifi-registry-api + onboardingAPIURL: http://dcaemod-onboarding-api/onboarding + +# application image +repository: nexus3.onap.org:10001 +image: onap/org.onap.dcaegen2.platform.mod.distributorapi:1.0.0 + +service: + type: ClusterIP + name: dcaemod-distributor-api + ports: + - name: http + port: 80 + +ingress: + enabled: true + service: + - baseaddr: "distributor" + name: dcaemod-distributor-api + port: 80 + config: + ssl: "none" + +# probe configuration parameters +liveness: + initialDelaySeconds: 60 + periodSeconds: 30 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + port: http + +readiness: + initialDelaySeconds: 60 + periodSeconds: 20 + # Should have a proper readiness endpoint + # This will be OK as long as we have a small number + # of distribution targets + path: /distributor/distribution-targets + scheme: HTTP + port: http + +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 2 + memory: 2Gi + unlimited: {} diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/Chart.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/Chart.yaml new file mode 100644 index 0000000000..781c30e41a --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/Chart.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: v1 +description: ONAP DCAE MOD Genprocessor +name: dcaemod-genprocessor +version: 6.0.0 diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/requirements.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/requirements.yaml new file mode 100644 index 0000000000..f6868efb55 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/requirements.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +dependencies: + - name: common + version: ~5.x-0 + repository: '@local' diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml new file mode 100644 index 0000000000..6b15abe909 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/deployment.yaml @@ -0,0 +1,63 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: apps/v1 +kind: Deployment +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +spec: + replicas: 1 + selector: {{- include "common.selectors" . | nindent 4 }} + template: + metadata: {{- include "common.templateMetadata" . | nindent 6 }} + spec: + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: {{ include "common.containerPorts" . | nindent 12 }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.liveness.port }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + tcpSocket: + port: {{ .Values.readiness.port }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + - name: GENPROC_ONBOARDING_API_HOST + value: {{ .Values.config.onboardingAPIURL }} + volumeMounts: + - mountPath: /work/ + name: genprocessor-data + resources: {{ include "common.resources" . | nindent 12 }} + - name: {{ include "common.name" . }}-http + image: "{{ include "common.repository" . }}/{{ .Values.httpImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + volumeMounts: + - mountPath: /www/data + name: genprocessor-data + readOnly: true + volumes: + - name: genprocessor-data + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/ingress.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/ingress.yaml new file mode 100644 index 0000000000..6bc21e341d --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/ingress.yaml @@ -0,0 +1,16 @@ +# ================================================================================ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +{{ include "common.ingress" . }} \ No newline at end of file diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/pv.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/pv.yaml new file mode 100644 index 0000000000..c97ef736bb --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/pv.yaml @@ -0,0 +1,18 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.PV" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/pvc.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/pvc.yaml new file mode 100644 index 0000000000..cdf2728359 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/pvc.yaml @@ -0,0 +1,17 @@ +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.PVC" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/service.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/service.yaml new file mode 100644 index 0000000000..b20e564065 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/templates/service.yaml @@ -0,0 +1,18 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.service" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-genprocessor/values.yaml b/kubernetes/dcaemod/components/dcaemod-genprocessor/values.yaml new file mode 100644 index 0000000000..7096a16a1b --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-genprocessor/values.yaml @@ -0,0 +1,99 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +################################################################# +# Global configuration defaults. +################################################################# +global: + persistence: {} + nodePortPrefix: 302 + nodePortPrefixExt: 304 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + ingress: + enabled: true + virtualhost: + enabled: false + +config: + onboardingAPIURL: http://dcaemod-onboarding-api/onboarding + +# application image +repository: nexus3.onap.org:10001 +image: onap/org.onap.dcaegen2.platform.mod.genprocessor-job:1.0.0 +httpImage: onap/org.onap.dcaegen2.platform.mod.genprocessor-http:1.0.0 + +service: + type: ClusterIP + name: dcaemod-genprocessor + ports: + - name: http + port: 80 + +ingress: + enabled: true + service: + - baseaddr: "nifi-jars" + name: dcaemod-genprocessor + port: 80 + config: + ssl: "none" + +# probe configuration parameters +liveness: + initialDelaySeconds: 60 + periodSeconds: 30 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + port: http + +readiness: + initialDelaySeconds: 60 + periodSeconds: 20 + port: http + # Should have a proper readiness endpoint or script + +# Parameters for persistent storage +persistence: + enabled: true +# Only the genprocessor-job writes, genprocessor-http mounts readOnly + accessMode: ReadWriteMany + size: 4Gi + mountPath: /dockerdata-nfs + mountSubPath: dcae-mod-genprocessor/data + volumeReclaimPolicy: Retain + +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 2 + memory: 2Gi + unlimited: {} diff --git a/kubernetes/dcaemod/components/dcaemod-nifi-registry/Chart.yaml b/kubernetes/dcaemod/components/dcaemod-nifi-registry/Chart.yaml new file mode 100644 index 0000000000..81a7a54967 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-nifi-registry/Chart.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: v1 +description: ONAP DCAE MOD Nifi Registry +name: dcaemod-nifi-registry +version: 6.0.0 diff --git a/kubernetes/dcaemod/components/dcaemod-nifi-registry/requirements.yaml b/kubernetes/dcaemod/components/dcaemod-nifi-registry/requirements.yaml new file mode 100644 index 0000000000..f6868efb55 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-nifi-registry/requirements.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +dependencies: + - name: common + version: ~5.x-0 + repository: '@local' diff --git a/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/deployment.yaml b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/deployment.yaml new file mode 100644 index 0000000000..17ca948ade --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/deployment.yaml @@ -0,0 +1,75 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: apps/v1 +kind: Deployment +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +spec: + replicas: 1 + selector: {{- include "common.selectors" . | nindent 4 }} + template: + metadata: {{- include "common.templateMetadata" . | nindent 6 }} + spec: + initContainers: + # nifi-registry app runs as user "nifi", uid 1000, group "nifi", gid 1000 + # the volume is mounted with root permissions + # this initContainer changes ownership to uid 1000 gid 1000 + # (tried using a securityContext in the pod spec, but it didn't seem to work) + - name: set-permissions + image: busybox:latest + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - sh + - -c + - chown -R 1000:1000 /opt/nifi-registry/nifi-registry-0.4.0/flow_storage + volumeMounts: + - mountPath: /opt/nifi-registry/nifi-registry-0.4.0/flow_storage + name: flow-storage + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: {{ include "common.containerPorts" . | nindent 12 }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.liveness.port }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + tcpSocket: + port: {{ .Values.readiness.port }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + volumeMounts: + - mountPath: /opt/nifi-registry/nifi-registry-0.4.0/flow_storage + name: flow-storage + resources: {{ include "common.resources" . | nindent 12 }} + env: + - name: NIFI_REGISTRY_DB_URL + value: {{ .Values.config.dbURL }} + - name: NIFI_REGISTRY_DB_USER + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "dbsecret" "key" "login") | indent 12 }} + - name: NIFI_REGISTRY_DB_PASS + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "dbsecret" "key" "password") | indent 12 }} + volumes: + - name: flow-storage + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/pv.yaml b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/pv.yaml new file mode 100644 index 0000000000..13c5357e45 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/pv.yaml @@ -0,0 +1,19 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + + +{{ include "common.PV" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/pvc.yaml b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/pvc.yaml new file mode 100644 index 0000000000..cdf2728359 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/pvc.yaml @@ -0,0 +1,17 @@ +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.PVC" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/secrets.yaml b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/secrets.yaml new file mode 100644 index 0000000000..3c2bb3300f --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/secrets.yaml @@ -0,0 +1,17 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +{{ include "common.secret" . }} \ No newline at end of file diff --git a/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/service.yaml b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/service.yaml new file mode 100644 index 0000000000..b20e564065 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-nifi-registry/templates/service.yaml @@ -0,0 +1,18 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.service" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-nifi-registry/values.yaml b/kubernetes/dcaemod/components/dcaemod-nifi-registry/values.yaml new file mode 100644 index 0000000000..058768ea08 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-nifi-registry/values.yaml @@ -0,0 +1,93 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +################################################################# +# Global configuration defaults. +################################################################# +global: + persistence: {} + nodePortPrefix: 302 + nodePortPrefixExt: 304 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + +config: + dbURL: jdbc:h2:./database/nifi-registry-primary + dbUser: nobody + dbPassword: nobody + +secrets: + - uid: "dbsecret" + type: basicAuth + login: '{{ .Values.config.dbUser }}' + password: '{{ .Values.config.dbPassword }}' + passwordPolicy: generate + +# application image +repository: docker.io +image: apache/nifi-registry:0.5.0 + +service: + type: ClusterIP + name: dcaemod-nifi-registry + ports: + - name: http + port: 18080 + +# probe configuration parameters +liveness: + initialDelaySeconds: 60 + periodSeconds: 30 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + port: http + +readiness: + initialDelaySeconds: 60 + periodSeconds: 20 + port: http + # Should have a proper readiness endpoint or script + +# Parameters for persistent storage +persistence: + enabled: true + accessMode: ReadWriteOnce + size: 4Gi + mountPath: /dockerdata-nfs + mountSubPath: dcae-mod-nifi-registry/data + volumeReclaimPolicy: Retain + +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 2 + memory: 2Gi + unlimited: {} diff --git a/kubernetes/dcaemod/components/dcaemod-onboarding-api/.helmignore b/kubernetes/dcaemod/components/dcaemod-onboarding-api/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-onboarding-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/dcaemod/components/dcaemod-onboarding-api/Chart.yaml b/kubernetes/dcaemod/components/dcaemod-onboarding-api/Chart.yaml new file mode 100644 index 0000000000..defe9d9957 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-onboarding-api/Chart.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: v1 +description: ONAP DCAE MOD Onboarding API +name: dcaemod-onboarding-api +version: 6.0.0 diff --git a/kubernetes/dcaemod/components/dcaemod-onboarding-api/requirements.yaml b/kubernetes/dcaemod/components/dcaemod-onboarding-api/requirements.yaml new file mode 100644 index 0000000000..de4a8f4835 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-onboarding-api/requirements.yaml @@ -0,0 +1,24 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +dependencies: + - name: common + version: ~5.x-0 + repository: '@local' + - name: postgres + version: ~5.x-0 + repository: '@local' diff --git a/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/deployment.yaml b/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/deployment.yaml new file mode 100644 index 0000000000..2a7a6c14ee --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/deployment.yaml @@ -0,0 +1,80 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: apps/v1 +kind: Deployment +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +spec: + replicas: 1 + selector: {{- include "common.selectors" . | nindent 4 }} + template: + metadata: {{- include "common.templateMetadata" . | nindent 6 }} + spec: + initContainers: + - name: {{ include "common.name" . }}-readiness + image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - /root/ready.py + args: + - --container-name + - {{ .Values.postgres.nameOverride }} + - "-t" + - "15" + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + containers: + - name: {{ include "common.name" . }} + command: + - sh + args: + - -c + - 'PG_CONN=postgresql://${PG_USER}:${PG_PASSWORD}@${PG_ADDR}:${PG_PORT}/${PG_DB_NAME} ./start.sh' + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: {{ include "common.containerPorts" . | nindent 12 }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.liveness.port }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + tcpSocket: + port: {{ .Values.readiness.port }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: {{ include "common.resources" . | nindent 12 }} + env: + - name: PG_ADDR + value: {{ .Values.postgres.service.name2 }} + # This should be kept in secret but it needs a fix in postgres common chart + - name: PG_USER + value: postgres + - name: PG_PASSWORD + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14 }} + - name: PG_PORT + value: "5432" + - name: PG_DB_NAME + value: dcae_onboarding_db + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/ingress.yaml b/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/ingress.yaml new file mode 100644 index 0000000000..6bc21e341d --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/ingress.yaml @@ -0,0 +1,16 @@ +# ================================================================================ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +{{ include "common.ingress" . }} \ No newline at end of file diff --git a/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/secret.yaml b/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/secret.yaml new file mode 100644 index 0000000000..dee311c336 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/secret.yaml @@ -0,0 +1,15 @@ +# Copyright © 2020 Samsung Electronics +# +# 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. + +{{ include "common.secret" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/service.yaml b/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/service.yaml new file mode 100644 index 0000000000..b20e564065 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-onboarding-api/templates/service.yaml @@ -0,0 +1,18 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.service" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-onboarding-api/values.yaml b/kubernetes/dcaemod/components/dcaemod-onboarding-api/values.yaml new file mode 100644 index 0000000000..656fd69742 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-onboarding-api/values.yaml @@ -0,0 +1,116 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + nodePortPrefixExt: 304 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + ingress: + enabled: true + virtualhost: + enabled: false +################################################################# +# Secrets metaconfig +################################################################# +secrets: + - uid: db-root-pass + name: &rootPassSecretName '{{ include "common.release" . }}-dcaemod-db-root-pass' + type: password + externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "dcaemod-db-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret)}}' + password: '{{ .Values.postgres.config.pgRootPassword }}' + - uid: db-primary-pass + name: &primaryPassSecretName '{{ include "common.release" . }}-dcaemod-db-primary-pass' + type: password + externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgPrimaryPasswordExternalSecret) .) (hasSuffix "dcaemod-db-primary-pass" .Values.postgres.config.pgPrimaryPasswordExternalSecret)}}' + password: '{{ .Values.postgres.config.pgPrimaryPassword }}' + +service: + type: ClusterIP + name: dcaemod-onboarding-api + ports: + - name: http + port: 80 +ingress: + enabled: true + service: + - baseaddr: "onboarding" + name: dcaemod-onboarding-api + port: 80 + config: + ssl: "none" + +# probe configuration parameters +liveness: + initialDelaySeconds: 60 + periodSeconds: 30 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + port: http + +readiness: + initialDelaySeconds: 60 + periodSeconds: 20 + port: http + # Should have a proper readiness endpoint or script + +# postgres values--overriding defaults in the postgres subchart +postgres: + nameOverride: dcaemod-db + service: + name: dcaemod-postgres + name2: dcaemod-pg-primary + name3: dcaemod-pg-replica + suffix: svc.cluster.local + container: + name: + primary: dcaemod-pg-primary + replica: dcaemod-pg-replica + config: + pgPrimaryPasswordExternalSecret: *primaryPassSecretName + pgRootPasswordExternalSecret: *rootPassSecretName + persistence: + mountSubPath: dcaemod/data + mountInitPath: dcaemod + +# application image +repository: nexus3.onap.org:10001 +image: onap/org.onap.dcaegen2.platform.mod.onboardingapi:2.12.0 + +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 2 + memory: 2Gi + unlimited: {} diff --git a/kubernetes/dcaemod/components/dcaemod-runtime-api/.helmignore b/kubernetes/dcaemod/components/dcaemod-runtime-api/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-runtime-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/dcaemod/components/dcaemod-runtime-api/Chart.yaml b/kubernetes/dcaemod/components/dcaemod-runtime-api/Chart.yaml new file mode 100644 index 0000000000..0abc522e45 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-runtime-api/Chart.yaml @@ -0,0 +1,21 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: v1 +description: ONAP DCAE MOD Runtime API +name: dcaemod-runtime-api +version: 6.0.0 diff --git a/kubernetes/dcaemod/components/dcaemod-runtime-api/requirements.yaml b/kubernetes/dcaemod/components/dcaemod-runtime-api/requirements.yaml new file mode 100644 index 0000000000..a7ee037690 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-runtime-api/requirements.yaml @@ -0,0 +1,22 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +dependencies: + - name: common + version: ~5.x-0 + repository: '@local' + diff --git a/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/deployment.yaml b/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/deployment.yaml new file mode 100644 index 0000000000..0043e8a95d --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/deployment.yaml @@ -0,0 +1,55 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: apps/v1 +kind: Deployment +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +spec: + replicas: 1 + selector: {{- include "common.selectors" . | nindent 4 }} + template: + metadata: {{- include "common.templateMetadata" . | nindent 6 }} + spec: + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: {{ include "common.containerPorts" . | nindent 12 }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.liveness.port }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + tcpSocket: + port: {{ .Values.readiness.port }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: {{ include "common.resources" . | nindent 12 }} + env: + - name: DASHBOARD_URL + value: {{ .Values.config.dashboardURL }} + - name: DASHBOARD_USERNAME + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "dashsecret" "key" "login") | indent 14 }} + - name: DASHBOARD_PASSWORD + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "dashsecret" "key" "password") | indent 14 }} + - name: ONAPDUBLIN_TOPICURL + value: {{ .Values.config.mrTopicURL }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/secrets.yaml b/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/secrets.yaml new file mode 100644 index 0000000000..3c2bb3300f --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/secrets.yaml @@ -0,0 +1,17 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= +{{ include "common.secret" . }} \ No newline at end of file diff --git a/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/service.yaml b/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/service.yaml new file mode 100644 index 0000000000..b20e564065 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-runtime-api/templates/service.yaml @@ -0,0 +1,18 @@ +#============LICENSE_START======================================================== +# ================================================================================ +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +{{ include "common.service" . }} diff --git a/kubernetes/dcaemod/components/dcaemod-runtime-api/values.yaml b/kubernetes/dcaemod/components/dcaemod-runtime-api/values.yaml new file mode 100644 index 0000000000..f21b7f9cb5 --- /dev/null +++ b/kubernetes/dcaemod/components/dcaemod-runtime-api/values.yaml @@ -0,0 +1,89 @@ +#============LICENSE_START======================================================== +#================================================================================= +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + nodePortPrefixExt: 304 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + +config: + dashboardURL: https://inventory:8080/dcae-service-types + # The dashboard credentials aren't actually used, since + # the inventory API and the dashboard pass-through to the + # inventory API don't require authentication. + # Since the password doesn't matter, we let it be + # generated by the common secret template. + dashboardUser: nobody + #dashboardPassword: doesntmatter + mrTopicURL: http://message-router:3904/events + +secrets: + - uid: "dashsecret" + type: basicAuth + login: '{{ .Values.config.dashboardUser }}' + password: '{{ .Values.config.dashboardPassword }}' + passwordPolicy: generate + +service: + type: ClusterIP + name: dcaemod-runtime-api + ports: + - name: http + port: 9090 + +# probe configuration parameters +liveness: + initialDelaySeconds: 60 + periodSeconds: 30 + port: http + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 60 + periodSeconds: 20 + port: http + # Should have a proper readiness endpoint or script + +# application image +repository: nexus3.onap.org:10001 +image: onap/org.onap.dcaegen2.platform.mod.runtime-web:1.0.0 + +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 2 + memory: 2Gi + unlimited: {} diff --git a/kubernetes/dcaemod/requirements.yaml b/kubernetes/dcaemod/requirements.yaml new file mode 100644 index 0000000000..9c417b069b --- /dev/null +++ b/kubernetes/dcaemod/requirements.yaml @@ -0,0 +1,37 @@ +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. +# +# 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. + +dependencies: + - name: common + version: ~5.x-0 + repository: '@local' + - name: dcaemod-genprocessor + version: ~6.x-0 + repository: 'file://components/dcaemod-genprocessor' + condition: dcaemod-genprocessor.enabled + - name: dcaemod-distributor-api + version: ~6.x-0 + repository: 'file://components/dcaemod-distributor-api' + - name: dcaemod-designtool + version: ~6.x-0 + repository: 'file://components/dcaemod-designtool' + - name: dcaemod-onboarding-api + version: ~6.x-0 + repository: 'file://components/dcaemod-onboarding-api' + - name: dcaemod-runtime-api + version: ~6.x-0 + repository: 'file://components/dcaemod-runtime-api' + - name: dcaemod-nifi-registry + version: ~6.x-0 + repository: 'file://components/dcaemod-nifi-registry' \ No newline at end of file diff --git a/kubernetes/onap/requirements.yaml b/kubernetes/onap/requirements.yaml index 314622f4c6..28fb49aa6d 100755 --- a/kubernetes/onap/requirements.yaml +++ b/kubernetes/onap/requirements.yaml @@ -60,6 +60,10 @@ dependencies: version: ~6.x-0 repository: '@local' condition: dcaegen2.enabled + - name: dcaemod + version: ~6.x-0 + repository: '@local' + condition: dcaemod.enabled - name: dmaap version: ~5.x-0 repository: '@local' diff --git a/kubernetes/onap/resources/overrides/onap-all.yaml b/kubernetes/onap/resources/overrides/onap-all.yaml index c93f2c44f7..d302298b1a 100644 --- a/kubernetes/onap/resources/overrides/onap-all.yaml +++ b/kubernetes/onap/resources/overrides/onap-all.yaml @@ -38,6 +38,8 @@ contrib: enabled: true dcaegen2: enabled: true +dcaemod: + enabled: true dmaap: enabled: true esr: diff --git a/kubernetes/onap/values.yaml b/kubernetes/onap/values.yaml index 86fd2635c7..4d69b9d3cb 100755 --- a/kubernetes/onap/values.yaml +++ b/kubernetes/onap/values.yaml @@ -146,6 +146,8 @@ contrib: enabled: false dcaegen2: enabled: false +dcaemod: + enabled: false pnda: enabled: false dmaap: -- 2.16.6