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

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


The following commit(s) were added to refs/heads/DLAB-1158 by this push:
     new b026596  added step-ca
b026596 is described below

commit b0265969c733268d10d5454cfd8057262b6ceaa5
Author: Oleh Martushevskyi <oleh_martushevs...@epam.com>
AuthorDate: Tue Dec 3 16:39:25 2019 +0200

    added step-ca
---
 .../dlab-ui-chart/templates/ingress.yaml           | 21 ++++---
 .../main/modules/helm_charts/external-dns.tf       |  2 +-
 .../.helmignore}                                   | 36 ++++++-----
 .../Chart.yaml}                                    | 19 ++----
 .../templates/NOTES.txt}                           | 18 ++----
 .../nginx-default-backend/templates/_helpers.tpl   | 65 +++++++++++++++++++
 .../templates/nginx-default-backend.yaml}          | 40 ++++++++----
 .../values.yaml}                                   | 14 +----
 .../{external-dns.tf => nginx-ingress/.helmignore} | 36 ++++++-----
 .../{external-dns.tf => nginx-ingress/Chart.yaml}  | 19 ++----
 .../templates/NOTES.txt}                           | 18 ++----
 .../nginx-ingress/templates/_helpers.tpl           | 65 +++++++++++++++++++
 .../templates/nginx-ingress.yaml}                  | 72 ++++++++++++++--------
 .../{external-dns.tf => nginx-ingress/values.yaml} | 14 +----
 .../gcp/ssn-gke/main/modules/helm_charts/nginx.tf  | 53 ++++++++++++----
 15 files changed, 324 insertions(+), 168 deletions(-)

diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/dlab-ui-chart/templates/ingress.yaml
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/dlab-ui-chart/templates/ingress.yaml
index 4a9b809..d53fb5e 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/dlab-ui-chart/templates/ingress.yaml
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/dlab-ui-chart/templates/ingress.yaml
@@ -23,7 +23,7 @@
 
 {{- if .Values.ui.ingress.enabled -}}
 {{- $fullName := include "dlab-ui.fullname" . -}}
-{{ $servicePort := .Values.ui.service.https_port }}
+{{ $servicePort := .Values.ui.service.http_port }}
 {{ $host := .Values.ui.ingress.host }}
 apiVersion: extensions/v1beta1
 kind: Ingress
@@ -36,14 +36,19 @@ metadata:
 {{ toYaml . | indent 4 }}
   {{- end }}
 spec:
-#{{- if .Values.ui.ingress.tls }}
-#  tls:
-#  {{- range .Values.ui.ingress.tls }}
-#    - secretName: {{ .secretName }}
-#  {{- end }}
-#{{- end }}
+{{- if .Values.ui.ingress.tls }}
+  tls:
+  {{- range .Values.ui.ingress.tls }}
+    - hosts:
+      {{- range .hosts }}
+        - {{ . | quote }}
+      {{- end }}
+      secretName: {{ .secretName }}
+  {{- end }}
+{{- end }}
   rules:
-    - http:
+    - host: {{ $host }}
+      http:
         paths:
         - backend:
             serviceName: {{ $fullName }}
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
index 3da1568..34071d0 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
@@ -30,6 +30,6 @@ resource "helm_release" "external_dns" {
     wait       = true
     depends_on = [helm_release.nginx]
     values     = [
-        data.template_file.step_issuer_values.rendered
+        data.template_file.external_dns_values.rendered
     ]
 }
\ No newline at end of file
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/.helmignore
similarity index 67%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/.helmignore
index 3da1568..4976779 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/.helmignore
@@ -19,17 +19,25 @@
 #
 # 
******************************************************************************
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
-
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/Chart.yaml
similarity index 67%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/Chart.yaml
index 3da1568..ef4a57c 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/Chart.yaml
@@ -19,17 +19,8 @@
 #
 # 
******************************************************************************
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
-
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Kubernetes
+name: nginx-default-backend
+version: 0.1.0
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/NOTES.txt
similarity index 67%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/NOTES.txt
index 3da1568..58e9f20 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/NOTES.txt
@@ -19,17 +19,9 @@
 #
 # 
******************************************************************************
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
+Your release is named {{ .Release.Name }}.
 
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
+To learn more about the release, try:
+
+  $ helm status {{ .Release.Name }}
+  $ helm get {{ .Release.Name }}
\ No newline at end of file
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/_helpers.tpl
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/_helpers.tpl
new file mode 100644
index 0000000..cb92b6c
--- /dev/null
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/_helpers.tpl
@@ -0,0 +1,65 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+# 
******************************************************************************
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "nginx-default-backend.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 "nginx-default-backend.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 "nginx-default-backend.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | 
trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "nginx-default-backend.labels" -}}
+app.kubernetes.io/name: {{ include "nginx-default-backend.name" . }}
+helm.sh/chart: {{ include "nginx-default-backend.chart" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/nginx-default-backend.yaml
similarity index 66%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/nginx-default-backend.yaml
index 3da1568..9a4f3be 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/templates/nginx-default-backend.yaml
@@ -1,3 +1,4 @@
+{{- /*
 # *****************************************************************************
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -18,18 +19,31 @@
 # under the License.
 #
 # 
******************************************************************************
+*/ -}}
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
+apiVersion: v1
+kind: Service
+metadata:
+  name: nginx-default-backend
+spec:
+  ports:
+  - port: 80
+    targetPort: 8080
+  selector:
+    app: nginx-default-backend
 
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
+---
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: nginx-default-backend
+spec:
+  template:
+    metadata:
+      labels:
+        app: nginx-default-backend
+    spec:
+      containers:
+      - name: nginx-default-backend
+        image: gcr.io/google_containers/defaultbackend:1.3
\ No newline at end of file
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/values.yaml
similarity index 67%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/values.yaml
index 3da1568..b2591c4 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-default-backend/values.yaml
@@ -19,17 +19,5 @@
 #
 # 
******************************************************************************
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
+replicaCount: 1
 
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/.helmignore
similarity index 67%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/.helmignore
index 3da1568..4976779 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/.helmignore
@@ -19,17 +19,25 @@
 #
 # 
******************************************************************************
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
-
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/Chart.yaml
similarity index 67%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/Chart.yaml
index 3da1568..0255ae4 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/Chart.yaml
@@ -19,17 +19,8 @@
 #
 # 
******************************************************************************
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
-
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Kubernetes
+name: nginx-ingress
+version: 0.1.0
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/NOTES.txt
similarity index 67%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/NOTES.txt
index 3da1568..58e9f20 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/NOTES.txt
@@ -19,17 +19,9 @@
 #
 # 
******************************************************************************
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
+Your release is named {{ .Release.Name }}.
 
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
+To learn more about the release, try:
+
+  $ helm status {{ .Release.Name }}
+  $ helm get {{ .Release.Name }}
\ No newline at end of file
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/_helpers.tpl
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/_helpers.tpl
new file mode 100644
index 0000000..90474ff
--- /dev/null
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/_helpers.tpl
@@ -0,0 +1,65 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+# 
******************************************************************************
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "nginx-ingress.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 "nginx-ingress.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 "nginx-ingress.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | 
trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "nginx-ingress.labels" -}}
+app.kubernetes.io/name: {{ include "nginx-ingress.name" . }}
+helm.sh/chart: {{ include "nginx-ingress.chart" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/dlab-ui-chart/templates/ingress.yaml
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/nginx-ingress.yaml
similarity index 50%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/dlab-ui-chart/templates/ingress.yaml
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/nginx-ingress.yaml
index 4a9b809..aa14acb 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/dlab-ui-chart/templates/ingress.yaml
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/templates/nginx-ingress.yaml
@@ -1,5 +1,5 @@
 {{- /*
-# 
******************************************************************************
+# *****************************************************************************
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -21,32 +21,50 @@
 # 
******************************************************************************
 */ -}}
 
-{{- if .Values.ui.ingress.enabled -}}
-{{- $fullName := include "dlab-ui.fullname" . -}}
-{{ $servicePort := .Values.ui.service.https_port }}
-{{ $host := .Values.ui.ingress.host }}
+apiVersion: v1
+kind: Service
+metadata:
+  name: nginx-ingress
+spec:
+  type: LoadBalancer
+  ports:
+  - name: http
+    port: 80
+    targetPort: 80
+  - name: https
+    port: 443
+    targetPort: 443
+  selector:
+    app: nginx-ingress
+
+---
+
 apiVersion: extensions/v1beta1
-kind: Ingress
+kind: Deployment
 metadata:
-  name: {{ $fullName }}
-  labels:
-{{ include "dlab-ui.labels" . | indent 4 }}
-  annotations:
-{{- with .Values.ui.ingress.annotations }}
-{{ toYaml . | indent 4 }}
-  {{- end }}
+  name: nginx-ingress
 spec:
-#{{- if .Values.ui.ingress.tls }}
-#  tls:
-#  {{- range .Values.ui.ingress.tls }}
-#    - secretName: {{ .secretName }}
-#  {{- end }}
-#{{- end }}
-  rules:
-    - http:
-        paths:
-        - backend:
-            serviceName: {{ $fullName }}
-            servicePort: {{ $servicePort }}
-          path: /
-{{- end }}
\ No newline at end of file
+  template:
+    metadata:
+      labels:
+        app: nginx-ingress
+    spec:
+      containers:
+      - name: nginx-ingress
+        image: gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.3
+        args:
+        - /nginx-ingress-controller
+        - --default-backend-service=default/default-http-backend
+        - --publish-service=default/nginx-ingress-controller
+        env:
+          - name: POD_NAME
+            valueFrom:
+              fieldRef:
+                fieldPath: metadata.name
+          - name: POD_NAMESPACE
+            valueFrom:
+              fieldRef:
+                fieldPath: metadata.namespace
+        ports:
+        - containerPort: 80
+        - containerPort: 443
\ No newline at end of file
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/values.yaml
similarity index 67%
copy from 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
copy to 
infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/values.yaml
index 3da1568..b2591c4 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/external-dns.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx-ingress/values.yaml
@@ -19,17 +19,5 @@
 #
 # 
******************************************************************************
 
-data "template_file" "external_dns_values" {
-  template = file("./modules/helm_charts/external-dns/values.yaml")
-}
+replicaCount: 1
 
-resource "helm_release" "external_dns" {
-    name       = "external-dns"
-    chart      = "./modules/helm_charts/external-dns"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-    wait       = true
-    depends_on = [helm_release.nginx]
-    values     = [
-        data.template_file.step_issuer_values.rendered
-    ]
-}
\ No newline at end of file
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx.tf
index ac03708..74da55c 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/nginx.tf
@@ -19,24 +19,55 @@
 #
 # 
******************************************************************************
 
-data "template_file" "nginx_values" {
-  template = file("./modules/helm_charts/files/nginx_values.yaml")
-  vars = {
-      namespace = var.namespace_name
-      step_ca_service_name = helm_release.step_ca.name
-  }
+//data "template_file" "nginx_values" {
+//  template = file("./modules/helm_charts/files/nginx_values.yaml")
+//  vars = {
+//      namespace = var.namespace_name
+//      step_ca_service_name = helm_release.step_ca.name
+//  }
+//}
+//
+//resource "helm_release" "nginx" {
+//    name       = "nginx-ingress"
+//    chart      = "stable/nginx-ingress"
+//    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
+//    wait       = true
+//    # depends_on = [null_resource.step_ca_delay]
+//    depends_on = [null_resource.crd_delay]
+//
+//    values     = [
+//        file("./modules/helm_charts/files/nginx_values.yaml")
+//    ]
+//}
+
+
+data "template_file" "nginx-default-backend" {
+  template = file("./modules/helm_charts/nginx-default-backend/values.yaml")
 }
 
-resource "helm_release" "nginx" {
-    name       = "nginx-ingress"
-    chart      = "stable/nginx-ingress"
+resource "helm_release" "nginx-default-backend" {
+    name       = "nginx-default-backend"
+    chart      = "./modules/helm_charts/nginx-default-backend"
     namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
     wait       = true
-    # depends_on = [null_resource.step_ca_delay]
     depends_on = [null_resource.crd_delay]
+    values     = [
+        data.template_file.nginx-default-backend.rendered
+    ]
+}
 
+data "template_file" "nginx-ingress" {
+  template = file("./modules/helm_charts/nginx-ingress/values.yaml")
+}
+
+resource "helm_release" "nginx" {
+    name       = "nginx-ingress"
+    chart      = "./modules/helm_charts/nginx-ingress"
+    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
+    wait       = true
+    depends_on = [helm_release.nginx-default-backend]
     values     = [
-        file("./modules/helm_charts/files/nginx_values.yaml")
+        data.template_file.nginx-ingress.rendered
     ]
 }
 


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

Reply via email to