From a928915e296d886f73a1248497896219bc67aec6 Mon Sep 17 00:00:00 2001 From: Kostas Livieratos Date: Sat, 5 Sep 2020 13:18:39 +0200 Subject: [PATCH 1/7] Private ingress manifests - WIP --- templates/ingress_private.yaml | 41 ++++++++++++++++++++++++++++++++++ values.yaml | 14 ++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 templates/ingress_private.yaml diff --git a/templates/ingress_private.yaml b/templates/ingress_private.yaml new file mode 100644 index 0000000..c1e4f1e --- /dev/null +++ b/templates/ingress_private.yaml @@ -0,0 +1,41 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "service_template.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }}-private + labels: + {{- include "service_template.labels" . | nindent 4 }} + {{- with .Values.ingress_private.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress_private.tls }} + tls: + {{- range .Values.ingress_private.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress_private.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} diff --git a/values.yaml b/values.yaml index 032cc77..2f4c4ef 100644 --- a/values.yaml +++ b/values.yaml @@ -53,6 +53,20 @@ ingress: # hosts: # - chart-example.local +ingress_private: + enabled: false + annotations: {} + kubernetes.io/ingress.class: nginx + kubernetes.io/tls-acme: "true" + ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + resources: {} # limits: # cpu: 100m From 511c3dd1c4d79defa84c7f3be7e1f4e6a1335802 Mon Sep 17 00:00:00 2001 From: Kostas Livieratos Date: Sun, 13 Sep 2020 22:02:29 +0200 Subject: [PATCH 2/7] Toggled private ingress config for nginx ingress controller --- values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/values.yaml b/values.yaml index 2f4c4ef..7f464ce 100644 --- a/values.yaml +++ b/values.yaml @@ -55,10 +55,10 @@ ingress: ingress_private: enabled: false - annotations: {} + annotations: kubernetes.io/ingress.class: nginx kubernetes.io/tls-acme: "true" - ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 + nginx.ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 hosts: - host: chart-example.local paths: [] From f7f3cb9f392f0b423b88b922eacc802fcf44c7bf Mon Sep 17 00:00:00 2001 From: Kostas Livieratos Date: Sat, 19 Sep 2020 22:58:38 +0200 Subject: [PATCH 3/7] Fixed config for private ingress --- templates/ingress_private.yaml | 2 +- values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/ingress_private.yaml b/templates/ingress_private.yaml index c1e4f1e..1c5d9b6 100644 --- a/templates/ingress_private.yaml +++ b/templates/ingress_private.yaml @@ -1,4 +1,4 @@ -{{- if .Values.ingress.enabled -}} +{{- if .Values.ingress_private.enabled -}} {{- $fullName := include "service_template.fullname" . -}} {{- $svcPort := .Values.service.port -}} {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} diff --git a/values.yaml b/values.yaml index 7f464ce..45d0139 100644 --- a/values.yaml +++ b/values.yaml @@ -58,7 +58,7 @@ ingress_private: annotations: kubernetes.io/ingress.class: nginx kubernetes.io/tls-acme: "true" - nginx.ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 + nginx.ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 # Change this to satisfy your requirements hosts: - host: chart-example.local paths: [] From 365d41eb276f50c494b24345c4c831520e967ead Mon Sep 17 00:00:00 2001 From: Kostas Livieratos Date: Sat, 5 Sep 2020 13:18:39 +0200 Subject: [PATCH 4/7] Private ingress manifests - WIP --- templates/ingress_private.yaml | 41 ++++++++++++++++++++++++++++++++++ values.yaml | 14 ++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 templates/ingress_private.yaml diff --git a/templates/ingress_private.yaml b/templates/ingress_private.yaml new file mode 100644 index 0000000..c1e4f1e --- /dev/null +++ b/templates/ingress_private.yaml @@ -0,0 +1,41 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "service_template.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }}-private + labels: + {{- include "service_template.labels" . | nindent 4 }} + {{- with .Values.ingress_private.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress_private.tls }} + tls: + {{- range .Values.ingress_private.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress_private.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} diff --git a/values.yaml b/values.yaml index 61b977c..bc6f003 100644 --- a/values.yaml +++ b/values.yaml @@ -57,6 +57,20 @@ ingress: # hosts: # - chart-example.local +ingress_private: + enabled: false + annotations: {} + kubernetes.io/ingress.class: nginx + kubernetes.io/tls-acme: "true" + ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + resources: {} # limits: # cpu: 100m From c52bc2b44e3e02d0c93deccf7186d9e3c5d2f530 Mon Sep 17 00:00:00 2001 From: Kostas Livieratos Date: Sun, 13 Sep 2020 22:02:29 +0200 Subject: [PATCH 5/7] Toggled private ingress config for nginx ingress controller --- values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/values.yaml b/values.yaml index bc6f003..7294f89 100644 --- a/values.yaml +++ b/values.yaml @@ -59,10 +59,10 @@ ingress: ingress_private: enabled: false - annotations: {} + annotations: kubernetes.io/ingress.class: nginx kubernetes.io/tls-acme: "true" - ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 + nginx.ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 hosts: - host: chart-example.local paths: [] From eec9e59a4b777f286322602ac60a6bd2966ca0b9 Mon Sep 17 00:00:00 2001 From: Kostas Livieratos Date: Sat, 19 Sep 2020 22:58:38 +0200 Subject: [PATCH 6/7] Fixed config for private ingress --- templates/ingress_private.yaml | 2 +- values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/ingress_private.yaml b/templates/ingress_private.yaml index c1e4f1e..1c5d9b6 100644 --- a/templates/ingress_private.yaml +++ b/templates/ingress_private.yaml @@ -1,4 +1,4 @@ -{{- if .Values.ingress.enabled -}} +{{- if .Values.ingress_private.enabled -}} {{- $fullName := include "service_template.fullname" . -}} {{- $svcPort := .Values.service.port -}} {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} diff --git a/values.yaml b/values.yaml index 7294f89..874059d 100644 --- a/values.yaml +++ b/values.yaml @@ -62,7 +62,7 @@ ingress_private: annotations: kubernetes.io/ingress.class: nginx kubernetes.io/tls-acme: "true" - nginx.ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 + nginx.ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32 # Change this to satisfy your requirements hosts: - host: chart-example.local paths: [] From e65b2de66d13e0a3aa09fa723f2318dd3293fca3 Mon Sep 17 00:00:00 2001 From: Kostas Livieratos Date: Sat, 19 Sep 2020 23:00:41 +0200 Subject: [PATCH 7/7] Bumped up chart version --- Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 7a4306f..52f6fff 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 name: servicetpl description: A Helm chart for services running on Kubernetes -version: 0.6.1 +version: 0.7.0