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 /wlmdb(.*) cannot be used with pathType Prefix #10281

Closed
salfand1 opened this issue Aug 7, 2023 · 8 comments · Fixed by #10330
Closed

Warning: path /wlmdb(.*) cannot be used with pathType Prefix #10281

salfand1 opened this issue Aug 7, 2023 · 8 comments · Fixed by #10330
Assignees
Labels
kind/documentation Categorizes issue or PR as related to documentation. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@salfand1
Copy link

salfand1 commented Aug 7, 2023

nginx ingress rule path as follows:
host: {{ .Values.global.bluexpDomain }}
http:
paths:
- path: /wlmdb(.*)
pathType: Prefix

I got the below warning:
Warning: path /wlmdb(.*) cannot be used with pathType Prefix

even though I added the below annotation:
nginx.ingress.kubernetes.io/use-regex: "true"

@salfand1 salfand1 added the kind/bug Categorizes issue or PR as related to a bug. label Aug 7, 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 7, 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.

@sonbui00
Copy link
Contributor

@salfand1 I think this warning is a expected behaviour.

	// validPathType enforces alphanumeric, -, _ and / characters.
	// The field (?i) turns this regex case insensitive
	// The remaining regex says that the string must start with a "/" (^/)
	// the group [[:alnum:]\_\-\/]* says that any amount of characters (A-Za-z0-9), _, - and /
	// are accepted until the end of the line
	// Nothing else is accepted.
// GetWarnings returns a list of warnings an Ingress gets when being created.
// The warnings are going to be used in an admission webhook, and they represent
// a list of messages that users need to be aware (like deprecation notices)
// when creating a new ingress object

For you case, just use simple path: /wlmdb

@sonbui00
Copy link
Contributor

@salfand1 come from this PR #9967
We need to use pathType ImplementationSpecific to remove warning and error in the future.
The doccument is not up to date with this. I'll check for the document

@rikatz Do you think we need to update the document for this? I see many guide use pathType prefix with special characters for regex

@tao12345666333
Copy link
Member

@sonbui00 sure, we need to update the documents.

/kind document
/remove-kind bug

@k8s-ci-robot
Copy link
Contributor

@tao12345666333: The label(s) kind/document cannot be applied, because the repository doesn't have them.

In response to this:

@sonbui00 sure, we need to update the documents.

/kind document
/remove-kind bug

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.

@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 12, 2023
@tao12345666333 tao12345666333 added the kind/documentation Categorizes issue or PR as related to documentation. label Aug 12, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label Aug 12, 2023
@salfand1
Copy link
Author

So can I use ImplementationSpecific instead of Prefix?

@sonbui00
Copy link
Contributor

@salfand1 for special character, you should use ImplementationSpecific . You can check more on FAQ here https://kubernetes.github.io/ingress-nginx/faq/#validation-of-path

@sonbui00
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation. 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.

4 participants