aboutsummaryrefslogtreecommitdiffstats
path: root/helm/pm-https-server
diff options
context:
space:
mode:
Diffstat (limited to 'helm/pm-https-server')
-rw-r--r--helm/pm-https-server/Chart.yaml23
-rw-r--r--helm/pm-https-server/README.md34
-rw-r--r--helm/pm-https-server/resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gzbin0 -> 2046 bytes
-rw-r--r--helm/pm-https-server/templates/_helpers.tpl62
-rw-r--r--helm/pm-https-server/templates/deployment.yaml45
-rw-r--r--helm/pm-https-server/templates/service.yaml15
-rw-r--r--helm/pm-https-server/values.yaml40
7 files changed, 219 insertions, 0 deletions
diff --git a/helm/pm-https-server/Chart.yaml b/helm/pm-https-server/Chart.yaml
new file mode 100644
index 0000000..2ced51d
--- /dev/null
+++ b/helm/pm-https-server/Chart.yaml
@@ -0,0 +1,23 @@
+apiVersion: v2
+name: pmhttpsserver
+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
diff --git a/helm/pm-https-server/README.md b/helm/pm-https-server/README.md
new file mode 100644
index 0000000..ba84f99
--- /dev/null
+++ b/helm/pm-https-server/README.md
@@ -0,0 +1,34 @@
+# PM HTTPS Server
+
+# How to deploy on lab
+
+1. Copy files from helm/pm-https-server to lab
+
+ `scp -i <path to key file .pem> -r <path to>/pm-https-server ubuntu@<RKE_NODE_IP>:<remote path to>/pm-https-server `
+2. Log into the RKE
+
+3. Install chart on your lab
+
+ `helm install pm-https-server ./pm-https-server`
+
+# Checking if everything is working properly
+
+1. Find service on which your application runs
+
+ `kubectl get service | grep pm-https-server`
+
+2. If service is running try to connect to server
+
+ `curl -u demo:demo123456! <http://WORKER_IP:PM_HTTPS_SERVER_PORT>`
+
+ if everything is working properly you should get response like below
+
+ `<html><body><h1>It works!</h1></body></html>`
+
+3. If step 2 ends with success try to upload file
+
+ `curl -F "uploaded_file=@./resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz" -u demo:demo123456! http://WORKER_IP:PM_HTTPS_SERVER_PORT/upload.php`
+
+ When file will be successfully uploaded you should see information like this:
+
+ `The file E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz has been uploaded` \ No newline at end of file
diff --git a/helm/pm-https-server/resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz b/helm/pm-https-server/resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz
new file mode 100644
index 0000000..3af5ea8
--- /dev/null
+++ b/helm/pm-https-server/resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz
Binary files differ
diff --git a/helm/pm-https-server/templates/_helpers.tpl b/helm/pm-https-server/templates/_helpers.tpl
new file mode 100644
index 0000000..ad76703
--- /dev/null
+++ b/helm/pm-https-server/templates/_helpers.tpl
@@ -0,0 +1,62 @@
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "pmhttpsserver.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 "pmhttpsserver.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 "pmhttpsserver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "pmhttpsserver.labels" -}}
+helm.sh/chart: {{ include "pmhttpsserver.chart" . }}
+{{ include "pmhttpsserver.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "pmhttpsserver.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "pmhttpsserver.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "pmhttpsserver.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "pmhttpsserver.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm/pm-https-server/templates/deployment.yaml b/helm/pm-https-server/templates/deployment.yaml
new file mode 100644
index 0000000..80a4079
--- /dev/null
+++ b/helm/pm-https-server/templates/deployment.yaml
@@ -0,0 +1,45 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "pmhttpsserver.fullname" . }}
+ labels:
+ {{- include "pmhttpsserver.labels" . | nindent 4 }}
+spec:
+ selector:
+ matchLabels:
+ {{- include "pmhttpsserver.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "pmhttpsserver.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: {{ .Chart.Name }}
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: 80
+ protocol: TCP
+ 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/pm-https-server/templates/service.yaml b/helm/pm-https-server/templates/service.yaml
new file mode 100644
index 0000000..7ea7db3
--- /dev/null
+++ b/helm/pm-https-server/templates/service.yaml
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "pmhttpsserver.fullname" . }}
+ labels:
+ {{- include "pmhttpsserver.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: http
+ protocol: TCP
+ name: http
+ selector:
+ {{- include "pmhttpsserver.selectorLabels" . | nindent 4 }}
diff --git a/helm/pm-https-server/values.yaml b/helm/pm-https-server/values.yaml
new file mode 100644
index 0000000..5301bba
--- /dev/null
+++ b/helm/pm-https-server/values.yaml
@@ -0,0 +1,40 @@
+# Default values for myhttpsserver.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+image:
+ repository: onap/org.onap.integration.nfsimulator.pmhttpsserver
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: ""
+
+imagePullSecrets: []
+nameOverride: ""
+fullnameOverride: ""
+
+podAnnotations: {}
+
+
+service:
+ type: NodePort
+ port: 80
+
+
+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: {}