From badc23276a596c251e6e3164e3de26cad705757b Mon Sep 17 00:00:00 2001 From: Kris Nova Date: Thu, 2 Mar 2017 14:24:17 -0700 Subject: [PATCH 1/5] feat(ingress): Experimental Native Ingress Adding logic to disable router Non breaking change, as users must opt-in to the feature. --- .gitignore | 2 +- charts/router/templates/router-deployment.yaml | 2 ++ charts/router/templates/router-dhparam-secret.yaml | 2 ++ charts/router/templates/router-service-account.yaml | 2 ++ charts/router/templates/router-service.yaml | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 91a0347..481dd24 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ rootfs/opt/router/sbin/router rootfs/opt/router/sbin/router.* vendor/ -coverage.txt +coverage.txt \ No newline at end of file diff --git a/charts/router/templates/router-deployment.yaml b/charts/router/templates/router-deployment.yaml index cc21350..f53515c 100644 --- a/charts/router/templates/router-deployment.yaml +++ b/charts/router/templates/router-deployment.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.global.experimental_native_ingress }} apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -88,3 +89,4 @@ spec: port: 9090 initialDelaySeconds: 1 timeoutSeconds: 1 +{{ end }} \ No newline at end of file diff --git a/charts/router/templates/router-dhparam-secret.yaml b/charts/router/templates/router-dhparam-secret.yaml index ad6af4d..24b583d 100644 --- a/charts/router/templates/router-dhparam-secret.yaml +++ b/charts/router/templates/router-dhparam-secret.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.global.experimental_native_ingress }} apiVersion: v1 kind: Secret metadata: @@ -7,3 +8,4 @@ metadata: type: Opaque data: dhparam: {{ if not (empty .Values.dhparam) }}{{ .Values.dhparam | b64enc}}{{ else }}LS0tLS1CRUdJTiBESCBQQVJBTUVURVJTLS0tLS0KTUlJQkNBS0NBUUVBNGJPMlpCOTRYVVh3YjlSL0QxM0xFZ2d6V1U2Y0hZSXJzakdseVhUSkZHZmdsaFl5TUtnUQpKRXFsTjd5RWs0UUNVV25iTEtDU2F4anZCTVNqbWlTR3VvajNWRDlYRTVDaGx2SzlGQVp6alFGMFZ2VzdkNDJmCnNkNmlmcUYwSUV0R2lxWDRpTzhtWmhYZVJrc3BYekZXYkhyTklaanBCdmc5VDhmczY0ZCtDU2l2SXBqWWRVQ1UKQWRhNTViRDdLeWJkTWdJMFZza21jL3RpclN5SkIwZDVmUnYraG1vMW9pOG92Rm9vUFp2cS9HWGxPOHlRRzRZTgppWXdWYmU5c29wQ3lYNzEzaUtlM0pBQ29JWnUxZXgrRjVhbU53U3E3Rk9xb2JqK3Z2cURRM0Q2WEJaanczT3NuClFRWmVhTWYyMDVwOERWbFpWLzRqQUtQeEpUQkxyejh6c3dJQkFnPT0KLS0tLS1FTkQgREggUEFSQU1FVEVSUy0tLS0tCg=={{ end }} +{{ end }} diff --git a/charts/router/templates/router-service-account.yaml b/charts/router/templates/router-service-account.yaml index 3cc8198..95b8b47 100644 --- a/charts/router/templates/router-service-account.yaml +++ b/charts/router/templates/router-service-account.yaml @@ -1,6 +1,8 @@ +{{- if not .Values.global.experimental_native_ingress }} apiVersion: v1 kind: ServiceAccount metadata: name: deis-router labels: heritage: deis +{{ end }} \ No newline at end of file diff --git a/charts/router/templates/router-service.yaml b/charts/router/templates/router-service.yaml index 19423b1..75978fe 100644 --- a/charts/router/templates/router-service.yaml +++ b/charts/router/templates/router-service.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.global.experimental_native_ingress }} apiVersion: v1 kind: Service metadata: @@ -27,3 +28,4 @@ spec: - name: healthz port: 9090 targetPort: 9090 +{{ end }} \ No newline at end of file From 9136b81bf4761718e9bf6b15c408e25d8b458111 Mon Sep 17 00:00:00 2001 From: Kris Nova Date: Mon, 6 Mar 2017 10:30:02 -0700 Subject: [PATCH 2/5] feat(ingress): Experimental Native Ingress Add newline and comment for huge if statmenet Non breaking change, just semantic --- charts/router/templates/router-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/router/templates/router-deployment.yaml b/charts/router/templates/router-deployment.yaml index f53515c..4d20712 100644 --- a/charts/router/templates/router-deployment.yaml +++ b/charts/router/templates/router-deployment.yaml @@ -89,4 +89,4 @@ spec: port: 9090 initialDelaySeconds: 1 timeoutSeconds: 1 -{{ end }} \ No newline at end of file +{{ end }}{{/* if not .Values.global.experimental_native_ingress */}} From a795d722362fc5b280942ca620d9695604488f09 Mon Sep 17 00:00:00 2001 From: Kris Nova Date: Mon, 6 Mar 2017 10:48:21 -0700 Subject: [PATCH 3/5] chore(ingress): Experimental Native Ingress Add newline and comment for huge if statmenet Non breaking change, just semantic --- charts/router/templates/router-dhparam-secret.yaml | 2 +- charts/router/templates/router-service-account.yaml | 2 +- charts/router/templates/router-service.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/router/templates/router-dhparam-secret.yaml b/charts/router/templates/router-dhparam-secret.yaml index 24b583d..2d1a4e1 100644 --- a/charts/router/templates/router-dhparam-secret.yaml +++ b/charts/router/templates/router-dhparam-secret.yaml @@ -8,4 +8,4 @@ metadata: type: Opaque data: dhparam: {{ if not (empty .Values.dhparam) }}{{ .Values.dhparam | b64enc}}{{ else }}LS0tLS1CRUdJTiBESCBQQVJBTUVURVJTLS0tLS0KTUlJQkNBS0NBUUVBNGJPMlpCOTRYVVh3YjlSL0QxM0xFZ2d6V1U2Y0hZSXJzakdseVhUSkZHZmdsaFl5TUtnUQpKRXFsTjd5RWs0UUNVV25iTEtDU2F4anZCTVNqbWlTR3VvajNWRDlYRTVDaGx2SzlGQVp6alFGMFZ2VzdkNDJmCnNkNmlmcUYwSUV0R2lxWDRpTzhtWmhYZVJrc3BYekZXYkhyTklaanBCdmc5VDhmczY0ZCtDU2l2SXBqWWRVQ1UKQWRhNTViRDdLeWJkTWdJMFZza21jL3RpclN5SkIwZDVmUnYraG1vMW9pOG92Rm9vUFp2cS9HWGxPOHlRRzRZTgppWXdWYmU5c29wQ3lYNzEzaUtlM0pBQ29JWnUxZXgrRjVhbU53U3E3Rk9xb2JqK3Z2cURRM0Q2WEJaanczT3NuClFRWmVhTWYyMDVwOERWbFpWLzRqQUtQeEpUQkxyejh6c3dJQkFnPT0KLS0tLS1FTkQgREggUEFSQU1FVEVSUy0tLS0tCg=={{ end }} -{{ end }} +{{ end }}{{/* if not .Values.global.experimental_native_ingress */}} diff --git a/charts/router/templates/router-service-account.yaml b/charts/router/templates/router-service-account.yaml index 95b8b47..5fa7a12 100644 --- a/charts/router/templates/router-service-account.yaml +++ b/charts/router/templates/router-service-account.yaml @@ -5,4 +5,4 @@ metadata: name: deis-router labels: heritage: deis -{{ end }} \ No newline at end of file +{{ end }}{{/* if not .Values.global.experimental_native_ingress */}} diff --git a/charts/router/templates/router-service.yaml b/charts/router/templates/router-service.yaml index 75978fe..7546366 100644 --- a/charts/router/templates/router-service.yaml +++ b/charts/router/templates/router-service.yaml @@ -28,4 +28,4 @@ spec: - name: healthz port: 9090 targetPort: 9090 -{{ end }} \ No newline at end of file +{{ end }}{{/* if not .Values.global.experimental_native_ingress */}} From bece9d53ff91d844b8123b3b22e62c12d5137a05 Mon Sep 17 00:00:00 2001 From: Kris Nova Date: Mon, 6 Mar 2017 12:56:00 -0700 Subject: [PATCH 4/5] chore(ingress): Experimental Native Ingress Remove trailing newline Non breaking change, just semantic --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 481dd24..91a0347 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ rootfs/opt/router/sbin/router rootfs/opt/router/sbin/router.* vendor/ -coverage.txt \ No newline at end of file +coverage.txt From 018e46962e452bbc60d94e8e558cc75edabc5287 Mon Sep 17 00:00:00 2001 From: Kris Nova Date: Mon, 6 Mar 2017 12:59:52 -0700 Subject: [PATCH 5/5] feature(ingress): Experimental Native Ingress Adding global.experimental_native_ingress flag to values.yaml so this can be ran standalone Non breaking change, just semantic --- charts/router/values.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/charts/router/values.yaml b/charts/router/values.yaml index 7392582..0f2c056 100644 --- a/charts/router/values.yaml +++ b/charts/router/values.yaml @@ -24,3 +24,11 @@ host_port: # Service type default to LoadBalancer # service_type: LoadBalancer + +global: + # Experimental feature to toggle using kubernetes ingress instead of the Deis router. + # + # Valid values are: + # - true: The Deis router will NOT be deployed. Inherently workflow will not be usable until a Kubernetes ingress controller is installed. + # - false: The default mode, and the default behavior of Deis workflow. + experimental_native_ingress: false