Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in the CRD documentation #4902

Merged
merged 2 commits into from May 27, 2019
Merged

Fix typo in the CRD documentation #4902

merged 2 commits into from May 27, 2019

Conversation

llussy
Copy link
Contributor

@llussy llussy commented May 23, 2019

I used traefik 2.0, I found When the name contains point,The domain name Can't match.

What does this PR do?

After the test,Traefik fails to match when the name contains point.

when the name contains point.

$ kubectl get ingressroutes.traefik.containo.us whoami.crd -o yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"traefik.containo.us/v1alpha1","kind":"IngressRoute","metadata":{"annotations":{},"name":"whoami.crd","namespace":"kube-system"},"spec":{"entryPoints":["web"],"routes":[{"kind":"Rule","match":"Host(`www.whoami.com`)","priority":12,"services":[{"name":"whoami","port":80}]}]}}
  creationTimestamp: 2019-05-23T05:16:52Z
  generation: 1
  name: whoami.crd
  namespace: kube-system
  resourceVersion: "79805677"
  selfLink: /apis/traefik.containo.us/v1alpha1/namespaces/kube-system/ingressroutes/whoami.crd
  uid: f95540e2-7d19-11e9-b1d0-005056bd0b19
spec:
  entryPoints:
  - web
  routes:
  - kind: Rule
    match: Host(`www.whoami.com`)
    priority: 12
    services:
    - name: whoami
      port: 80

Access to the domain name

$  curl www.whoami.com
404 page not found

log

172.30.50.215 - - [23/May/2019:05:18:36 +0000] "GET / HTTP/1.1" 404 19 "-" "curl/7.54.0" 167 - - 0ms
172.30.50.215 - - [23/May/2019:05:18:37 +0000] "GET / HTTP/1.1" 404 19 "-" "curl/7.54.0" 168 - - 0ms

when the name not contains point.

$ kubectl get ingressroutes.traefik.containo.us whoami.crd 
NAME         AGE
whoami.crd   18m
$ kubectl delete ingressroutes.traefik.containo.us whoami.crd 
ingressroute.traefik.containo.us "whoami.crd" deleted

$ kubectl apply -f whoami.yaml 
ingressroute.traefik.containo.us/whoami created
$ kubectl get ingressroutes.traefik.containo.us --all-namespaces 
NAMESPACE     NAME         AGE
kube-system   whoami       6s
monitoring    promethues   37m
$ kubectl get ingressroutes.traefik.containo.us whoami -o yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"traefik.containo.us/v1alpha1","kind":"IngressRoute","metadata":{"annotations":{},"name":"whoami","namespace":"kube-system"},"spec":{"entryPoints":["web"],"routes":[{"kind":"Rule","match":"Host(`www.whoami.com`)","priority":12,"services":[{"name":"whoami","port":80}]}]}}
  creationTimestamp: 2019-05-23T05:36:09Z
  generation: 1
  name: whoami
  namespace: kube-system
  resourceVersion: "79810408"
  selfLink: /apis/traefik.containo.us/v1alpha1/namespaces/kube-system/ingressroutes/whoami
  uid: ab2a763e-7d1c-11e9-acde-005056bd5fee
spec:
  entryPoints:
  - web
  routes:
  - kind: Rule
    match: Host(`www.whoami.com`)
    priority: 12
    services:
    - name: whoami
      port: 80

Access to the domain name

$  curl www.whoami.com
Hostname: whoami-79f9d7f7d4-qsjqs
IP: 127.0.0.1
IP: 10.244.237.200
GET / HTTP/1.1
Host: www.whoami.com
User-Agent: curl/7.29.0
Accept: */*
Accept-Encoding: gzip
X-Forwarded-For: 10.21.8.24
X-Forwarded-Host: www.whoami.com
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: traefik-bccd997c6-grtst
X-Real-Ip: 10.21.8.24

log

10.21.8.24 - - [23/May/2019:05:36:59 +0000] "GET / HTTP/1.1" 200 346 "-" "curl/7.29.0" 174 "kubernetescrd.kube-system/whoami-965c93918f12ebd6eb36" "http://10.244.237.200:80" 1ms
10.21.8.24 - - [23/May/2019:05:43:40 +0000] "GET / HTTP/1.1" 200 345 "-" "curl/7.29.0" 175 "kubernetescrd.kube-system/whoami-965c93918f12ebd6eb36" "http://10.244.58.174:80" 1ms

Motivation

update documentation.

More

  • Added/updated documentation

When the name contains point,Can't match.
@traefiker traefiker added this to the 2.0 milestone May 23, 2019
@ldez ldez changed the title delete .crd Fix typo in the CRD documentation May 23, 2019
@ldez ldez added this to To review in v2 via automation May 23, 2019
@mpl
Copy link
Collaborator

mpl commented May 23, 2019

@llussy Thank you. As far as I know, the underlying issue is going to be fixed by #4885 (among other things), but since it might take a while to land, it's probably wiser to fix the documentation to reflect the current behaviour that you pointed out. I think there might be a few other places in the documentation that should be fixed similarly, but I'll let @ldez double-check that.

@dduportal

This comment has been minimized.

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Tiger-zzZ

This comment has been minimized.

Copy link
Member

@jbdoumenjou jbdoumenjou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traefiker traefiker merged commit b3057a0 into traefik:v2.0 May 27, 2019
v2 automation moved this from To review to Done May 27, 2019
@llussy llussy deleted the patch-1 branch December 31, 2019 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v2
Done
Development

Successfully merging this pull request may close these issues.

None yet

8 participants