diff --git a/garden-service/static/kubernetes/system/default-backend/404.html b/garden-service/static/kubernetes/system/default-backend/404.html new file mode 100644 index 0000000000..3b2f94e8af --- /dev/null +++ b/garden-service/static/kubernetes/system/default-backend/404.html @@ -0,0 +1,12 @@ + + +
+garden get status
to check the exposed endpoints and whether your services are deployed and healthy. 🚀
+
+
diff --git a/garden-service/static/kubernetes/system/default-backend/Dockerfile b/garden-service/static/kubernetes/system/default-backend/Dockerfile
new file mode 100644
index 0000000000..ef28cb6b1f
--- /dev/null
+++ b/garden-service/static/kubernetes/system/default-backend/Dockerfile
@@ -0,0 +1,4 @@
+FROM nginx:1.15.3-alpine
+
+ADD nginx.conf /etc/nginx/conf.d/default.conf
+ADD 404.html /opt/local/html/404.html
diff --git a/garden-service/static/kubernetes/system/default-backend/garden.yml b/garden-service/static/kubernetes/system/default-backend/garden.yml
new file mode 100644
index 0000000000..bab44d66aa
--- /dev/null
+++ b/garden-service/static/kubernetes/system/default-backend/garden.yml
@@ -0,0 +1,9 @@
+module:
+ name: default-backend
+ description: Default backend ingress controller
+ type: container
+ services:
+ - name: default-backend
+ ports:
+ - name: http
+ containerPort: 80
diff --git a/garden-service/static/kubernetes/system/default-backend/nginx.conf b/garden-service/static/kubernetes/system/default-backend/nginx.conf
new file mode 100644
index 0000000000..7b75b679fc
--- /dev/null
+++ b/garden-service/static/kubernetes/system/default-backend/nginx.conf
@@ -0,0 +1,27 @@
+ # The default server.
+server {
+ listen 80 default_server;
+ listen 8080;
+ server_name _;
+
+ root /opt/local/html;
+
+ error_page 404 /404.html;
+
+ # needs to respond to /healthz for http health checks on port 8080
+ location /healthz {
+ return 200 'OK!';
+ # To see reply in browser
+ add_header Content-Type text/plain;
+
+ }
+ # Everything is a 404
+ location / {
+ return 404;
+ }
+
+ # EDIT: You may need this to prevent return 404; recursion
+ location = /404.html {
+ internal;
+ }
+}
diff --git a/garden-service/static/kubernetes/system/ingress-controller/garden.yml b/garden-service/static/kubernetes/system/ingress-controller/garden.yml
index fcf372406e..5ef0631967 100644
--- a/garden-service/static/kubernetes/system/ingress-controller/garden.yml
+++ b/garden-service/static/kubernetes/system/ingress-controller/garden.yml
@@ -3,10 +3,15 @@ module:
name: ingress-controller
type: helm
chart: stable/nginx-ingress
+ dependencies:
+ - default-backend
version: 0.25.1
parameters:
name: ingress-controller
controller:
+ defaultBackendService: garden-system/default-backend
kind: DaemonSet
daemonset:
useHostPort: true
+ defaultBackend:
+ enabled: false