aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdyta Krukowska <edyta.krukowska@nokia.com>2021-04-21 10:44:20 +0200
committerEdyta Krukowska <edyta.krukowska@nokia.com>2021-04-21 10:54:56 +0200
commit831e07a31fff07a9d2ab59f730852cd38680384a (patch)
tree24cb211a761685847d745a2a395422e586c72027
parent026a9a7082733cabe8e6dab3819059c65973a0ef (diff)
Change helm for avcn to communicate with kafka
Issue-ID: INT-1869 Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com> Change-Id: Ic32d6743cc9603e07c82ec69e8aa958c09809f8d
-rw-r--r--helm/avcn-manager/Chart.yaml32
-rw-r--r--helm/avcn-manager/templates/_helpers.tpl62
-rw-r--r--helm/avcn-manager/templates/deployment.yaml56
-rw-r--r--helm/avcn-manager/templates/service.yaml16
-rw-r--r--helm/avcn-manager/values.yaml65
5 files changed, 231 insertions, 0 deletions
diff --git a/helm/avcn-manager/Chart.yaml b/helm/avcn-manager/Chart.yaml
new file mode 100644
index 0000000..6f1e851
--- /dev/null
+++ b/helm/avcn-manager/Chart.yaml
@@ -0,0 +1,32 @@
+apiVersion: v2
+name: avcn-manager
+description: A Helm chart for Kubernetes
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+# Versions are expected to follow Semantic Versioning (https://semver.org/)
+version: 0.1.0
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application. Versions are not expected to
+# follow Semantic Versioning. They should reflect the version the application is using.
+# It is recommended to use it with quotes.
+appVersion: "1.0.1"
+
+dependencies:
+ - name: zookeeper
+ version: 6.7.0
+ repository: https://charts.bitnami.com/bitnami
+ - name: kafka
+ version: 12.17.2
+ repository: https://charts.bitnami.com/bitnami
diff --git a/helm/avcn-manager/templates/_helpers.tpl b/helm/avcn-manager/templates/_helpers.tpl
new file mode 100644
index 0000000..30f9071
--- /dev/null
+++ b/helm/avcn-manager/templates/_helpers.tpl
@@ -0,0 +1,62 @@
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "avcn-manager.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 "avcn-manager.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 "avcn-manager.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "avcn-manager.labels" -}}
+helm.sh/chart: {{ include "avcn-manager.chart" . }}
+{{ include "avcn-manager.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "avcn-manager.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "avcn-manager.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "avcn-manager.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "avcn-manager.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm/avcn-manager/templates/deployment.yaml b/helm/avcn-manager/templates/deployment.yaml
new file mode 100644
index 0000000..5b0c472
--- /dev/null
+++ b/helm/avcn-manager/templates/deployment.yaml
@@ -0,0 +1,56 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "avcn-manager.fullname" . }}
+ labels:
+ {{- include "avcn-manager.labels" . | nindent 4 }}
+spec:
+ selector:
+ matchLabels:
+ {{- include "avcn-manager.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "avcn-manager.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - env:
+ - name: REST_CLIENT_VES_ENDPOINT
+ value: {{ .Values.config.vesEndpoint | quote }}
+ - name: KAFKA_BOOTSTRAP_SERVERS
+ value: {{ .Values.config.kafkaBootstrapServer | quote }}
+ - name: KAFKA_SOURCE_TOPIC
+ value: {{ .Values.config.kafkaSourceTopic | quote }}
+ - name: KAFKA_APPLICATION_ID
+ value: {{ .Values.config.kafkaAplicationId | quote }}
+ - name: REST_CLIENT_PNFSIMULATOR_ENDPOINT
+ value: {{ .Values.config.pnfsimulatorEndpoint | quote }}
+ name: {{ .Chart.Name }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ 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 }}
diff --git a/helm/avcn-manager/templates/service.yaml b/helm/avcn-manager/templates/service.yaml
new file mode 100644
index 0000000..d637d02
--- /dev/null
+++ b/helm/avcn-manager/templates/service.yaml
@@ -0,0 +1,16 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "avcn-manager.fullname" . }}
+ labels:
+ {{- include "avcn-manager.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.service.port }}
+ nodePort: {{ .Values.service.nodePort }}
+ protocol: TCP
+ name: http
+ selector:
+ {{- include "avcn-manager.selectorLabels" . | nindent 4 }}
diff --git a/helm/avcn-manager/values.yaml b/helm/avcn-manager/values.yaml
new file mode 100644
index 0000000..85ccb09
--- /dev/null
+++ b/helm/avcn-manager/values.yaml
@@ -0,0 +1,65 @@
+# Default values for avcn-manager.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+image:
+ repository: onap/org.onap.integration.nfsimulator.avcnmanager
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: ""
+
+config:
+ vesEndpoint: http://ves:8080/eventListener/v7
+ kafkaBootstrapServer: avcn-manager-kafka:9092
+ kafkaSourceTopic: config
+ kafkaAplicationId: avcn-manager
+ pnfsimulatorEndpoint: http://ves-client:5000/simulator/start
+
+
+imagePullSecrets: []
+nameOverride: ""
+fullnameOverride: "avcn-manager"
+
+podAnnotations: {}
+
+podSecurityContext: {}
+
+
+securityContext: {}
+
+
+service:
+ type: NodePort
+ port: 8080
+ nodePort: 31090
+
+
+resources: {}
+
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
+
+
+zookeeper:
+ fullnameOverride: "avcn-manager-zookeeper"
+ auth:
+ enabled: false
+ allowAnonymousLogin: true
+ persistence:
+ enabled: false
+
+kafka:
+ fullnameOverride: "avcn-manager-kafka"
+ zookeeper:
+ enabled: false
+ connect: "avcn-manager-zookeeper:2181"
+ externalZookeeper:
+ servers: "avcn-manager-zookeeper"
+ persistence:
+ enabled: false