You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/09/25 13:52:39 UTC

[incubator-dlab] branch DLAB-1028 updated: fixed issue with guacamole

This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch DLAB-1028
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-1028 by this push:
     new 8d77362  fixed issue with guacamole
8d77362 is described below

commit 8d773625e0be634ebd9b44a525ff0d11459f70b0
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Wed Sep 25 16:52:29 2019 +0300

    fixed issue with guacamole
---
 .../main/guacamole-chart/Chart.yaml                |  2 +-
 .../main/guacamole-chart/templates/NOTES.txt       | 14 ++++----
 .../main/guacamole-chart/templates/deployment.yaml | 40 ++++++++++++----------
 .../main/guacamole-chart/values.yaml               |  7 +++-
 4 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/Chart.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/Chart.yaml
index 147a90a..20bfb8b 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/Chart.yaml
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/Chart.yaml
@@ -22,5 +22,5 @@
 apiVersion: v1
 appVersion: "1.0"
 description: A Helm chart for Guacamole
-name: guacamole-dlab
+name: guacamole
 version: 0.1.0
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/NOTES.txt b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/NOTES.txt
index 29995ec..7bb8dfe 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/NOTES.txt
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/NOTES.txt
@@ -20,22 +20,22 @@
 # ******************************************************************************
 
 1. Get the application URL by running these commands:
-{{- if .Values.ui.ingress.enabled }}
-{{- range $host := .Values.ui.ingress.hosts }}
+{{- if .Values.ingress.enabled }}
+{{- range $host := .Values.ingress.hosts }}
   {{- range .paths }}
-  http{{ if $.Values.ui.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
+  http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
   {{- end }}
 {{- end }}
-{{- else if contains "NodePort" .Values.ui.service.type }}
+{{- else if contains "NodePort" .Values.service.type }}
   export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "guacamole.fullname" . }})
   export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
   echo http://$NODE_IP:$NODE_PORT
-{{- else if contains "LoadBalancer" .Values.ui.service.type }}
+{{- else if contains "LoadBalancer" .Values.service.type }}
      NOTE: It may take a few minutes for the LoadBalancer IP to be available.
            You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "guacamole.fullname" . }}'
   export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "guacamole.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
-  echo http://$SERVICE_IP:{{ .Values.ui.service.http_port }}
-{{- else if contains "ClusterIP" .Values.ui.service.type }}
+  echo http://$SERVICE_IP:{{ .Values.service.http_port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
   export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "guacamole.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
   echo "Visit http://127.0.0.1:8080 to use your application"
   kubectl port-forward $POD_NAME 8080:80
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/deployment.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/deployment.yaml
index 2c38b70..46eb127 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/deployment.yaml
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/deployment.yaml
@@ -50,24 +50,28 @@ spec:
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
         - name: {{ .Chart.Name }}
-            image: "{{ .Values.guacamole.image.repository }}:{{ .Values.guacamole.image.tag }}"
-            imagePullPolicy: {{ .Values.guacamole.image.pullPolicy }}
-            env:
-              - name: MYSQL_PASSWORD
-                valueFrom:
-                  secretKeyRef:
-                    name: mysql-guacamole-user-password
-                    key: password
-              - name: MYSQL_DATABASE
-                value: {{ .Values.guacamole.mysql.database }}
-              - name: MYSQL_USER
-                value: {{ .Values.guacamole.mysql.user }}
-            ports:
-              - name: tcp
-                containerPort: 8080
-                protocol: TCP
-            resources:
-              {{- toYaml .Values.resources | nindent 12 }}
+          image: "{{ .Values.guacamole.image.repository }}:{{ .Values.guacamole.image.tag }}"
+          imagePullPolicy: {{ .Values.guacamole.image.pullPolicy }}
+          env:
+            - name: MYSQL_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: mysql-guacamole-user-password
+                  key: password
+            - name: MYSQL_DATABASE
+              value: {{ .Values.guacamole.mysql.database }}
+            - name: MYSQL_USER
+              value: {{ .Values.guacamole.mysql.user }}
+            - name: GUACD_HOSTNAME
+              value: guacamole
+            - name: MYSQL_HOSTNAME
+              value: guacamole-mysql
+          ports:
+            - name: tcp
+              containerPort: 8080
+              protocol: TCP
+          resources:
+            {{- toYaml .Values.resources | nindent 12 }}
       {{- with .Values.nodeSelector }}
       nodeSelector:
         {{- toYaml . | nindent 8 }}
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/values.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/values.yaml
index f8fd2f7..db568bb 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/values.yaml
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/values.yaml
@@ -23,8 +23,13 @@
 # This is a YAML-formatted file.
 # Declare variables to be passed into your templates.
 
+replicaCount: 1
+labels: {}
+
+ingress:
+  enabled: false
 service:
-  type: ClusterIp
+  type: ClusterIP
   port: 4822
 
 guacd:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org