summaryrefslogtreecommitdiffstats
path: root/src/tools/emcoui/helm/emcoui/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/emcoui/helm/emcoui/templates')
-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
3 files changed, 128 insertions, 0 deletions
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