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

Warning: path /v1.0/ cannot be used with pathType Prefix #10308

Closed
Marat-Gumerov opened this issue Aug 13, 2023 · 6 comments · Fixed by #10330
Closed

Warning: path /v1.0/ cannot be used with pathType Prefix #10308

Marat-Gumerov opened this issue Aug 13, 2023 · 6 comments · Fixed by #10330
Assignees
Labels
needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@Marat-Gumerov
Copy link

What happened:

Warning: path /v1.0/ cannot be used with pathType Prefix

What you expected to happen:

No warning

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):

-------------------------------------------------------------------------------
NGINX Ingress controller
  Release:       v1.8.1
  Build:         dc88dce9ea5e700f3301d16f971fa17c6cfe757d
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.21.6

-------------------------------------------------------------------------------

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.4", GitCommit:"fa3d7990104d7c1f16943a67f11b154b71f6a132", GitTreeState:"clean", BuildDate:"2023-07-20T02:11:13Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.3", GitCommit:"25b4e43193bcda6c7328a6d147b1fb73a33f1598", GitTreeState:"clean", BuildDate:"2023-06-14T09:47:40Z", GoVersion:"go1.20.5", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Cloud provider or hardware configuration: Local/Minikube
  • OS (e.g. from /etc/os-release): Ubuntu 23.04
  • Kernel (e.g. uname -a): Linux marat-TM1701 6.2.0-27-generic Relax lint checks #28-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 12 22:39:51 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: minikube
  • Basic cluster related info:
    • kubectl get nodes -o wide
NAME       STATUS   ROLES           AGE    VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION     CONTAINER-RUNTIME
minikube   Ready    control-plane   146m   v1.27.3   192.168.49.2   <none>        Ubuntu 22.04.2 LTS   6.2.0-27-generic   docker://24.0.4
  • How was the ingress-nginx-controller installed:

minikube addons enable ingress

  • Current State of the controller:
    • kubectl describe ingressclasses
Name:         nginx
Labels:       app.kubernetes.io/component=controller
              app.kubernetes.io/instance=ingress-nginx
              app.kubernetes.io/name=ingress-nginx
Annotations:  ingressclass.kubernetes.io/is-default-class: true
Controller:   k8s.io/ingress-nginx
Events:       <none>

How to reproduce this issue:

  • Install minikube
  • Enable ingress addon: minikube addons enable ingress
  • Deploy http-svc kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/http-svc.yaml
  • Create ingress.yml:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: some-name
spec:
  rules:
  - http:
      paths:
      - path: /v1.0/
        pathType: Prefix
        backend:
          service:
            name: http-svc
            port:
              number: 80
  • Deploy ingress.yml: kubectl apply -f ingress.yml

Anything else we need to know:

As I can see from this response, dots are not allowed in path prefixes.

@Marat-Gumerov Marat-Gumerov added the kind/bug Categorizes issue or PR as related to a bug. label Aug 13, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 13, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@longwuyuan
Copy link
Contributor

dots in path not working is not a bug as per the data in this issue. lets wait for comments and data that proves that dots should work in path and then change the labels on this. thanks

/remove-kind bug

@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. and removed kind/bug Categorizes issue or PR as related to a bug. labels Aug 13, 2023
@sonbui00
Copy link
Contributor

@sonbui00
Copy link
Contributor

/assign

@shoce
Copy link

shoce commented Sep 4, 2023

Is it possible to make the ingress-nginx warning message more specific and detailed? When i met this issue in my setup it took me way to long to find the explanation, honestly i found the answer by searching for the warning message in ingress-nginx source code, which is quite too much i guess. Would be nice if you guys put some brief explanation or/and a link to a document in the warning message.

@longwuyuan
Copy link
Contributor

@shoce it was explained in the PR that implemented validations for that key and also in releasenotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants