diff options
Diffstat (limited to 'helm/ves-client')
-rw-r--r-- | helm/ves-client/Chart.yaml | 34 | ||||
-rw-r--r-- | helm/ves-client/README.md | 23 | ||||
-rw-r--r-- | helm/ves-client/resources/cert.p12 | bin | 0 -> 2685 bytes | |||
-rw-r--r-- | helm/ves-client/resources/p12.pass | 1 | ||||
-rw-r--r-- | helm/ves-client/resources/trust.jks | bin | 0 -> 1455 bytes | |||
-rw-r--r-- | helm/ves-client/resources/truststore.pass | 1 | ||||
-rw-r--r-- | helm/ves-client/templates/_helpers.tpl | 53 | ||||
-rw-r--r-- | helm/ves-client/templates/configmap.yaml | 11 | ||||
-rw-r--r-- | helm/ves-client/templates/deployment.yaml | 63 | ||||
-rw-r--r-- | helm/ves-client/templates/service.yaml | 15 | ||||
-rw-r--r-- | helm/ves-client/values.yaml | 54 |
11 files changed, 255 insertions, 0 deletions
diff --git a/helm/ves-client/Chart.yaml b/helm/ves-client/Chart.yaml new file mode 100644 index 0000000..1629944 --- /dev/null +++ b/helm/ves-client/Chart.yaml @@ -0,0 +1,34 @@ +apiVersion: v2 +name: ves-client +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. +appVersion: 1.0.1 +dependencies: + - name: mongodb + version: 10.x + repository: https://charts.bitnami.com/bitnami + condition: mongodb.enabled + - name: mongo-express + version: 2.x + repository: https://cowboysysop.github.io/charts/ + - name: repositoryGenerator + version: ~8.x-0 + repository: '@local' diff --git a/helm/ves-client/README.md b/helm/ves-client/README.md new file mode 100644 index 0000000..d565f03 --- /dev/null +++ b/helm/ves-client/README.md @@ -0,0 +1,23 @@ +# Ves-client + +# How to deploy on lab + +1. Copy files from helm/ves-client to lab + + `scp -i <path to key file .pem> -r <path to>/ves-client ubuntu@<RKE_NODE_IP>:<remote path to>/ves-client ` +2. Log into the RKE + +3. Update helm dependencies + + `cd ./ves-client` + `helm dependency update` + +4. Install chart on your lab + + `helm install ves-client ./ves-client -f oom/kubernetes/registry.yaml` + +# How to use ves-client + +<https://gerrit.onap.org/r/gitweb?p=integration/simulators/nf-simulator/ves-client.git;a=blob_plain;f=README.md;hb=HEAD> + +
\ No newline at end of file diff --git a/helm/ves-client/resources/cert.p12 b/helm/ves-client/resources/cert.p12 Binary files differnew file mode 100644 index 0000000..0bbec38 --- /dev/null +++ b/helm/ves-client/resources/cert.p12 diff --git a/helm/ves-client/resources/p12.pass b/helm/ves-client/resources/p12.pass new file mode 100644 index 0000000..25acfbf --- /dev/null +++ b/helm/ves-client/resources/p12.pass @@ -0,0 +1 @@ +collector
\ No newline at end of file diff --git a/helm/ves-client/resources/trust.jks b/helm/ves-client/resources/trust.jks Binary files differnew file mode 100644 index 0000000..e90b710 --- /dev/null +++ b/helm/ves-client/resources/trust.jks diff --git a/helm/ves-client/resources/truststore.pass b/helm/ves-client/resources/truststore.pass new file mode 100644 index 0000000..25acfbf --- /dev/null +++ b/helm/ves-client/resources/truststore.pass @@ -0,0 +1 @@ +collector
\ No newline at end of file diff --git a/helm/ves-client/templates/_helpers.tpl b/helm/ves-client/templates/_helpers.tpl new file mode 100644 index 0000000..1d8fd9f --- /dev/null +++ b/helm/ves-client/templates/_helpers.tpl @@ -0,0 +1,53 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ves-client.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 "ves-client.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 "ves-client.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ves-client.labels" -}} +helm.sh/chart: {{ include "ves-client.chart" . }} +{{ include "ves-client.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ves-client.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ves-client.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + diff --git a/helm/ves-client/templates/configmap.yaml b/helm/ves-client/templates/configmap.yaml new file mode 100644 index 0000000..4717c38 --- /dev/null +++ b/helm/ves-client/templates/configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Chart.Name }}-configmap +binaryData: + {{- $files := .Files }} + {{- range $key, $value := .Files }} + {{- if hasPrefix "resources/" $key }} + {{ $key | trimPrefix "resources/" }}: {{ $files.Get $key | b64enc | quote }} + {{- end }} + {{- end }} diff --git a/helm/ves-client/templates/deployment.yaml b/helm/ves-client/templates/deployment.yaml new file mode 100644 index 0000000..d635c69 --- /dev/null +++ b/helm/ves-client/templates/deployment.yaml @@ -0,0 +1,63 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ves-client.fullname" . }} + labels: + {{- include "ves-client.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "ves-client.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ves-client.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - env: + - name: MONGO_HOSTNAME + value: {{ .Values.config.mongoDbServer | quote }} + - name: USE_CERTIFICATE_FOR_AUTHORIZATION + value: {{ .Values.config.useCertForAuth | quote }} + name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: {{ include "repositoryGenerator.repository" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.config.containerPort }} + protocol: TCP + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: store-map + mountPath: {{ .Values.storeMap.directory }} + volumes: + - name: store-map + configMap: + name: {{ .Chart.Name }}-configmap + defaultMode: 0755 + {{- 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/ves-client/templates/service.yaml b/helm/ves-client/templates/service.yaml new file mode 100644 index 0000000..ad67f9b --- /dev/null +++ b/helm/ves-client/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "ves-client.fullname" . }} + labels: + {{- include "ves-client.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.port }} + protocol: TCP + name: {{ .Values.service.port | quote }} + selector: + {{- include "ves-client.selectorLabels" . | nindent 4 }} diff --git a/helm/ves-client/values.yaml b/helm/ves-client/values.yaml new file mode 100644 index 0000000..c5a8391 --- /dev/null +++ b/helm/ves-client/values.yaml @@ -0,0 +1,54 @@ +# Default values for ves-client. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: /onap/org.onap.integration.nfsimulator.vesclient + pullPolicy: IfNotPresent + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "ves-client" +config: + mongoDbServer: ves-client-mongodb + useCertForAuth: true + containerPort: 5000 + +storeMap: + directory: "/app/store" + +podAnnotations: {} + +podSecurityContext: {} + +securityContext: {} + +service: + type: NodePort + port: 5000 + +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +mongo-express: + fullnameOverride: "ves-client-mongo-express" + mongodbServer: ves-client-mongodb + nameOverride: mongo-express + mongodbAdminPassword: zXcVbN123! + +mongodb: + fullnameOverride: "ves-client-mongodb" + persistence: + enabled: false + auth: + rootPassword: zXcVbN123! + database: pnf_simulator + username: root |