aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/emcoui/helm
diff options
context:
space:
mode:
authorvikaskumar <vkumar@aarnanetworks.com>2020-09-24 13:07:57 +0530
committervikaskumar <vkumar@aarnanetworks.com>2020-09-24 13:44:30 +0530
commit2b971d6e7f234a5ff192c2a0415e4fde6f32f849 (patch)
tree8692f941710d393cae7e76ad53728f6b79cb031a /src/tools/emcoui/helm
parent425795c7d4e6ce81932918aca2a1462384d4507f (diff)
initial commit of emcoui web app
Signed-off-by: vikaskumar <vkumar@aarnanetworks.com> Change-Id: I78b2f9f4ec3aa0b7a660a21e2ee2d61a3cddadc6 Issue-ID: MULTICLOUD-1225
Diffstat (limited to 'src/tools/emcoui/helm')
-rw-r--r--src/tools/emcoui/helm/emcoui/Chart.yaml18
-rw-r--r--src/tools/emcoui/helm/emcoui/templates/configmap.yaml50
-rw-r--r--src/tools/emcoui/helm/emcoui/templates/deployment.yaml43
-rw-r--r--src/tools/emcoui/helm/emcoui/templates/service.yaml35
-rw-r--r--src/tools/emcoui/helm/emcoui/values.yaml76
5 files changed, 222 insertions, 0 deletions
diff --git a/src/tools/emcoui/helm/emcoui/Chart.yaml b/src/tools/emcoui/helm/emcoui/Chart.yaml
new file mode 100644
index 00000000..eef44bd4
--- /dev/null
+++ b/src/tools/emcoui/helm/emcoui/Chart.yaml
@@ -0,0 +1,18 @@
+#=======================================================================
+# Copyright (c) 2017-2020 Aarna Networks, Inc.
+# 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.
+# ========================================================================
+apiVersion: v1
+description: Emcoui
+name: emcoui
+version: 0.1.0
diff --git a/src/tools/emcoui/helm/emcoui/templates/configmap.yaml b/src/tools/emcoui/helm/emcoui/templates/configmap.yaml
new file mode 100644
index 00000000..a9ba34a5
--- /dev/null
+++ b/src/tools/emcoui/helm/emcoui/templates/configmap.yaml
@@ -0,0 +1,50 @@
+#=======================================================================
+# Copyright (c) 2017-2020 Aarna Networks, Inc.
+# 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.
+# ========================================================================
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: emcoui-config
+data:
+ my-nginx-config.conf: |
+ server {
+ listen {{ .Values.service.internalPort }};
+ server_name localhost;
+ location / {
+ root /usr/share/nginx/html;
+ index index.html;
+ try_files $uri $uri/ /index.html;
+ }
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root /usr/share/nginx/html;
+ }
+ location /v2/controllers {
+ proxy_pass http://orchestrator.{{ .Values.namespace }}.svc.cluster.local:9015;
+ }
+ location /v2/projects {
+ proxy_pass http://orchestrator.{{ .Values.namespace }}.svc.cluster.local:9015;
+ }
+ location /v2/cluster-providers {
+ proxy_pass http://clm.{{ .Values.namespace }}.svc.cluster.local:9061;
+ }
+ location /v2/ovnaction {
+ rewrite ^/v2/ovnaction/(.*) /v2/projects/$1 break;
+ proxy_pass http://ovnaction.{{ .Values.namespace }}.svc.cluster.local:9051;
+ }
+ location /v2/ncm {
+ rewrite ^/v2/ncm/(.*) /v2/cluster-providers/$1 break;
+ proxy_pass http://ncm.{{ .Values.namespace }}.svc.cluster.local:9031;
+ }
+ }
diff --git a/src/tools/emcoui/helm/emcoui/templates/deployment.yaml b/src/tools/emcoui/helm/emcoui/templates/deployment.yaml
new file mode 100644
index 00000000..11ab6f52
--- /dev/null
+++ b/src/tools/emcoui/helm/emcoui/templates/deployment.yaml
@@ -0,0 +1,43 @@
+#=======================================================================
+# Copyright (c) 2017-2020 Aarna Networks, Inc.
+# 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.
+# ========================================================================
+# GUI Deployment
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ .Values.service.name }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: {{ .Values.service.label }}
+ template:
+ metadata:
+ labels:
+ app: {{ .Values.service.label }}
+ spec:
+ containers:
+ - name: {{ .Values.service.name }}
+ image: {{ .Values.image }}
+ imagePullPolicy: Always
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ volumeMounts:
+ - mountPath: /etc/nginx/conf.d
+ readOnly: true
+ name: config
+ volumes:
+ - name: config
+ configMap:
+ name: emcoui-config
diff --git a/src/tools/emcoui/helm/emcoui/templates/service.yaml b/src/tools/emcoui/helm/emcoui/templates/service.yaml
new file mode 100644
index 00000000..2c09a7de
--- /dev/null
+++ b/src/tools/emcoui/helm/emcoui/templates/service.yaml
@@ -0,0 +1,35 @@
+#=======================================================================
+# Copyright (c) 2017-2020 Aarna Networks, Inc.
+# 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.
+# ========================================================================
+# GUI Service
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ .Values.service.name}}
+ labels:
+ app: {{ .Values.service.label }}
+spec:
+ selector:
+ app: {{ .Values.service.name }}
+ type: {{ .Values.service.type }}
+ ports:
+ - name: {{ .Values.service.PortName }}
+ {{if eq .Values.service.type "NodePort" -}}
+ port: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefixExt | default "302" }}{{ .Values.service.nodePort }}
+ {{- else -}}
+ port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ {{- end}}
+ protocol: TCP
diff --git a/src/tools/emcoui/helm/emcoui/values.yaml b/src/tools/emcoui/helm/emcoui/values.yaml
new file mode 100644
index 00000000..f52c0719
--- /dev/null
+++ b/src/tools/emcoui/helm/emcoui/values.yaml
@@ -0,0 +1,76 @@
+#=======================================================================
+# Copyright (c) 2017-2020 Aarna Networks, Inc.
+# 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.
+# ========================================================================
+
+global:
+ nodePortPrefixExt: 304
+ persistence: {}
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: registry.hub.docker.com
+image: emcov2/emcoui:stable
+pullPolicy: Always
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+namespace: onap4k8s
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+
+service:
+ type: NodePort
+ name: emcoui
+ portName: emcoui
+ internalPort: 9080
+ externalPort: 9080
+ nodePort: 80
+ label: emcoui
+
+ingress:
+ enabled: false
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 100m
+ memory: 200Mi
+ requests:
+ cpu: 5m
+ memory: 5Mi
+ large:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 5m
+ memory: 50Mi
+ unlimited: {}