summaryrefslogtreecommitdiffstats
path: root/helm
diff options
context:
space:
mode:
authorputhuparambil.aditya <aditya.puthuparambil@bell.ca>2020-10-01 12:06:33 +0100
committerputhuparambil.aditya <aditya.puthuparambil@bell.ca>2020-10-05 10:19:13 +0100
commit7edc7955d012fea43290b21bfd72d77d70ea4ec3 (patch)
tree0d4ab44ecad0ef051fb03cb04521aab35d4a2c3a /helm
parentbf47a0752450eaacc55176b4eec104693c94defc (diff)
Helm chart for policy-models-simulator
Issue-ID: POLICY-2828 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Ic5e94edb2bc76067d5cde03dae2670dc6cf99a0e
Diffstat (limited to 'helm')
-rw-r--r--helm/policy-models-simulator/.helmignore22
-rw-r--r--helm/policy-models-simulator/Chart.yaml5
-rw-r--r--helm/policy-models-simulator/resources/cds/CreateSubscriptionResponseEvent.json29
-rw-r--r--helm/policy-models-simulator/resources/cds/DefaultResponseEvent-error.json22
-rw-r--r--helm/policy-models-simulator/resources/cds/DefaultResponseEvent.json29
-rw-r--r--helm/policy-models-simulator/resources/cds/pm_control-create-subscription-error.json22
-rw-r--r--helm/policy-models-simulator/resources/cds/pm_control-create-subscription.json29
-rw-r--r--helm/policy-models-simulator/resources/config/logback.xml33
-rw-r--r--helm/policy-models-simulator/resources/config/simParameters.json125
-rw-r--r--helm/policy-models-simulator/templates/NOTES.txt21
-rw-r--r--helm/policy-models-simulator/templates/_helpers.tpl56
-rw-r--r--helm/policy-models-simulator/templates/configmap.yaml12
-rw-r--r--helm/policy-models-simulator/templates/deployment.yaml80
-rw-r--r--helm/policy-models-simulator/templates/service.yaml30
-rw-r--r--helm/policy-models-simulator/templates/serviceaccount.yaml8
-rw-r--r--helm/policy-models-simulator/templates/tests/test-connection.yaml15
-rw-r--r--helm/policy-models-simulator/values.yaml81
17 files changed, 619 insertions, 0 deletions
diff --git a/helm/policy-models-simulator/.helmignore b/helm/policy-models-simulator/.helmignore
new file mode 100644
index 00000000..50af0317
--- /dev/null
+++ b/helm/policy-models-simulator/.helmignore
@@ -0,0 +1,22 @@
+# 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
+.vscode/
diff --git a/helm/policy-models-simulator/Chart.yaml b/helm/policy-models-simulator/Chart.yaml
new file mode 100644
index 00000000..95354034
--- /dev/null
+++ b/helm/policy-models-simulator/Chart.yaml
@@ -0,0 +1,5 @@
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Kubernetes
+name: policy-models-simulator
+version: 0.1.0
diff --git a/helm/policy-models-simulator/resources/cds/CreateSubscriptionResponseEvent.json b/helm/policy-models-simulator/resources/cds/CreateSubscriptionResponseEvent.json
new file mode 100644
index 00000000..adb51adc
--- /dev/null
+++ b/helm/policy-models-simulator/resources/cds/CreateSubscriptionResponseEvent.json
@@ -0,0 +1,29 @@
+{
+ "commonHeader": {
+ "timestamp": "2020-03-20T14:00:25.217Z",
+ "requestId": "123456-1000",
+ "subRequestId": "sub-123456-1000",
+ "flag": {
+ },
+ "originatorId": "sdnc"
+ },
+ "actionIdentifiers": {
+ "blueprintName": "pm_control",
+ "blueprintVersion": "1.0.0",
+ "actionName": "create-subscription",
+ "mode": "sync"
+ },
+ "status": {
+ "code": 200,
+ "message": "success",
+ "eventType": "EVENT_COMPONENT_EXECUTED",
+ "timestamp": "Fri Mar 20 14:00:26 GMT 2020"
+ },
+ "payload": {
+ "create-subscription-response": {
+ "odl-response": {
+ "status": "success"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/helm/policy-models-simulator/resources/cds/DefaultResponseEvent-error.json b/helm/policy-models-simulator/resources/cds/DefaultResponseEvent-error.json
new file mode 100644
index 00000000..a66b1114
--- /dev/null
+++ b/helm/policy-models-simulator/resources/cds/DefaultResponseEvent-error.json
@@ -0,0 +1,22 @@
+{
+ "commonHeader": {
+ "timestamp": "2020-03-20T14:00:25.217Z",
+ "requestId": "123456-1000",
+ "subRequestId": "sub-123456-1000",
+ "flag": {
+ },
+ "originatorId": "sdnc"
+ },
+ "actionIdentifiers": {
+ "blueprintName": "pm_control",
+ "blueprintVersion": "1.0.0",
+ "actionName": "create-subscription",
+ "mode": "sync"
+ },
+ "status": {
+ "code": 500,
+ "message": "failure",
+ "eventType": "EVENT_COMPONENT_FAILURE",
+ "timestamp": "Fri Mar 20 14:00:26 GMT 2020"
+ }
+} \ No newline at end of file
diff --git a/helm/policy-models-simulator/resources/cds/DefaultResponseEvent.json b/helm/policy-models-simulator/resources/cds/DefaultResponseEvent.json
new file mode 100644
index 00000000..adb51adc
--- /dev/null
+++ b/helm/policy-models-simulator/resources/cds/DefaultResponseEvent.json
@@ -0,0 +1,29 @@
+{
+ "commonHeader": {
+ "timestamp": "2020-03-20T14:00:25.217Z",
+ "requestId": "123456-1000",
+ "subRequestId": "sub-123456-1000",
+ "flag": {
+ },
+ "originatorId": "sdnc"
+ },
+ "actionIdentifiers": {
+ "blueprintName": "pm_control",
+ "blueprintVersion": "1.0.0",
+ "actionName": "create-subscription",
+ "mode": "sync"
+ },
+ "status": {
+ "code": 200,
+ "message": "success",
+ "eventType": "EVENT_COMPONENT_EXECUTED",
+ "timestamp": "Fri Mar 20 14:00:26 GMT 2020"
+ },
+ "payload": {
+ "create-subscription-response": {
+ "odl-response": {
+ "status": "success"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/helm/policy-models-simulator/resources/cds/pm_control-create-subscription-error.json b/helm/policy-models-simulator/resources/cds/pm_control-create-subscription-error.json
new file mode 100644
index 00000000..a66b1114
--- /dev/null
+++ b/helm/policy-models-simulator/resources/cds/pm_control-create-subscription-error.json
@@ -0,0 +1,22 @@
+{
+ "commonHeader": {
+ "timestamp": "2020-03-20T14:00:25.217Z",
+ "requestId": "123456-1000",
+ "subRequestId": "sub-123456-1000",
+ "flag": {
+ },
+ "originatorId": "sdnc"
+ },
+ "actionIdentifiers": {
+ "blueprintName": "pm_control",
+ "blueprintVersion": "1.0.0",
+ "actionName": "create-subscription",
+ "mode": "sync"
+ },
+ "status": {
+ "code": 500,
+ "message": "failure",
+ "eventType": "EVENT_COMPONENT_FAILURE",
+ "timestamp": "Fri Mar 20 14:00:26 GMT 2020"
+ }
+} \ No newline at end of file
diff --git a/helm/policy-models-simulator/resources/cds/pm_control-create-subscription.json b/helm/policy-models-simulator/resources/cds/pm_control-create-subscription.json
new file mode 100644
index 00000000..adb51adc
--- /dev/null
+++ b/helm/policy-models-simulator/resources/cds/pm_control-create-subscription.json
@@ -0,0 +1,29 @@
+{
+ "commonHeader": {
+ "timestamp": "2020-03-20T14:00:25.217Z",
+ "requestId": "123456-1000",
+ "subRequestId": "sub-123456-1000",
+ "flag": {
+ },
+ "originatorId": "sdnc"
+ },
+ "actionIdentifiers": {
+ "blueprintName": "pm_control",
+ "blueprintVersion": "1.0.0",
+ "actionName": "create-subscription",
+ "mode": "sync"
+ },
+ "status": {
+ "code": 200,
+ "message": "success",
+ "eventType": "EVENT_COMPONENT_EXECUTED",
+ "timestamp": "Fri Mar 20 14:00:26 GMT 2020"
+ },
+ "payload": {
+ "create-subscription-response": {
+ "odl-response": {
+ "status": "success"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/helm/policy-models-simulator/resources/config/logback.xml b/helm/policy-models-simulator/resources/config/logback.xml
new file mode 100644
index 00000000..224c322c
--- /dev/null
+++ b/helm/policy-models-simulator/resources/config/logback.xml
@@ -0,0 +1,33 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2020 Bell Canada. 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=========================================================
+-->
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+ <!--
+ This is only used for testing and only a snapshot docker image is generated,
+ thus it is not necessary for the messages to following the ONAP standard.
+ Therefore, keeping it short so it's easier to wade through the output.
+ Also sending all output to stdout instead of to a log file; it can be viewed
+ via "docker logs" or captured by kubernetes.
+ -->
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>%d %level %msg%n</Pattern>
+ </encoder>
+ </appender>
+ <root level="INFO">
+ <appender-ref ref="STDOUT" />
+ </root>
+</configuration>
diff --git a/helm/policy-models-simulator/resources/config/simParameters.json b/helm/policy-models-simulator/resources/config/simParameters.json
new file mode 100644
index 00000000..5bb67e71
--- /dev/null
+++ b/helm/policy-models-simulator/resources/config/simParameters.json
@@ -0,0 +1,125 @@
+{
+ "dmaapProvider": {
+ "name": "DMaaP simulator",
+ "topicSweepSec": 300,
+ "restServerParameters": {
+
+ }
+ },
+ "restServers": [
+ {
+ "name": "DMaaP simulator",
+ "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1",
+ "host": "localhost",
+ "port": 3905,
+ "https": true
+ },
+ {
+ "name": "A&AI simulator",
+ "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs",
+ "host": "localhost",
+ "port": 6666,
+ "https": true
+ },
+ {
+ "name": "Guard simulator",
+ "providerClass": "org.onap.policy.simulators.GuardSimulatorJaxRs",
+ "host": "localhost",
+ "port": 6667,
+ "https": true
+ },
+ {
+ "name": "SDNC simulator",
+ "providerClass": "org.onap.policy.simulators.SdncSimulatorJaxRs",
+ "host": "localhost",
+ "port": 6668,
+ "https": true
+ },
+ {
+ "name": "SO simulator",
+ "providerClass": "org.onap.policy.simulators.SoSimulatorJaxRs",
+ "host": "localhost",
+ "port": 6669,
+ "https": true
+ },
+ {
+ "name": "VFC simulator",
+ "providerClass": "org.onap.policy.simulators.VfcSimulatorJaxRs",
+ "host": "localhost",
+ "port": 6670,
+ "https": true
+ }
+ ],
+ "topicSinks": [
+ {
+ "topic": "APPC-CL",
+ "servers": ["localhost"],
+ "topicCommInfrastructure": "DMAAP",
+ "useHttps": true
+ },
+ {
+ "topic": "APPC-LCM-WRITE",
+ "servers": ["localhost"],
+ "topicCommInfrastructure": "DMAAP",
+ "useHttps": true
+ },
+ {
+ "topic": "SDNR-CL",
+ "servers": ["localhost"],
+ "topicCommInfrastructure": "DMAAP",
+ "useHttps": true
+ }
+ ],
+ "topicSources": [
+ {
+ "topic": "APPC-CL",
+ "servers": ["localhost"],
+ "topicCommInfrastructure": "DMAAP",
+ "useHttps": true
+ },
+ {
+ "topic": "APPC-LCM-READ",
+ "servers": ["localhost"],
+ "topicCommInfrastructure": "DMAAP",
+ "useHttps": true
+ },
+ {
+ "topic": "SDNR-CL-RSP",
+ "servers": ["localhost"],
+ "topicCommInfrastructure": "DMAAP",
+ "useHttps": true
+ }
+ ],
+ "topicServers": [
+ {
+ "name": "APPC Legacy simulator",
+ "providerClass": "org.onap.policy.simulators.AppcLegacyTopicServer",
+ "sink": "APPC-CL",
+ "source": "APPC-CL"
+ },
+ {
+ "name": "APPC-LCM simulator",
+ "providerClass": "org.onap.policy.simulators.AppcLcmTopicServer",
+ "sink": "APPC-LCM-WRITE",
+ "source": "APPC-LCM-READ"
+ },
+ {
+ "name": "SDNR simulator",
+ "providerClass": "org.onap.policy.simulators.SdnrTopicServer",
+ "sink": "SDNR-CL",
+ "source": "SDNR-CL-RSP"
+ }
+ ],
+ "grpcServer": {
+ "name": "CDS simulator",
+ "providerClass": "org.onap.policy.simulators.CdsSimulator",
+ "host": "0.0.0.0",
+ "port": 6680,
+ "timeout": 30,
+ "username": "ccsdkapps",
+ "password": "ccsdkapps",
+ "resourceLocation": "/opt/app/policy/simulators/etc/mounted/",
+ "successRepeatCount": 0,
+ "requestedResponseDelayMs": 0
+ }
+}
diff --git a/helm/policy-models-simulator/templates/NOTES.txt b/helm/policy-models-simulator/templates/NOTES.txt
new file mode 100644
index 00000000..f6e027f2
--- /dev/null
+++ b/helm/policy-models-simulator/templates/NOTES.txt
@@ -0,0 +1,21 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range $host := .Values.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
+ {{- end }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "policy-models-simulator.fullname" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.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 --namespace {{ .Release.Namespace }} svc -w {{ include "policy-models-simulator.fullname" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "policy-models-simulator.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+ echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "policy-models-simulator.name" . }},app.kubernetes.io/instance={{ .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:80
+{{- end }}
diff --git a/helm/policy-models-simulator/templates/_helpers.tpl b/helm/policy-models-simulator/templates/_helpers.tpl
new file mode 100644
index 00000000..a741f0de
--- /dev/null
+++ b/helm/policy-models-simulator/templates/_helpers.tpl
@@ -0,0 +1,56 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "policy-models-simulator.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "policy-models-simulator.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "policy-models-simulator.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "policy-models-simulator.labels" -}}
+app.kubernetes.io/name: {{ include "policy-models-simulator.name" . }}
+helm.sh/chart: {{ include "policy-models-simulator.chart" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "policy-models-simulator.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "policy-models-simulator.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/helm/policy-models-simulator/templates/configmap.yaml b/helm/policy-models-simulator/templates/configmap.yaml
new file mode 100644
index 00000000..c0f75199
--- /dev/null
+++ b/helm/policy-models-simulator/templates/configmap.yaml
@@ -0,0 +1,12 @@
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "policy-models-simulator.fullname" . }}-configmap
+ labels:
+ app: {{ include "policy-models-simulator.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*.{json,xml}").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/cds/*.{json,xml}").AsConfig . | indent 2 }}
diff --git a/helm/policy-models-simulator/templates/deployment.yaml b/helm/policy-models-simulator/templates/deployment.yaml
new file mode 100644
index 00000000..02c49df7
--- /dev/null
+++ b/helm/policy-models-simulator/templates/deployment.yaml
@@ -0,0 +1,80 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "policy-models-simulator.fullname" . }}
+ labels:
+{{ include "policy-models-simulator.labels" . | indent 4 }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ app.kubernetes.io/name: {{ include "policy-models-simulator.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/name: {{ include "policy-models-simulator.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ template "policy-models-simulator.serviceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Chart.Name }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ command: ["/opt/app/policy/simulators/bin/simulators.sh"]
+ args: ["/opt/app/policy/simulators/etc/mounted/simParameters.json"]
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ - containerPort: {{ .Values.service.internalPort2 }}
+ - containerPort: {{ .Values.service.internalPort3 }}
+ - containerPort: {{ .Values.service.internalPort4 }}
+ - containerPort: {{ .Values.service.internalPort5 }}
+ - containerPort: {{ .Values.service.internalPort6 }}
+ livenessProbe:
+ exec:
+ command:
+ - /bin/bash
+ - -c
+ - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
+ initialDelaySeconds: 120
+ periodSeconds: 20
+ readinessProbe:
+ exec:
+ command:
+ - /bin/bash
+ - -c
+ - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
+ initialDelaySeconds: 120
+ periodSeconds: 20
+ volumeMounts:
+ - mountPath: /opt/app/policy/simulators/etc/mounted/
+ name: simconfig
+ readOnly: true
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ volumes:
+ - name: simconfig
+ configMap:
+ name: {{ include "policy-models-simulator.fullname" . }}-configmap
+ defaultMode: 0755
+
diff --git a/helm/policy-models-simulator/templates/service.yaml b/helm/policy-models-simulator/templates/service.yaml
new file mode 100644
index 00000000..362ac93a
--- /dev/null
+++ b/helm/policy-models-simulator/templates/service.yaml
@@ -0,0 +1,30 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "policy-models-simulator.fullname" . }}
+ labels:
+{{ include "policy-models-simulator.labels" . | indent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}
+ - port: {{ .Values.service.externalPort2 }}
+ targetPort: {{ .Values.service.internalPort2 }}
+ name: {{ .Values.service.portName }}2
+ - port: {{ .Values.service.externalPort3 }}
+ targetPort: {{ .Values.service.internalPort3 }}
+ name: {{ .Values.service.portName }}3
+ - port: {{ .Values.service.externalPort4 }}
+ targetPort: {{ .Values.service.internalPort4 }}
+ name: {{ .Values.service.portName }}4
+ - port: {{ .Values.service.externalPort5 }}
+ targetPort: {{ .Values.service.internalPort5 }}
+ name: {{ .Values.service.portName }}5
+ - port: {{ .Values.service.externalPort6 }}
+ targetPort: {{ .Values.service.internalPort6 }}
+ name: {{ .Values.service.portName }}6
+ selector:
+ app.kubernetes.io/name: {{ include "policy-models-simulator.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
diff --git a/helm/policy-models-simulator/templates/serviceaccount.yaml b/helm/policy-models-simulator/templates/serviceaccount.yaml
new file mode 100644
index 00000000..27ee5daa
--- /dev/null
+++ b/helm/policy-models-simulator/templates/serviceaccount.yaml
@@ -0,0 +1,8 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ template "policy-models-simulator.serviceAccountName" . }}
+ labels:
+{{ include "policy-models-simulator.labels" . | indent 4 }}
+{{- end -}}
diff --git a/helm/policy-models-simulator/templates/tests/test-connection.yaml b/helm/policy-models-simulator/templates/tests/test-connection.yaml
new file mode 100644
index 00000000..e90661bc
--- /dev/null
+++ b/helm/policy-models-simulator/templates/tests/test-connection.yaml
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Pod
+metadata:
+ name: "{{ include "policy-models-simulator.fullname" . }}-test-connection"
+ labels:
+{{ include "policy-models-simulator.labels" . | indent 4 }}
+ annotations:
+ "helm.sh/hook": test-success
+spec:
+ containers:
+ - name: wget
+ image: busybox
+ command: ['wget']
+ args: ['{{ include "policy-models-simulator.fullname" . }}:{{ .Values.service.port }}']
+ restartPolicy: Never
diff --git a/helm/policy-models-simulator/values.yaml b/helm/policy-models-simulator/values.yaml
new file mode 100644
index 00000000..d6264637
--- /dev/null
+++ b/helm/policy-models-simulator/values.yaml
@@ -0,0 +1,81 @@
+# Default values for policy-models-simulator.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+image:
+ repository: nexus3.onap.org:10001/onap/policy-models-simulator
+ tag: latest
+ pullPolicy: IfNotPresent
+
+imagePullSecrets: []
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+ # Specifies whether a service account should be created
+ create: true
+ # The name of the service account to use.
+ # If not set and create is true, a name is generated using the fullname template
+ name:
+
+podSecurityContext: {}
+ # fsGroup: 2000
+
+securityContext: {}
+ # capabilities:
+ # drop:
+ # - ALL
+ # readOnlyRootFilesystem: true
+ # runAsNonRoot: true
+ # runAsUser: 1000
+
+service:
+ type: ClusterIP
+ name: policy-models-simulator
+ portName: policy-models-simulator
+ externalPort: 3905
+ internalPort: 3905
+ externalPort2: 6667
+ internalPort2: 6667
+ externalPort3: 6668
+ internalPort3: 6668
+ externalPort4: 6669
+ internalPort4: 6669
+ externalPort5: 6670
+ internalPort5: 6670
+ externalPort6: 6680
+ internalPort6: 6680
+
+ingress:
+ enabled: false
+ annotations: {}
+ # kubernetes.io/ingress.class: nginx
+ # kubernetes.io/tls-acme: "true"
+ hosts:
+ - host: chart-example.local
+ paths: []
+
+ tls: []
+ # - secretName: chart-example-tls
+ # hosts:
+ # - chart-example.local
+
+resources: {}
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ # limits:
+ # cpu: 100m
+ # memory: 128Mi
+ # requests:
+ # cpu: 100m
+ # memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}