diff options
author | vikaskumar <vkumar@aarnanetworks.com> | 2020-11-26 13:11:45 +0530 |
---|---|---|
committer | vikaskumar <vkumar@aarnanetworks.com> | 2020-11-27 12:46:26 +0530 |
commit | e7f3bf3050608edec03aa9d52cf8de79d56dfbd9 (patch) | |
tree | e95a91ade123f2724ff2283fef989976cf074eb0 /src/tools/emcoui/helm | |
parent | 7e06fbaa3d1293ca9b25aeb7ea7cb7be2179e30a (diff) |
MULTICLOUD-1257 updated gui flow
Issue-ID: MULTICLOUD-1257
Change-Id: I5c1432c037952abeed6066cb067192076031f9cd
Signed-off-by: vikaskumar <vkumar@aarnanetworks.com>
Diffstat (limited to 'src/tools/emcoui/helm')
-rw-r--r-- | src/tools/emcoui/helm/emcoui/templates/configmap.yaml | 27 | ||||
-rw-r--r-- | src/tools/emcoui/helm/emcoui/templates/deployment.yaml | 43 | ||||
-rw-r--r-- | src/tools/emcoui/helm/emcoui/templates/service.yaml | 46 | ||||
-rw-r--r-- | src/tools/emcoui/helm/emcoui/values.yaml | 52 |
4 files changed, 135 insertions, 33 deletions
diff --git a/src/tools/emcoui/helm/emcoui/templates/configmap.yaml b/src/tools/emcoui/helm/emcoui/templates/configmap.yaml index a9ba34a5..b62f35dc 100644 --- a/src/tools/emcoui/helm/emcoui/templates/configmap.yaml +++ b/src/tools/emcoui/helm/emcoui/templates/configmap.yaml @@ -11,7 +11,27 @@ # 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. -# ======================================================================== +# ======================================================================== +# middleend config +apiVersion: v1 +kind: ConfigMap +metadata: + name: middleend-config +data: + middleend.conf: |- + { + "ownport": "{{ .Values.middleend.service.internalPort }}", + "orchestrator": "orchestrator.{{ .Values.namespace }}.svc.cluster.local:9015", + "clm": "clm.{{ .Values.namespace }}.svc.cluster.local:9061", + "ovnaction": "ovnaction.{{ .Values.namespace }}.svc.cluster.local:9051", + "issuer": "{{ .Values.authproxy.issuer }}", + "redirect_uri": "{{ .Values.authproxy.redirect_uri }}", + "client_id": "{{ .Values.authproxy.client_id }}", + "mongo": "mongo.{{ .Values.namespace }}.svc.cluster.local:27017" + } + +--- +# emcoui config apiVersion: v1 kind: ConfigMap metadata: @@ -19,7 +39,7 @@ metadata: data: my-nginx-config.conf: | server { - listen {{ .Values.service.internalPort }}; + listen {{ .Values.emcoui.service.internalPort }}; server_name localhost; location / { root /usr/share/nginx/html; @@ -30,6 +50,9 @@ data: location = /50x.html { root /usr/share/nginx/html; } + location /middleend { + proxy_pass http://middleend.{{ .Values.namespace }}.svc.cluster.local:9081; + } location /v2/controllers { proxy_pass http://orchestrator.{{ .Values.namespace }}.svc.cluster.local:9015; } diff --git a/src/tools/emcoui/helm/emcoui/templates/deployment.yaml b/src/tools/emcoui/helm/emcoui/templates/deployment.yaml index 11ab6f52..f1609cd3 100644 --- a/src/tools/emcoui/helm/emcoui/templates/deployment.yaml +++ b/src/tools/emcoui/helm/emcoui/templates/deployment.yaml @@ -12,27 +12,58 @@ # See the License for the specific language governing permissions and # limitations under the License. # ======================================================================== +# middleend Deployment +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.middleend.service.name }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Values.middleend.service.label }} + template: + metadata: + labels: + app: {{ .Values.middleend.service.label }} + spec: + containers: + - name: {{ .Values.middleend.service.name }} + image: "{{ .Values.middleend.image.repository }}:{{ .Values.middleend.image.tag }}" + imagePullPolicy: Always + ports: + - containerPort: {{ .Values.middleend.service.internalPort }} + volumeMounts: + - mountPath: /opt/emco/config + readOnly: true + name: config + volumes: + - name: config + configMap: + name: middleend-config + +--- # GUI Deployment apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Values.service.name }} + name: {{ .Values.emcoui.service.name }} spec: replicas: 1 selector: matchLabels: - app: {{ .Values.service.label }} + app: {{ .Values.emcoui.service.label }} template: metadata: labels: - app: {{ .Values.service.label }} + app: {{ .Values.emcoui.service.label }} spec: containers: - - name: {{ .Values.service.name }} - image: {{ .Values.image }} + - name: {{ .Values.emcoui.service.name }} + image: "{{ .Values.emcoui.image.repository }}:{{ .Values.emcoui.image.tag }}" imagePullPolicy: Always ports: - - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.emcoui.service.internalPort }} volumeMounts: - mountPath: /etc/nginx/conf.d readOnly: true diff --git a/src/tools/emcoui/helm/emcoui/templates/service.yaml b/src/tools/emcoui/helm/emcoui/templates/service.yaml index 2c09a7de..9c88b8f7 100644 --- a/src/tools/emcoui/helm/emcoui/templates/service.yaml +++ b/src/tools/emcoui/helm/emcoui/templates/service.yaml @@ -12,24 +12,48 @@ # See the License for the specific language governing permissions and # limitations under the License. # ======================================================================== -# GUI Service +# middleend Service apiVersion: v1 kind: Service metadata: - name: {{ .Values.service.name}} + name: {{ .Values.middleend.service.name}} labels: - app: {{ .Values.service.label }} + app: {{ .Values.middleend.service.label }} spec: selector: - app: {{ .Values.service.name }} - type: {{ .Values.service.type }} + app: {{ .Values.middleend.service.name }} + type: {{ .Values.middleend.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 }} + - name: {{ .Values.middleend.service.PortName }} + {{if eq .Values.middleend.service.type "NodePort" -}} + port: {{ .Values.middleend.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefixExt | default "302" }}{{ .Values.middleend.service.nodePort }} {{- else -}} - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} + port: {{ .Values.middleend.externalPort }} + targetPort: {{ .Values.middleend.internalPort }} + {{- end}} + protocol: TCP + + +--- +# emcoui service +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.emcoui.service.name}} + labels: + app: {{ .Values.emcoui.service.label }} +spec: + selector: + app: {{ .Values.emcoui.service.name }} + type: {{ .Values.emcoui.service.type }} + ports: + - name: {{ .Values.emcoui.service.PortName }} + {{if eq .Values.emcoui.service.type "NodePort" -}} + port: {{ .Values.emcoui.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefixExt | default "302" }}{{ .Values.emcoui.service.nodePort }} + {{- else -}} + port: {{ .Values.emcoui.service.externalPort }} + targetPort: {{ .Values.emcoui.service.internalPort }} {{- end}} protocol: TCP diff --git a/src/tools/emcoui/helm/emcoui/values.yaml b/src/tools/emcoui/helm/emcoui/values.yaml index f52c0719..d764f722 100644 --- a/src/tools/emcoui/helm/emcoui/values.yaml +++ b/src/tools/emcoui/helm/emcoui/values.yaml @@ -11,7 +11,7 @@ # 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 @@ -19,11 +19,6 @@ global: ################################################################# # Application configuration defaults. ################################################################# -# application image -repository: registry.hub.docker.com -image: emcov2/emcoui:stable -pullPolicy: Always - # default number of instances replicaCount: 1 @@ -44,14 +39,43 @@ readiness: initialDelaySeconds: 10 periodSeconds: 30 -service: - type: NodePort - name: emcoui - portName: emcoui - internalPort: 9080 - externalPort: 9080 - nodePort: 80 - label: emcoui +middleend: + service: + type: NodePort + name: middleend + portName: middleend + internalPort: 9081 + externalPort: 9081 + nodePort: 81 + label: middleend + + image: + registry: registry.hub.docker.com + repository: amcop/middleend + tag: master + pullPolicy: Always + +emcoui: + service: + type: NodePort + name: emcoui + portName: emcoui + internalPort: 9080 + externalPort: 9080 + nodePort: 80 + label: emcoui + + image: + registry: registry.hub.docker.com + repository: amcop/emcoui + tag: master + pullPolicy: Always + +authproxy: + # These values should be updated at the time of deployment + issuer: http://192.168.122.224:31064/auth/realms/EMCO/ + redirect_uri: http://192.168.122.224:30481/middleend/callback + client_id: emcoapp ingress: enabled: false |