Version of Helm and Kubernetes:
Client: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.8.1", GitCommit:"6af75a8fd72e2aa18a2b278cfe5c7a1c5feca7f2", GitTreeState:"clean"}
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-29T10:10:42Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:17:43Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Which chart:
incubator/drone
What happened:
When configuring my annotations to be kubernetes.io/ingress.class: "nginx" the template renders as if I had set it to gce even though I didn't. This results in the ingress domain taking me to the default backend and not the drone service.
I issue appears to be on this line. It should resolve to false but instead resolves to true.
Manually changing the path to - path: / in the kubernetes dashboard resolves the error.
Can you provide a working solution or a fix? The comparison looks correct to me.
Any update on this issue?
Perhaps @Depado or @puradox have some thoughts?
@jacobtomlinson Could you show me how you define your ingress class ?
I just tried it out, and the path is correctly set to / when using anything else than gce :
$ helm install --dry-run --debug --set ingress.enabled=true --set "ingress.annotations.kubernetes\.io/ingress\.class"="nginx" --set ingress.hosts[0]="drone.example.com" incubator/drone
# Source: drone/templates/ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
labels:
app: drone
heritage: "Tiller"
release: "deadly-salamander"
chart: "drone-1.0.5"
name: deadly-salamander-drone
spec:
rules:
- host: drone.example.com
http:
paths:
- path: /
backend:
serviceName: deadly-salamander-drone
servicePort: 80
Whereas when passing --set "ingress.annotations.kubernetes\.io/ingress\.class"="gce":
# Source: drone/templates/ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "gce"
labels:
app: drone
heritage: "Tiller"
release: "brown-cow"
chart: "drone-1.0.5"
name: brown-cow-drone
spec:
rules:
- host: drone.example.com
http:
paths:
- path: /*
backend:
serviceName: brown-cow-drone
servicePort: 80
In any case, if you didn't define gce explicitely, there's no reason the chart should use /* instead of /. Make sure you have the latest version of the drone chart ?
Also I'm guessing this is entirely my fault as I made a mistake (see this commit) which @puradox fixed. (Thanks a lot by the way and sorry for introducing that regression)
I'm using the nginx ingress chart. You can see my config here.
https://github.com/informatics-lab/terraform-kubernetes/tree/master/cluster-services/nginx-ingress
You can also see the config I used to setup drone. I see I raised the issue after the commit you mention so I would be surprised if I wasn't using the latest version, although it is a possibility if the PR was merged later?
https://github.com/informatics-lab/terraform-kubernetes/tree/master/cluster-services/drone
Running again on my local config now seems to be giving the correct result.
helm install --dry-run --debug -f config.yaml -f secrets.yaml incubator/drone
# Source: drone/templates/ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/tls-acme: "true"
labels:
app: drone
heritage: "Tiller"
release: "volted-eagle"
chart: "drone-0.6.0"
name: volted-eagle-drone
spec:
rules:
- host: drone.informaticslab.co.uk
http:
paths:
- path: /
backend:
serviceName: volted-eagle-drone
servicePort: 80
tls:
- hosts:
- drone.informaticslab.co.uk
secretName: drone.informaticslab.co.uk
My guess would be that #4771 resolved the issue and perhaps I was using a cached version of the chart.
Thanks for your hep.
Most helpful comment
@jacobtomlinson Could you show me how you define your ingress class ?
I just tried it out, and the path is correctly set to
/when using anything else thangce:Whereas when passing
--set "ingress.annotations.kubernetes\.io/ingress\.class"="gce":In any case, if you didn't define
gceexplicitely, there's no reason the chart should use/*instead of/. Make sure you have the latest version of the drone chart ?Also I'm guessing this is entirely my fault as I made a mistake (see this commit) which @puradox fixed. (Thanks a lot by the way and sorry for introducing that regression)