Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 395 forks source link

Issue with Python example #91

Closed jackzampolin closed 7 years ago

jackzampolin commented 7 years ago

I was going through the getting started example and ran into a roadblock. My app was deploying just fine (super cool piece of software btw! I've been doing this by helm create) but it wasn't hooking into my ingress controller. Looking in the python/chart/ingress.yaml it looked like the annotation to allow my ingress controller to pick it up was missing:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: {{ template "fullname" . }}
  labels:
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
...

I went ahead and added it and after starting over with the tutorial I was able to get it working. Should I open a PR to add this annotation to the different packs by default?

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  name: {{ template "fullname" . }}
  labels:
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
ultimateboy commented 7 years ago

I don't think we want to enforce the use of the nginx ingress controller in the default packs. As it stands now, some people use treafik, others use nginx, etc.

I'll have to investigate a bit to understand what could cause this to happen. Do you happen to know multiple ingress controllers installed on your cluster?

rodcloutier commented 7 years ago

I am with @ultimateboy we should not force Nginx. @jackzampolin Are you using the published Nginx ingress controller? By default, it will watch all ingresses that have no class annotation, as with the default chart. If it didn't work on your side, you might have a different configuration or another release of the Nginx ingress controller.

bacongobbler commented 7 years ago

This is not something that we should enforce. I'm against the idea of forcing certain ingress controllers on all users for now so let's keep to the kubernetes ingress spec for now. If the user is using a specific ingress controller they can just modify the ingress resource before calling draft up as you have done. :)