From 671f59b6b2e915ed7e5ac3a3b82b88a1395c7c70 Mon Sep 17 00:00:00 2001 From: dglFromAtt Date: Wed, 13 Mar 2019 15:50:40 +0000 Subject: Attempt2: Post-install jobs for DMaaP Provisioning This was originally committed under 81992 but got a merge conflict. I messed up resolving it so I abandoned 81992 and created this new commit. patchset2: replaced Release.Name for common.fullname in one of the charts patchset3: at Borislav's request, changed other references to common.fullname so the approach is consistent throughout the configmaps used for initialization. Along the way, hit a limit of 53 chars on some resource name. So changed the directory from the verbose dmaap-bus-controller to the more terse dbc. Change-Id: I1078003de094fee95c681f7fdaecb567235b7b3e Signed-off-by: dglFromAtt Issue-ID: DMAAP-904 Signed-off-by: dglFromAtt --- kubernetes/dmaap/components/dbc/.helmignore | 21 ++ kubernetes/dmaap/components/dbc/Chart.yaml | 19 ++ kubernetes/dmaap/components/dbc/README.md | 25 +++ kubernetes/dmaap/components/dbc/requirements.yaml | 21 ++ .../dbc/resources/config/buscontroller.env | 17 ++ .../dbc/resources/config/dmaapbc.properties | 217 +++++++++++++++++++++ .../dbc/resources/dcaeLocations/san-francisco.json | 5 + .../dmaap/components/dbc/resources/dmaap/onap.json | 11 ++ .../dbc/resources/mr_clusters/san-francisco.json | 6 + .../dmaap/components/dbc/templates/NOTES.txt | 34 ++++ .../dmaap/components/dbc/templates/configmap.yaml | 53 +++++ .../dmaap/components/dbc/templates/deployment.yaml | 103 ++++++++++ .../components/dbc/templates/post-install-job.yaml | 67 +++++++ .../dmaap/components/dbc/templates/service.yaml | 48 +++++ kubernetes/dmaap/components/dbc/values.yaml | 136 +++++++++++++ .../components/dmaap-bus-controller/.helmignore | 21 -- .../components/dmaap-bus-controller/Chart.yaml | 19 -- .../components/dmaap-bus-controller/README.md | 25 --- .../dmaap-bus-controller/requirements.yaml | 21 -- .../resources/config/buscontroller.env | 17 -- .../resources/config/dmaapbc.properties | 217 --------------------- .../resources/dcaeLocations/san-francisco.json | 5 - .../dmaap-bus-controller/resources/dmaap/onap.json | 11 -- .../resources/feeds/DefaultPM.json | 16 -- .../dmaap-bus-controller/resources/feeds/README | 3 - .../resources/mr_clusters/san-francisco.json | 6 - .../resources/topics/PNF_READY.json | 17 -- .../resources/topics/PNF_REGISTRATION.json | 17 -- .../dmaap-bus-controller/resources/topics/README | 3 - .../dmaap-bus-controller/templates/NOTES.txt | 34 ---- .../dmaap-bus-controller/templates/configmap.yaml | 92 --------- .../dmaap-bus-controller/templates/deployment.yaml | 129 ------------ .../dmaap-bus-controller/templates/service.yaml | 48 ----- .../components/dmaap-bus-controller/values.yaml | 133 ------------- .../resources/config/log/filebeat/filebeat.yml | 60 ++++++ .../dmaap-dr-node/resources/dr_nodes/central.yaml | 6 + .../dmaap-dr-node/resources/dr_nodes/edge.yaml | 6 + .../dmaap-dr-node/templates/configmap.yaml | 21 ++ .../dmaap-dr-node/templates/post-install-job.yaml | 62 ++++++ .../dmaap-dr-node/templates/statefulset.yaml | 4 +- .../resources/config/log/filebeat/filebeat.yml | 60 ++++++ .../dmaap-dr-prov/resources/feeds/DefaultPM.json | 16 ++ .../dmaap-dr-prov/resources/feeds/README | 3 + .../dmaap-dr-prov/templates/configmap.yaml | 47 +++++ .../dmaap-dr-prov/templates/deployment.yaml | 4 +- .../dmaap-dr-prov/templates/post-install-job.yaml | 75 +++++++ .../message-router/resources/topics/MMagent.json | 19 ++ .../message-router/resources/topics/PNF_READY.json | 17 ++ .../resources/topics/PNF_REGISTRATION.json | 17 ++ .../message-router/resources/topics/README | 3 + .../message-router/templates/configmap.yaml | 27 +++ .../message-router/templates/post-install-job.yaml | 66 +++++++ 52 files changed, 1292 insertions(+), 838 deletions(-) create mode 100644 kubernetes/dmaap/components/dbc/.helmignore create mode 100644 kubernetes/dmaap/components/dbc/Chart.yaml create mode 100644 kubernetes/dmaap/components/dbc/README.md create mode 100644 kubernetes/dmaap/components/dbc/requirements.yaml create mode 100644 kubernetes/dmaap/components/dbc/resources/config/buscontroller.env create mode 100644 kubernetes/dmaap/components/dbc/resources/config/dmaapbc.properties create mode 100644 kubernetes/dmaap/components/dbc/resources/dcaeLocations/san-francisco.json create mode 100644 kubernetes/dmaap/components/dbc/resources/dmaap/onap.json create mode 100644 kubernetes/dmaap/components/dbc/resources/mr_clusters/san-francisco.json create mode 100644 kubernetes/dmaap/components/dbc/templates/NOTES.txt create mode 100644 kubernetes/dmaap/components/dbc/templates/configmap.yaml create mode 100644 kubernetes/dmaap/components/dbc/templates/deployment.yaml create mode 100644 kubernetes/dmaap/components/dbc/templates/post-install-job.yaml create mode 100644 kubernetes/dmaap/components/dbc/templates/service.yaml create mode 100644 kubernetes/dmaap/components/dbc/values.yaml delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/.helmignore delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/Chart.yaml delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/README.md delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/requirements.yaml delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/config/buscontroller.env delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/config/dmaapbc.properties delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/dcaeLocations/san-francisco.json delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/dmaap/onap.json delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/feeds/DefaultPM.json delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/feeds/README delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/mr_clusters/san-francisco.json delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/PNF_READY.json delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/PNF_REGISTRATION.json delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/README delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/templates/NOTES.txt delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/templates/configmap.yaml delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/templates/deployment.yaml delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/templates/service.yaml delete mode 100644 kubernetes/dmaap/components/dmaap-bus-controller/values.yaml create mode 100644 kubernetes/dmaap/components/dmaap-dr-node/resources/config/log/filebeat/filebeat.yml create mode 100644 kubernetes/dmaap/components/dmaap-dr-node/resources/dr_nodes/central.yaml create mode 100644 kubernetes/dmaap/components/dmaap-dr-node/resources/dr_nodes/edge.yaml create mode 100644 kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml create mode 100644 kubernetes/dmaap/components/dmaap-dr-prov/resources/config/log/filebeat/filebeat.yml create mode 100644 kubernetes/dmaap/components/dmaap-dr-prov/resources/feeds/DefaultPM.json create mode 100644 kubernetes/dmaap/components/dmaap-dr-prov/resources/feeds/README create mode 100644 kubernetes/dmaap/components/dmaap-dr-prov/templates/post-install-job.yaml create mode 100644 kubernetes/dmaap/components/message-router/resources/topics/MMagent.json create mode 100644 kubernetes/dmaap/components/message-router/resources/topics/PNF_READY.json create mode 100644 kubernetes/dmaap/components/message-router/resources/topics/PNF_REGISTRATION.json create mode 100644 kubernetes/dmaap/components/message-router/resources/topics/README create mode 100644 kubernetes/dmaap/components/message-router/templates/post-install-job.yaml (limited to 'kubernetes/dmaap/components') diff --git a/kubernetes/dmaap/components/dbc/.helmignore b/kubernetes/dmaap/components/dbc/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/.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/dmaap/components/dbc/Chart.yaml b/kubernetes/dmaap/components/dbc/Chart.yaml new file mode 100644 index 0000000000..bd07b7a102 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/Chart.yaml @@ -0,0 +1,19 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada +# +# 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. + +apiVersion: v1 +description: a Helm chart to deploy ONAP DMaaP Bus Controller (aka dmaap-bc) in Kubernetes +name: dbc +version: 4.0.0 diff --git a/kubernetes/dmaap/components/dbc/README.md b/kubernetes/dmaap/components/dbc/README.md new file mode 100644 index 0000000000..a799fd44dd --- /dev/null +++ b/kubernetes/dmaap/components/dbc/README.md @@ -0,0 +1,25 @@ +# Copyright © 2018 AT&T, Amdocs, Bell Canada 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. + +# Helm Chart for ONAP DMaaP Applications + +ONAP includes the following Kubernetes services available in ONAP Beijing Release (more expected in future): + +1) message-router - a message bus for applications +2) dmaap-prov - an API to provision DMaaP resources + +# Service Dependencies + +message-router depends on AAF +dmaap-prov depends on AAF and Postgresql. diff --git a/kubernetes/dmaap/components/dbc/requirements.yaml b/kubernetes/dmaap/components/dbc/requirements.yaml new file mode 100644 index 0000000000..61c265fe64 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/requirements.yaml @@ -0,0 +1,21 @@ +# Copyright © 2018 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: ~4.x-0 + repository: '@local' + - name: postgres + version: ~4.x-0 + repository: '@local' diff --git a/kubernetes/dmaap/components/dbc/resources/config/buscontroller.env b/kubernetes/dmaap/components/dbc/resources/config/buscontroller.env new file mode 100644 index 0000000000..cde43f95b7 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/resources/config/buscontroller.env @@ -0,0 +1,17 @@ +# Copyright © 2018 AT&T, Amdocs, Bell Canada 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. + +# Environment settings for starting a container +DMAAPBC_WAIT_TO_EXIT=Y + diff --git a/kubernetes/dmaap/components/dbc/resources/config/dmaapbc.properties b/kubernetes/dmaap/components/dbc/resources/config/dmaapbc.properties new file mode 100644 index 0000000000..faa19c6f4d --- /dev/null +++ b/kubernetes/dmaap/components/dbc/resources/config/dmaapbc.properties @@ -0,0 +1,217 @@ +# Copyright © 2018 AT&T, Amdocs, Bell Canada 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. + +##################################################### +# +# ONAP Casablanca oom configurable deployment params: +# +##################################################### + + +##################################################### +# +# Hooks for specific environment configurations +# +##################################################### +# Indicator for whether to use AAF +UseAAF: false + +# csit: stubs out some southbound APIs for csit +csit: No + +# name of this DMaaP instance (deprecated) +#DmaapName: demo + +##################################################### +# +# Settings for Southbound API: Datarouter +# +##################################################### +# FQDN of DR Prov Server (deprecated) +#DR.provhost: dcae-drps.domain.not.set + +# URI to retrieve dynamic DR configuration +ProvisioningURI: /internal/prov + +# indicator for handling feed delete: +# DeleteOnDR - means use the DR API to DELETE a feed. (default for backwards compatibility) +# SimulateDelete - means preserve the feed on DR (after cleaning it up), and mark as DELETED in DBCL. Better for cfy environments. +Feed.deleteHandling: SimulateDelete + +##################################################### +# +# Settings for Soutbound API: Postgresql +# +##################################################### +# flag indieonapdemodbates if we are using postgresql +UsePGSQL: true + +# postgres host name +# Need to connect to PG primary service, designated by service.name2 +DB.host: {{ .Values.postgres.service.name2 }} + +# postgres schema name +#DB.schema: {{ .Values.postgres.config.pgDatabase }} + +# postgres user name +#DB.user: {{ .Values.postgres.config.pgUserName }} + +# postgres user password +DB.cred: {{ .Values.postgres.config.pgUserPassword }} + + +##################################################### +# +# Settings for Soutbound API: Message Router +# +##################################################### +# indicator for multi-site (locations) deployment. Give clue to buscontroller whether +# there is a need for message replication between edge and central. +# ONAP Casablanca is a single site deployment +MR.multisite: false + +# FQDN of primary message router. +# In ONAP Casablanca, there is only 1 message router service, so use that. +# In a multi-site, MR cluster deployment, use the CNAME DNS entry which resolves to the primary central MR +MR.CentralCname: {{ .Values.dmaapMessageRouterService }} + +# MR Client Delete Level thoroughness: +# 0 = don't delete +# 1 = delete from persistent store +# 2 = delete from persistent store (DB) and authorization store (AAF) +MR.ClientDeleteLevel: 1 + +# namespace of MR Topic Factory +MR.TopicFactoryNS: org.onap.dmaap.mr.topicFactory + +# AAF Role assigned to Topic Manager Identity +MR.TopicMgrRole: org.onap.dmaap-bc-topic-mgr.client + +# MR topic ProjectID (used in certain topic name generation formats) +MR.projectID: mr + + +##################################################### +# +# Settings for Southbound API: CADI +# +##################################################### +# path to cadi.properties +cadi.properties: /opt/app/osaaf/lcoal/org.onap.dmaap-bc.props + +##################################################### +# +# Settings for Southbound API: AAF proxy +# +##################################################### +# URL of the AAF server +aaf.URL: {{ .Values.aafURL }} + +# TopicMgr Identity +aaf.TopicMgrUser: {{ .Values.topicMgrUser }} + +# Password for TopicMgr identity +aaf.TopicMgrPassword: {{ .Values.topicMgrPwd }} + +# Buscontroller Admin Identity +aaf.AdminUser: {{ .Values.adminUser }} + +# Admin Password +aaf.AdminPassword: {{ .Values.adminPwd }} + +# Identity that is owner of any created namespaces for topics +aaf.NsOwnerIdentity: {{ .Values.adminUser }} + +# location of the codec keyfile used to decrypt passwords in this properties file before they are passed to AAF +CredentialCodeKeyfile: etc/LocalKey + +# this overrides the Class used for Decryption. +# This allows for a plugin encryption/decryption method if needed. +# Call this Class for decryption at runtime. +#AafDecryption.Class: com.company.proprietaryDecryptor + + +##################################################### +# +# Settings for authorization of DBCAPI +# +##################################################### +# Namespace for URI values for the API used to create AAF permissions +# e.g. if ApiNamespace is X.Y.dmaapbc.api then for URI /mr_clients we create AAF perm X.Y.dmaapbc.api.mr_clients +ApiNamespace: org.onap.dmaap-bc.api + +# If API authorization is required, then implement a class to enforce it. +# This overrides the Class used for API permission check. +#ApiPermission.Class: com.company.policy.DecisionPolicy + +##################################################### +# +# Settings for Southbound API: MirrorMaker provisioning +# +##################################################### +# AAF Role of client publishing MM prov cmds +MM.ProvRole: org.onap.dmaap-bc-mm-prov.prov + +# AAF identity when publishing MM prov cmds +MM.ProvUserMechId: dmaap-bc-mm-prov@dmaap-bc-mm-prov.onap.org + +# pwd for Identity used to publish MM prov cmds +MM.ProvUserPwd: demo123456! + +# AAF Role of MirrorMaker agent subscribed to prov cmds +MM.AgentRole: org.onal.dmaap-bc-mm-prov.agent + +##################################################### +# +# HTTP Server Configuration +# +##################################################### + +# Allow http access to dbcapi +HttpAllowed: true + +# listen to http port within this container (server) +IntHttpPort: 8080 + +# listen to https port within this container (server) +# set to 0 if no certificates are available. +IntHttpsPort: 8443 + +# external port number for https taking port mapping into account +ExtHttpsPort: 443 + +# the type of keystore for https +KeyStoreType: jks + +# path to the keystore file +KeyStoreFile: etc/keystore + +# password for the https keystore +KeyStorePassword: *j&Z*Ma;.4My4M]W0eB*fal$ + +# password for the private key in the https keystore +KeyPassword: *j&Z*Ma;.4My4M]W0eB*fal$ + +# type of truststore for https +TrustStoreType: jks + +# path to the truststore for https +TrustStoreFile: etc/org.onap.dmaap-bc.trust.jks + +# password for the https truststore +TrustStorePassword: pi8HuuSbN03MtQQ7(5TcyQ6; + +# path to the file used to trigger an orderly shutdown +QuiesceFile: etc/SHUTDOWN + diff --git a/kubernetes/dmaap/components/dbc/resources/dcaeLocations/san-francisco.json b/kubernetes/dmaap/components/dbc/resources/dcaeLocations/san-francisco.json new file mode 100644 index 0000000000..ca1e740dd8 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/resources/dcaeLocations/san-francisco.json @@ -0,0 +1,5 @@ +{ + + "dcaeLayer": "kubernetes-central", + "dcaeLocationName": "san-francisco" +} diff --git a/kubernetes/dmaap/components/dbc/resources/dmaap/onap.json b/kubernetes/dmaap/components/dbc/resources/dmaap/onap.json new file mode 100644 index 0000000000..9099e046ed --- /dev/null +++ b/kubernetes/dmaap/components/dbc/resources/dmaap/onap.json @@ -0,0 +1,11 @@ +{ +{{ if eq .Values.fixedTopicNamespace true }} + "dmaapName": "mr", +{{- else -}} + "dmaapName": "{{ include "common.namespace" . }}", +{{- end}} + "drProvUrl": "https://dmaap-dr-prov:8443", + "version": "1", + "topicNsRoot": "org.onap.dmaap", + "bridgeAdminTopic": "DCAE_MM_AGENT" +} diff --git a/kubernetes/dmaap/components/dbc/resources/mr_clusters/san-francisco.json b/kubernetes/dmaap/components/dbc/resources/mr_clusters/san-francisco.json new file mode 100644 index 0000000000..9e732d2af8 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/resources/mr_clusters/san-francisco.json @@ -0,0 +1,6 @@ +{ + "dcaeLocationName": "san-francisco", + "fqdn": "message-router", + "topicProtocol": "http", + "topicPort": "3904" +} diff --git a/kubernetes/dmaap/components/dbc/templates/NOTES.txt b/kubernetes/dmaap/components/dbc/templates/NOTES.txt new file mode 100644 index 0000000000..050853cfa2 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/templates/NOTES.txt @@ -0,0 +1,34 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada +# +# 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. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}-prov) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/dmaap/components/dbc/templates/configmap.yaml b/kubernetes/dmaap/components/dbc/templates/configmap.yaml new file mode 100644 index 0000000000..1066c946af --- /dev/null +++ b/kubernetes/dmaap/components/dbc/templates/configmap.yaml @@ -0,0 +1,53 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada +# +# 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. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-config + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dbc-dmaap + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/dmaap/*.json").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dbc-dcaelocations + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/dcaeLocations/*.json").AsConfig . | indent 2 }} diff --git a/kubernetes/dmaap/components/dbc/templates/deployment.yaml b/kubernetes/dmaap/components/dbc/templates/deployment.yaml new file mode 100644 index 0000000000..0ecdc1c0e8 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/templates/deployment.yaml @@ -0,0 +1,103 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada +# +# 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. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + hostAliases: + - ip: "10.12.6.214" + hostnames: + - "aaf-onap-test.osaaf.org" + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.postgres.nameOverride }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.service.internalPort2 }} + {{if eq .Values.liveness.enabled true }} + livenessProbe: + httpGet: + port: {{ .Values.service.internalPort }} + path: /webapi/info + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + readinessProbe: + httpGet: + host: {{ .Values.dmaapMessageRouterService }} + port: 3904 + path: /topics + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + {{ end -}} + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + +# NOTE: on the following several configMaps, careful to include / at end +# since there may be more than one file in each mountPath + - name: {{ include "common.name" . }}-config + mountPath: /opt/app/config/conf/ + + resources: +{{ include "common.resources" . | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.name" . }}-config + configMap: + name: {{ include "common.fullname" . }}-config + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dmaap/components/dbc/templates/post-install-job.yaml b/kubernetes/dmaap/components/dbc/templates/post-install-job.yaml new file mode 100644 index 0000000000..1272c53695 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/templates/post-install-job.yaml @@ -0,0 +1,67 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "common.fullname" . }}-post-install + labels: + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + app.kubernetes.io/instance: {{.Release.Name | quote }} + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + annotations: + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + "helm.sh/hook": post-install + "helm.sh/hook-weight": "-5" + "helm.sh/hook-delete-policy": hook-succeeded +spec: + template: + metadata: + name: "{{.Release.Name}}" + labels: + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + app.kubernetes.io/instance: {{.Release.Name | quote }} + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + spec: + restartPolicy: Never + + containers: + - name: post-install-job + image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}" + env: + - name: DELAY + value: "0" + - name: REQUESTID + value: "{{.Chart.Name}}-post-install" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + +# NOTE: on the following several configMaps, careful to include / at end +# since there may be more than one file in each mountPath +# NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI + - name: {{ include "common.fullname" . }}-dbc-dmaap + mountPath: /opt/app/config/dmaap/ + - name: {{ include "common.fullname" . }}-dbc-dcaelocations + mountPath: /opt/app/config/dcaeLocations/ + resources: +{{ include "common.resources" . | indent 10 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-dbc-dmaap + configMap: + name: {{ include "common.fullname" . }}-dbc-dmaap + - name: {{ include "common.fullname" . }}-dbc-dcaelocations + configMap: + name: {{ include "common.fullname" . }}-dbc-dcaelocations + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dmaap/components/dbc/templates/service.yaml b/kubernetes/dmaap/components/dbc/templates/service.yaml new file mode 100644 index 0000000000..4b51d44fa2 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/templates/service.yaml @@ -0,0 +1,48 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs, Bell Canada +# +# 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. + +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.name }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.name }} + - port: {{ .Values.service.externalPort2 }} + targetPort: {{ .Values.service.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} + name: {{ .Values.service.name }}2 + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.name }} + - port: {{ .Values.service.externalPort2 }} + targetPort: {{ .Values.service.internalPort2 }} + name: {{ .Values.service.name }}2 + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/dmaap/components/dbc/values.yaml b/kubernetes/dmaap/components/dbc/values.yaml new file mode 100644 index 0000000000..2d791df6c6 --- /dev/null +++ b/kubernetes/dmaap/components/dbc/values.yaml @@ -0,0 +1,136 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright © 2018 Amdocs,Bell Canada +# +# 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. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# +pullPolicy: Always + +# application images +repository: nexus3.onap.org:10001 +image: onap/dmaap/dmaap-bc:1.1.1 + + +# application configuration +dmaapMessageRouterService: message-router +# change the following value to point to Windriver instance maintained +# but AAF team. +# e.g. +#aafURL: https://aaf-onap-test.osaaf.org:8095/proxy/ +aafURL: https://aaf-service:8100/ +topicMgrUser: dmaap-bc-topic-mgr@dmaap-bc-topic-mgr.onap.org +topicMgrPwd: demo123456! +adminUser: aaf_admin@people.osaaf.org +adminPwd: demo123456! + +# for Casablanca default deployment, leave this true to +# get a topic namespace that matches MR. When set to false, +# it will compose the topic namespace using the kubernetes namespace value +fixedTopicNamespace: true + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: false + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + + +service: + type: NodePort + name: dmaap-bc + portName: dmaap-bc + portName2: dmaap-bc + externalPort: 8080 + internalPort: 8080 + externalPort2: 8443 + internalPort2: 8443 + nodePort: 41 + nodePort2: 42 + + +# application configuration override for postgres +postgres: + nameOverride: dbc-pg + service: + name: dbc-postgres + name2: dbc-pg-primary + name3: dbc-pg-replica + container: + name: + primary: dbc-pg-primary + replica: dbc-pg-replica + config: + pgUserName: dmaap_admin + pgDatabase: dmaap + pgPrimaryPassword: onapdemodb + pgUserPassword: onapdemodb + pgRootPassword: onapdemodb + persistence: + mountSubPath: dbc/data + mountInitPath: dbc + pgpool: + nameOverride: dbc-pgpool + service: + name: dbc-pgpool + credentials: + pgusername: dmaap_admin + pgpassword: onapdemodb + container: + name: + primary: dbc-pgpool-primary + replica: dbc-pgpool-replica + +ingress: + enabled: false + +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 2 + memory: 4Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 8Gi + requests: + cpu: 2 + memory: 2Gi + unlimited: {} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/.helmignore b/kubernetes/dmaap/components/dmaap-bus-controller/.helmignore deleted file mode 100644 index f0c1319444..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# 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/dmaap/components/dmaap-bus-controller/Chart.yaml b/kubernetes/dmaap/components/dmaap-bus-controller/Chart.yaml deleted file mode 100644 index fc2ba21e29..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/Chart.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright © 2018 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright © 2018 Amdocs,Bell Canada -# -# 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. - -apiVersion: v1 -description: a Helm chart to deploy ONAP DMaaP Bus Controller (aka dmaap-prov) in Kubernetes -name: dmaap-bus-controller -version: 4.0.0 diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/README.md b/kubernetes/dmaap/components/dmaap-bus-controller/README.md deleted file mode 100644 index a799fd44dd..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright © 2018 AT&T, Amdocs, Bell Canada 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. - -# Helm Chart for ONAP DMaaP Applications - -ONAP includes the following Kubernetes services available in ONAP Beijing Release (more expected in future): - -1) message-router - a message bus for applications -2) dmaap-prov - an API to provision DMaaP resources - -# Service Dependencies - -message-router depends on AAF -dmaap-prov depends on AAF and Postgresql. diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/requirements.yaml b/kubernetes/dmaap/components/dmaap-bus-controller/requirements.yaml deleted file mode 100644 index 61c265fe64..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/requirements.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright © 2018 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: ~4.x-0 - repository: '@local' - - name: postgres - version: ~4.x-0 - repository: '@local' diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/config/buscontroller.env b/kubernetes/dmaap/components/dmaap-bus-controller/resources/config/buscontroller.env deleted file mode 100644 index cde43f95b7..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/config/buscontroller.env +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright © 2018 AT&T, Amdocs, Bell Canada 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. - -# Environment settings for starting a container -DMAAPBC_WAIT_TO_EXIT=Y - diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/config/dmaapbc.properties b/kubernetes/dmaap/components/dmaap-bus-controller/resources/config/dmaapbc.properties deleted file mode 100644 index faa19c6f4d..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/config/dmaapbc.properties +++ /dev/null @@ -1,217 +0,0 @@ -# Copyright © 2018 AT&T, Amdocs, Bell Canada 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. - -##################################################### -# -# ONAP Casablanca oom configurable deployment params: -# -##################################################### - - -##################################################### -# -# Hooks for specific environment configurations -# -##################################################### -# Indicator for whether to use AAF -UseAAF: false - -# csit: stubs out some southbound APIs for csit -csit: No - -# name of this DMaaP instance (deprecated) -#DmaapName: demo - -##################################################### -# -# Settings for Southbound API: Datarouter -# -##################################################### -# FQDN of DR Prov Server (deprecated) -#DR.provhost: dcae-drps.domain.not.set - -# URI to retrieve dynamic DR configuration -ProvisioningURI: /internal/prov - -# indicator for handling feed delete: -# DeleteOnDR - means use the DR API to DELETE a feed. (default for backwards compatibility) -# SimulateDelete - means preserve the feed on DR (after cleaning it up), and mark as DELETED in DBCL. Better for cfy environments. -Feed.deleteHandling: SimulateDelete - -##################################################### -# -# Settings for Soutbound API: Postgresql -# -##################################################### -# flag indieonapdemodbates if we are using postgresql -UsePGSQL: true - -# postgres host name -# Need to connect to PG primary service, designated by service.name2 -DB.host: {{ .Values.postgres.service.name2 }} - -# postgres schema name -#DB.schema: {{ .Values.postgres.config.pgDatabase }} - -# postgres user name -#DB.user: {{ .Values.postgres.config.pgUserName }} - -# postgres user password -DB.cred: {{ .Values.postgres.config.pgUserPassword }} - - -##################################################### -# -# Settings for Soutbound API: Message Router -# -##################################################### -# indicator for multi-site (locations) deployment. Give clue to buscontroller whether -# there is a need for message replication between edge and central. -# ONAP Casablanca is a single site deployment -MR.multisite: false - -# FQDN of primary message router. -# In ONAP Casablanca, there is only 1 message router service, so use that. -# In a multi-site, MR cluster deployment, use the CNAME DNS entry which resolves to the primary central MR -MR.CentralCname: {{ .Values.dmaapMessageRouterService }} - -# MR Client Delete Level thoroughness: -# 0 = don't delete -# 1 = delete from persistent store -# 2 = delete from persistent store (DB) and authorization store (AAF) -MR.ClientDeleteLevel: 1 - -# namespace of MR Topic Factory -MR.TopicFactoryNS: org.onap.dmaap.mr.topicFactory - -# AAF Role assigned to Topic Manager Identity -MR.TopicMgrRole: org.onap.dmaap-bc-topic-mgr.client - -# MR topic ProjectID (used in certain topic name generation formats) -MR.projectID: mr - - -##################################################### -# -# Settings for Southbound API: CADI -# -##################################################### -# path to cadi.properties -cadi.properties: /opt/app/osaaf/lcoal/org.onap.dmaap-bc.props - -##################################################### -# -# Settings for Southbound API: AAF proxy -# -##################################################### -# URL of the AAF server -aaf.URL: {{ .Values.aafURL }} - -# TopicMgr Identity -aaf.TopicMgrUser: {{ .Values.topicMgrUser }} - -# Password for TopicMgr identity -aaf.TopicMgrPassword: {{ .Values.topicMgrPwd }} - -# Buscontroller Admin Identity -aaf.AdminUser: {{ .Values.adminUser }} - -# Admin Password -aaf.AdminPassword: {{ .Values.adminPwd }} - -# Identity that is owner of any created namespaces for topics -aaf.NsOwnerIdentity: {{ .Values.adminUser }} - -# location of the codec keyfile used to decrypt passwords in this properties file before they are passed to AAF -CredentialCodeKeyfile: etc/LocalKey - -# this overrides the Class used for Decryption. -# This allows for a plugin encryption/decryption method if needed. -# Call this Class for decryption at runtime. -#AafDecryption.Class: com.company.proprietaryDecryptor - - -##################################################### -# -# Settings for authorization of DBCAPI -# -##################################################### -# Namespace for URI values for the API used to create AAF permissions -# e.g. if ApiNamespace is X.Y.dmaapbc.api then for URI /mr_clients we create AAF perm X.Y.dmaapbc.api.mr_clients -ApiNamespace: org.onap.dmaap-bc.api - -# If API authorization is required, then implement a class to enforce it. -# This overrides the Class used for API permission check. -#ApiPermission.Class: com.company.policy.DecisionPolicy - -##################################################### -# -# Settings for Southbound API: MirrorMaker provisioning -# -##################################################### -# AAF Role of client publishing MM prov cmds -MM.ProvRole: org.onap.dmaap-bc-mm-prov.prov - -# AAF identity when publishing MM prov cmds -MM.ProvUserMechId: dmaap-bc-mm-prov@dmaap-bc-mm-prov.onap.org - -# pwd for Identity used to publish MM prov cmds -MM.ProvUserPwd: demo123456! - -# AAF Role of MirrorMaker agent subscribed to prov cmds -MM.AgentRole: org.onal.dmaap-bc-mm-prov.agent - -##################################################### -# -# HTTP Server Configuration -# -##################################################### - -# Allow http access to dbcapi -HttpAllowed: true - -# listen to http port within this container (server) -IntHttpPort: 8080 - -# listen to https port within this container (server) -# set to 0 if no certificates are available. -IntHttpsPort: 8443 - -# external port number for https taking port mapping into account -ExtHttpsPort: 443 - -# the type of keystore for https -KeyStoreType: jks - -# path to the keystore file -KeyStoreFile: etc/keystore - -# password for the https keystore -KeyStorePassword: *j&Z*Ma;.4My4M]W0eB*fal$ - -# password for the private key in the https keystore -KeyPassword: *j&Z*Ma;.4My4M]W0eB*fal$ - -# type of truststore for https -TrustStoreType: jks - -# path to the truststore for https -TrustStoreFile: etc/org.onap.dmaap-bc.trust.jks - -# password for the https truststore -TrustStorePassword: pi8HuuSbN03MtQQ7(5TcyQ6; - -# path to the file used to trigger an orderly shutdown -QuiesceFile: etc/SHUTDOWN - diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/dcaeLocations/san-francisco.json b/kubernetes/dmaap/components/dmaap-bus-controller/resources/dcaeLocations/san-francisco.json deleted file mode 100644 index ca1e740dd8..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/dcaeLocations/san-francisco.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - - "dcaeLayer": "kubernetes-central", - "dcaeLocationName": "san-francisco" -} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/dmaap/onap.json b/kubernetes/dmaap/components/dmaap-bus-controller/resources/dmaap/onap.json deleted file mode 100644 index 9099e046ed..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/dmaap/onap.json +++ /dev/null @@ -1,11 +0,0 @@ -{ -{{ if eq .Values.fixedTopicNamespace true }} - "dmaapName": "mr", -{{- else -}} - "dmaapName": "{{ include "common.namespace" . }}", -{{- end}} - "drProvUrl": "https://dmaap-dr-prov:8443", - "version": "1", - "topicNsRoot": "org.onap.dmaap", - "bridgeAdminTopic": "DCAE_MM_AGENT" -} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/feeds/DefaultPM.json b/kubernetes/dmaap/components/dmaap-bus-controller/resources/feeds/DefaultPM.json deleted file mode 100644 index 411d7f41e1..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/feeds/DefaultPM.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "feedName": "Default PM Feed", - "feedVersion": "m1.1", - "feedDescription": "Default feed provisioned for PM File collector", - "asprClassification" : "unclassified", - "owner": "onap", - "pubs": [ - { - "dcaeLocationName" : "san-francisco", - "username": "dradmin", - "userpwd": "dradmin" - } - - ] -} - diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/feeds/README b/kubernetes/dmaap/components/dmaap-bus-controller/resources/feeds/README deleted file mode 100644 index 4f5eac5ba1..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/feeds/README +++ /dev/null @@ -1,3 +0,0 @@ -# -# Intent of this directory is for it to contain a file for each feed that needs to be provisioned in DR. -# So, app teams can add files to this directory as needed without impacting each other's code. diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/mr_clusters/san-francisco.json b/kubernetes/dmaap/components/dmaap-bus-controller/resources/mr_clusters/san-francisco.json deleted file mode 100644 index 9e732d2af8..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/mr_clusters/san-francisco.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dcaeLocationName": "san-francisco", - "fqdn": "message-router", - "topicProtocol": "http", - "topicPort": "3904" -} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/PNF_READY.json b/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/PNF_READY.json deleted file mode 100644 index 8f4cf8bd64..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/PNF_READY.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "topicName": "PNF_READY", - "topicDescription": "This topic will be used to publish the PNF_READY events generated by the PNF REgistration Handler service in the DCAE platform.", - "owner": "PNFRegistrationHandler", - "txenabled": false, - "clients": [ - { - "dcaeLocationName": "san-francisco", - "clientRole": "org.onap.dmaap.mr.PNF_READY.pub", - "action": [ - "pub", - "view" - ] - - } - ] -} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/PNF_REGISTRATION.json b/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/PNF_REGISTRATION.json deleted file mode 100644 index f0dd2c7829..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/PNF_REGISTRATION.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "topicName": "PNF_REGISTRATION", - "topicDescription": "the VES collector will be publishing pnfRegistration events in this topic", - "owner": "VEScollector", - "txenabled": false, - "clients": [ - { - "dcaeLocationName": "san-francisco", - "clientRole": "org.onap.dmaap.mr.PNF_REGISTRATION.sub", - "action": [ - "sub", - "view" - ] - - } - ] -} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/README b/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/README deleted file mode 100644 index fbb88b97e6..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/resources/topics/README +++ /dev/null @@ -1,3 +0,0 @@ -# -# Intent of this directory is for it to contain a file for each topic that needs to be provisioned in MR. -# So, app teams can add files to this directory as needed without impacting each other's code. diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/templates/NOTES.txt b/kubernetes/dmaap/components/dmaap-bus-controller/templates/NOTES.txt deleted file mode 100644 index 050853cfa2..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/templates/NOTES.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright © 2018 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright © 2018 Amdocs,Bell Canada -# -# 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. - -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range .Values.ingress.hosts }} - http://{{ . }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}-prov) - export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.externalPort }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} -{{- end }} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/templates/configmap.yaml b/kubernetes/dmaap/components/dmaap-bus-controller/templates/configmap.yaml deleted file mode 100644 index ead7562a59..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/templates/configmap.yaml +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright © 2018 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright © 2018 Amdocs,Bell Canada -# -# 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. - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-config - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-dmaap - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ tpl (.Files.Glob "resources/dmaap/*.json").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-dcaelocations - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ tpl (.Files.Glob "resources/dcaeLocations/*.json").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-mrclusters - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ tpl (.Files.Glob "resources/mr_clusters/*.json").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-topics - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ tpl (.Files.Glob "resources/topics/*.json").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-feeds - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ tpl (.Files.Glob "resources/feeds/*.json").AsConfig . | indent 2 }} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/templates/deployment.yaml b/kubernetes/dmaap/components/dmaap-bus-controller/templates/deployment.yaml deleted file mode 100644 index 4d009e9698..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/templates/deployment.yaml +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright © 2018 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright © 2018 Amdocs,Bell Canada -# -# 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. - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: {{ include "common.fullname" . }} - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - template: - metadata: - labels: - app: {{ include "common.name" . }} - release: {{ .Release.Name }} - spec: - hostAliases: - - ip: "10.12.6.214" - hostnames: - - "aaf-onap-test.osaaf.org" - initContainers: - - command: - - /root/ready.py - args: - - --container-name - - {{ .Values.postgres.nameOverride }} - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: {{ include "common.name" . }}-readiness - containers: - - name: {{ include "common.name" . }} - image: "{{ include "common.repository" . }}/{{ .Values.image }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - ports: - - containerPort: {{ .Values.service.internalPort }} - - containerPort: {{ .Values.service.internalPort2 }} - {{if eq .Values.liveness.enabled true }} - livenessProbe: - httpGet: - port: {{ .Values.service.internalPort }} - path: /webapi/info - initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.liveness.periodSeconds }} - readinessProbe: - httpGet: - host: {{ .Values.dmaapMessageRouterService }} - port: 3904 - path: /topics - initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.readiness.periodSeconds }} - {{ end -}} - volumeMounts: - - mountPath: /etc/localtime - name: localtime - readOnly: true - -# NOTE: on the following several configMaps, careful to include / at end -# since there may be more than one file in each mountPath - - name: {{ include "common.name" . }}-config - mountPath: /opt/app/config/conf/ - -# NOTE: the basename of the subdirectory is important - it matches the DBCL API URI - - name: {{ include "common.name" . }}-dmaap - mountPath: /opt/app/config/dmaap/ - - name: {{ include "common.name" . }}-dcaelocations - mountPath: /opt/app/config/dcaeLocations/ - - name: {{ include "common.name" . }}-mrclusters - mountPath: /opt/app/config/mr_clusters/ - - name: {{ include "common.name" . }}-topics - mountPath: /opt/app/config/topics/ - - name: {{ include "common.name" . }}-feeds - mountPath: /opt/app/config/feeds/ - resources: -{{ include "common.resources" . | indent 12 }} - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 10 }} - {{- end -}} - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 10 }} - {{- end }} - volumes: - - name: localtime - hostPath: - path: /etc/localtime - - name: {{ include "common.name" . }}-config - configMap: - name: {{ include "common.fullname" . }}-config - - name: {{ include "common.name" . }}-dmaap - configMap: - name: {{ include "common.fullname" . }}-dmaap - - name: {{ include "common.name" . }}-dcaelocations - configMap: - name: {{ include "common.fullname" . }}-dcaelocations - - name: {{ include "common.name" . }}-mrclusters - configMap: - name: {{ include "common.fullname" . }}-mrclusters - - name: {{ include "common.name" . }}-topics - configMap: - name: {{ include "common.fullname" . }}-topics - - name: {{ include "common.name" . }}-feeds - configMap: - name: {{ include "common.fullname" . }}-feeds - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/templates/service.yaml b/kubernetes/dmaap/components/dmaap-bus-controller/templates/service.yaml deleted file mode 100644 index 4b51d44fa2..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/templates/service.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright © 2018 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright © 2018 Amdocs, Bell Canada -# -# 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. - -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.service.name }} - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.name }} - - port: {{ .Values.service.externalPort2 }} - targetPort: {{ .Values.service.internalPort2 }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} - name: {{ .Values.service.name }}2 - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.name }} - - port: {{ .Values.service.externalPort2 }} - targetPort: {{ .Values.service.internalPort2 }} - name: {{ .Values.service.name }}2 - {{- end}} - selector: - app: {{ include "common.name" . }} - release: {{ .Release.Name }} diff --git a/kubernetes/dmaap/components/dmaap-bus-controller/values.yaml b/kubernetes/dmaap/components/dmaap-bus-controller/values.yaml deleted file mode 100644 index aab6c237f3..0000000000 --- a/kubernetes/dmaap/components/dmaap-bus-controller/values.yaml +++ /dev/null @@ -1,133 +0,0 @@ -# Copyright © 2018 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright © 2018 Amdocs,Bell Canada -# -# 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. - -################################################################# -# Global configuration defaults. -################################################################# -global: - nodePortPrefix: 302 - readinessRepository: oomk8s - readinessImage: readiness-check:2.0.0 - loggingRepository: docker.elastic.co - loggingImage: beats/filebeat:5.5.0 - -################################################################# -# Application configuration defaults. -################################################################# -pullPolicy: Always - -# application images -repository: nexus3.onap.org:10001 - -image: onap/dmaap/buscontroller:1.0.23 - - -# application configuration -dmaapMessageRouterService: message-router -aafURL: https://aaf-onap-test.osaaf.org:8095/proxy/ -topicMgrUser: dmaap-bc-topic-mgr@dmaap-bc-topic-mgr.onap.org -topicMgrPwd: demo123456! -adminUser: aaf_admin@people.osaaf.org -adminPwd: demo123456! - -# for Casablanca default deployment, leave this true to -# get a topic namespace that matches MR. When set to false, -# it will compose the topic namespace using the kubernetes namespace value -fixedTopicNamespace: true - -nodeSelector: {} - -affinity: {} - -# probe configuration parameters -liveness: - initialDelaySeconds: 10 - periodSeconds: 10 - # necessary to disable liveness probe when setting breakpoints - # in debugger so K8s doesn't restart unresponsive container - enabled: false - -readiness: - initialDelaySeconds: 10 - periodSeconds: 10 - - -service: - type: NodePort - name: dmaap-bc - portName: dmaap-bc - portName2: dmaap-bc - externalPort: 8080 - internalPort: 8080 - externalPort2: 8443 - internalPort2: 8443 - nodePort: 41 - nodePort2: 42 - - -# application configuration override for postgres -postgres: - nameOverride: dbc-pg - service: - name: dbc-postgres - name2: dbc-pg-primary - name3: dbc-pg-replica - container: - name: - primary: dbc-pg-primary - replica: dbc-pg-replica - config: - pgUserName: dmaap_admin - pgDatabase: dmaap - pgPrimaryPassword: onapdemodb - pgUserPassword: onapdemodb - pgRootPassword: onapdemodb - persistence: - mountSubPath: dbc/data - mountInitPath: dbc - pgpool: - nameOverride: dbc-pgpool - service: - name: dbc-pgpool - credentials: - pgusername: dmaap_admin - pgpassword: onapdemodb - container: - name: - primary: dbc-pgpool-primary - replica: dbc-pgpool-replica - -ingress: - enabled: false - -# Resource Limit flavor -By Default using small -flavor: small -# Segregation for Different environment (Small and Large) -resources: - small: - limits: - cpu: 2 - memory: 4Gi - requests: - cpu: 1 - memory: 1Gi - large: - limits: - cpu: 4 - memory: 8Gi - requests: - cpu: 2 - memory: 2Gi - unlimited: {} diff --git a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/log/filebeat/filebeat.yml b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/log/filebeat/filebeat.yml new file mode 100644 index 0000000000..f1cf7394b6 --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/log/filebeat/filebeat.yml @@ -0,0 +1,60 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 The Nordix Foundation. 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +filebeat.prospectors: +#it is mandatory, in our case it's log +- input_type: log + #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory. + paths: + - /var/log/onap/*/*/*/*.log + - /var/log/onap/*/*/*.log + - /var/log/onap/*/*.log + - /opt/app/datartr/logs/*.log + #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive + ignore_older: 48h + # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit + clean_inactive: 96h + + +# Name of the registry file. If a relative path is used, it is considered relative to the +# data path. Else full qualified file name. +#filebeat.registry_file: ${path.data}/registry + + +output.logstash: + #List of logstash server ip addresses with port number. + #But, in our case, this will be the loadbalancer IP address. + #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. + hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"] + #If enable will do load balancing among available Logstash, automatically. + loadbalance: true + + #The list of root certificates for server verifications. + #If certificate_authorities is empty or not set, the trusted + #certificate authorities of the host system are used. + #ssl.certificate_authorities: $ssl.certificate_authorities + + #The path to the certificate for SSL client authentication. If the certificate is not specified, + #client authentication is not available. + #ssl.certificate: $ssl.certificate + + #The client certificate key used for client authentication. + #ssl.key: $ssl.key + + #The passphrase used to decrypt an encrypted key stored in the configured key file + #ssl.key_passphrase: $ssl.key_passphrase \ No newline at end of file diff --git a/kubernetes/dmaap/components/dmaap-dr-node/resources/dr_nodes/central.yaml b/kubernetes/dmaap/components/dmaap-dr-node/resources/dr_nodes/central.yaml new file mode 100644 index 0000000000..7ef2dcdb8f --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-node/resources/dr_nodes/central.yaml @@ -0,0 +1,6 @@ +{ + "dcaeLocationName" : "san-francisco", + "fqdn" : "dmaap-dr-node.san-francisco", + "hostName" : "dmaap-dr-node.pod", + "version" : "1.0.1" +} diff --git a/kubernetes/dmaap/components/dmaap-dr-node/resources/dr_nodes/edge.yaml b/kubernetes/dmaap/components/dmaap-dr-node/resources/dr_nodes/edge.yaml new file mode 100644 index 0000000000..272cd75e52 --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-node/resources/dr_nodes/edge.yaml @@ -0,0 +1,6 @@ +{ + "dcaeLocationName" : "edge1", + "fqdn" : "dmaap-dr-node.edge1", + "hostName" : "dmaap-dr-node.pod.edge1", + "version" : "1.0.1" +} diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/configmap.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/configmap.yaml index 67392671f8..cae0d71672 100644 --- a/kubernetes/dmaap/components/dmaap-dr-node/templates/configmap.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/configmap.yaml @@ -45,3 +45,24 @@ metadata: namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dbc-drnodes + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/dr_nodes/*.json").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dmaap-filebeat-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/filebeat.yml").AsConfig . | indent 2 }} diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml new file mode 100644 index 0000000000..c6fa76ce72 --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml @@ -0,0 +1,62 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "common.fullname" . }}-post-install + labels: + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + app.kubernetes.io/instance: {{.Release.Name | quote }} + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + annotations: + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + "helm.sh/hook": post-install + "helm.sh/hook-weight": "-5" + "helm.sh/hook-delete-policy": hook-succeeded +spec: + template: + metadata: + name: "{{.Release.Name}}" + labels: + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + app.kubernetes.io/instance: {{.Release.Name | quote }} + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + spec: + restartPolicy: Never + containers: + - name: post-install-job + image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}" + env: + - name: DELAY + value: "60" + - name: REQUESTID + value: "{{.Chart.Name}}-post-install" + + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + +# NOTE: on the following several configMaps, careful to include / at end +# since there may be more than one file in each mountPath +# NOTE: the basename of the subdirectory is important - it matches the DBCL API URI + - name: {{ include "common.fullname" . }}-dbc-drnodes + mountPath: /opt/app/config/dr_nodes/ + resources: +{{ include "common.resources" . | indent 10 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-dbc-drnodes + configMap: + name: {{ include "common.fullname" . }}-dbc-drnodes + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml index 2c4b0de63b..3e0e69ecc2 100644 --- a/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml @@ -97,7 +97,7 @@ spec: {{ toYaml .Values.affinity | indent 10 }} {{- end }} # Filebeat sidecar container - - name: {{ include "common.name" . }}-filebeat-onap + - name: {{ include "common.fullname" . }}-filebeat-onap image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: @@ -126,7 +126,7 @@ spec: name: {{ include "common.fullname" . }}-log - name: {{ include "common.fullname" . }}-filebeat-conf configMap: - name: {{ .Release.Name }}-dmaap-filebeat-configmap + name: {{ include "common.fullname" . }}-dmaap-filebeat-configmap - name: {{ include "common.fullname" . }}-data-filebeat emptyDir: {} - name: {{ include "common.fullname" . }}-event-logs-pvc diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/log/filebeat/filebeat.yml b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/log/filebeat/filebeat.yml new file mode 100644 index 0000000000..f1cf7394b6 --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/log/filebeat/filebeat.yml @@ -0,0 +1,60 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 The Nordix Foundation. 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +filebeat.prospectors: +#it is mandatory, in our case it's log +- input_type: log + #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory. + paths: + - /var/log/onap/*/*/*/*.log + - /var/log/onap/*/*/*.log + - /var/log/onap/*/*.log + - /opt/app/datartr/logs/*.log + #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive + ignore_older: 48h + # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit + clean_inactive: 96h + + +# Name of the registry file. If a relative path is used, it is considered relative to the +# data path. Else full qualified file name. +#filebeat.registry_file: ${path.data}/registry + + +output.logstash: + #List of logstash server ip addresses with port number. + #But, in our case, this will be the loadbalancer IP address. + #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. + hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"] + #If enable will do load balancing among available Logstash, automatically. + loadbalance: true + + #The list of root certificates for server verifications. + #If certificate_authorities is empty or not set, the trusted + #certificate authorities of the host system are used. + #ssl.certificate_authorities: $ssl.certificate_authorities + + #The path to the certificate for SSL client authentication. If the certificate is not specified, + #client authentication is not available. + #ssl.certificate: $ssl.certificate + + #The client certificate key used for client authentication. + #ssl.key: $ssl.key + + #The passphrase used to decrypt an encrypted key stored in the configured key file + #ssl.key_passphrase: $ssl.key_passphrase \ No newline at end of file diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/resources/feeds/DefaultPM.json b/kubernetes/dmaap/components/dmaap-dr-prov/resources/feeds/DefaultPM.json new file mode 100644 index 0000000000..411d7f41e1 --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-prov/resources/feeds/DefaultPM.json @@ -0,0 +1,16 @@ +{ + "feedName": "Default PM Feed", + "feedVersion": "m1.1", + "feedDescription": "Default feed provisioned for PM File collector", + "asprClassification" : "unclassified", + "owner": "onap", + "pubs": [ + { + "dcaeLocationName" : "san-francisco", + "username": "dradmin", + "userpwd": "dradmin" + } + + ] +} + diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/resources/feeds/README b/kubernetes/dmaap/components/dmaap-dr-prov/resources/feeds/README new file mode 100644 index 0000000000..4f5eac5ba1 --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-prov/resources/feeds/README @@ -0,0 +1,3 @@ +# +# Intent of this directory is for it to contain a file for each feed that needs to be provisioned in DR. +# So, app teams can add files to this directory as needed without impacting each other's code. diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/configmap.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/configmap.yaml index f9884d7827..bd5886ba9c 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/templates/configmap.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/templates/configmap.yaml @@ -32,3 +32,50 @@ metadata: namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dmaap-filebeat-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/filebeat.yml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dbc-feeds + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/feeds/*.json").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dbc-drpubs + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/dr_pubs/*.json").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dbc-drsubs + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/dr_subs/*.json").AsConfig . | indent 2 }} diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml index d2c653eb6f..573e90c35a 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml @@ -84,7 +84,7 @@ spec: {{ toYaml .Values.affinity | indent 10 }} {{- end }} # Filebeat sidecar container - - name: {{ include "common.name" . }}-filebeat-onap + - name: {{ include "common.fullname" . }}-filebeat-onap image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: @@ -107,7 +107,7 @@ spec: name: {{ include "common.fullname" . }}-log - name: {{ include "common.fullname" . }}-filebeat-conf configMap: - name: {{ .Release.Name }}-dmaap-filebeat-configmap + name: {{ include "common.fullname" . }}-dmaap-filebeat-configmap - name: {{ include "common.fullname" . }}-data-filebeat emptyDir: {} - name: {{ include "common.fullname" . }}-logs diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/post-install-job.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/post-install-job.yaml new file mode 100644 index 0000000000..1f7214f3ec --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-prov/templates/post-install-job.yaml @@ -0,0 +1,75 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "common.fullname" . }}-post-install + labels: + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + app.kubernetes.io/instance: {{.Release.Name | quote }} + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + annotations: + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + "helm.sh/hook": post-install + "helm.sh/hook-weight": "-5" + "helm.sh/hook-delete-policy": hook-succeeded +spec: + template: + metadata: + name: "{{.Release.Name}}" + labels: + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + app.kubernetes.io/instance: {{.Release.Name | quote }} + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + spec: + restartPolicy: Never + containers: + - name: post-install-job + image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}" + env: + - name: DELAY + value: "30" + - name: REQUESTID + value: "{{.Chart.Name}}-post-install" + + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + +# NOTE: on the following several configMaps, careful to include / at end +# since there may be more than one file in each mountPath +# NOTE: the basename of the subdirectory is important - it matches the DBCL API URI + - name: {{ include "common.fullname" . }}-dbc-feeds + mountPath: /opt/app/config/feeds/ + - name: {{ include "common.fullname" . }}-dbc-drpubs + mountPath: /opt/app/config/dr_pubs/ + - name: {{ include "common.fullname" . }}-dbc-drsubs + mountPath: /opt/app/config/dr_subs/ + resources: +{{ include "common.resources" . | indent 10 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime +# - name: {{ include "common.name" . }}-config +# configMap: +# name: {{ include "common.fullname" . }}-config + - name: {{ include "common.fullname" . }}-dbc-feeds + configMap: + name: {{ include "common.fullname" . }}-dbc-feeds + - name: {{ include "common.fullname" . }}-dbc-drpubs + configMap: + name: {{ include "common.fullname" . }}-dbc-drpubs + - name: {{ include "common.fullname" . }}-dbc-drsubs + configMap: + name: {{ include "common.fullname" . }}-dbc-drsubs + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/dmaap/components/message-router/resources/topics/MMagent.json b/kubernetes/dmaap/components/message-router/resources/topics/MMagent.json new file mode 100644 index 0000000000..2612e0d64c --- /dev/null +++ b/kubernetes/dmaap/components/message-router/resources/topics/MMagent.json @@ -0,0 +1,19 @@ +{ + "topicName": "MirrorMakerProvisioning", + "topicDescription": "the topic used to provision the MM agent whitelist", + "replicationCase": "REPLICATION_NONE", + "owner": "dmaap", + "txenabled": false, + "partitionCount": "1", + "clients": [ + { + "dcaeLocationName": "san-francisco", + "clientIdentity": "dmaap-bc-mm-prov@dmaap-bc-mm-prov.onap.org", + "action": [ + "pub", + "view" + ] + + } + ] +} diff --git a/kubernetes/dmaap/components/message-router/resources/topics/PNF_READY.json b/kubernetes/dmaap/components/message-router/resources/topics/PNF_READY.json new file mode 100644 index 0000000000..8f4cf8bd64 --- /dev/null +++ b/kubernetes/dmaap/components/message-router/resources/topics/PNF_READY.json @@ -0,0 +1,17 @@ +{ + "topicName": "PNF_READY", + "topicDescription": "This topic will be used to publish the PNF_READY events generated by the PNF REgistration Handler service in the DCAE platform.", + "owner": "PNFRegistrationHandler", + "txenabled": false, + "clients": [ + { + "dcaeLocationName": "san-francisco", + "clientRole": "org.onap.dmaap.mr.PNF_READY.pub", + "action": [ + "pub", + "view" + ] + + } + ] +} diff --git a/kubernetes/dmaap/components/message-router/resources/topics/PNF_REGISTRATION.json b/kubernetes/dmaap/components/message-router/resources/topics/PNF_REGISTRATION.json new file mode 100644 index 0000000000..f0dd2c7829 --- /dev/null +++ b/kubernetes/dmaap/components/message-router/resources/topics/PNF_REGISTRATION.json @@ -0,0 +1,17 @@ +{ + "topicName": "PNF_REGISTRATION", + "topicDescription": "the VES collector will be publishing pnfRegistration events in this topic", + "owner": "VEScollector", + "txenabled": false, + "clients": [ + { + "dcaeLocationName": "san-francisco", + "clientRole": "org.onap.dmaap.mr.PNF_REGISTRATION.sub", + "action": [ + "sub", + "view" + ] + + } + ] +} diff --git a/kubernetes/dmaap/components/message-router/resources/topics/README b/kubernetes/dmaap/components/message-router/resources/topics/README new file mode 100644 index 0000000000..fbb88b97e6 --- /dev/null +++ b/kubernetes/dmaap/components/message-router/resources/topics/README @@ -0,0 +1,3 @@ +# +# Intent of this directory is for it to contain a file for each topic that needs to be provisioned in MR. +# So, app teams can add files to this directory as needed without impacting each other's code. diff --git a/kubernetes/dmaap/components/message-router/templates/configmap.yaml b/kubernetes/dmaap/components/message-router/templates/configmap.yaml index 1ed788893f..e2e0da51fd 100644 --- a/kubernetes/dmaap/components/message-router/templates/configmap.yaml +++ b/kubernetes/dmaap/components/message-router/templates/configmap.yaml @@ -38,3 +38,30 @@ metadata: heritage: {{ .Release.Service }} data: {{ tpl (.Files.Glob "resources/config/dmaap/cadi.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dbc-mrclusters + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/mr_clusters/*.json").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-dbc-topics + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/topics/*.json").AsConfig . | indent 2 }} + diff --git a/kubernetes/dmaap/components/message-router/templates/post-install-job.yaml b/kubernetes/dmaap/components/message-router/templates/post-install-job.yaml new file mode 100644 index 0000000000..df840ce828 --- /dev/null +++ b/kubernetes/dmaap/components/message-router/templates/post-install-job.yaml @@ -0,0 +1,66 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "common.fullname" . }}-post-install + labels: + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + app.kubernetes.io/instance: {{.Release.Name | quote }} + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + annotations: + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + "helm.sh/hook": post-install + "helm.sh/hook-weight": "-5" + "helm.sh/hook-delete-policy": hook-succeeded +spec: + template: + metadata: + name: "{{.Release.Name}}" + labels: + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + app.kubernetes.io/instance: {{.Release.Name | quote }} + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + spec: + restartPolicy: Never + containers: + - name: post-install-job + image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}" + env: + - name: DELAY + value: "60" + - name: REQUESTID + value: "{{.Chart.Name}}-post-install" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + +# NOTE: on the following several configMaps, careful to include / at end +# since there may be more than one file in each mountPath +# NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI + - name: {{ include "common.fullname" . }}-dbc-mrclusters + mountPath: /opt/app/config/mr_clusters/ + - name: {{ include "common.fullname" . }}-dbc-topics + mountPath: /opt/app/config/topics/ + resources: +{{ include "common.resources" . | indent 10 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-dbc-mrclusters + configMap: + name: {{ include "common.fullname" . }}-dbc-mrclusters + - name: {{ include "common.fullname" . }}-dbc-topics + configMap: + name: {{ include "common.fullname" . }}-dbc-topics + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" -- cgit 1.2.3-korg