Open volver-13 opened 1 month ago
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.
Its not creating the location block
% k create deploy httpd --image httpd:alpine --port 80
deployment.apps/httpd created
[~]
% k expose deploy httpd --port 80
service/httpd exposed
[~]
% k create ing httpd --class nginx --rule httpd.local/"*"=httpd:80 --annotation nginx.ingress.kubernetes.io/whitelist-source-range="1.1.1.1 2.2.2.2"
ingress.networking.k8s.io/httpd created
[~]
% k describe ing httpd
Name: httpd
Labels: <none>
Namespace: default
Address: 192.168.49.2
Ingress Class: nginx
Default backend: <default>
Rules:
Host Path Backends
---- ---- --------
httpd.local
/ httpd:80 (10.244.0.104:80)
Annotations: nginx.ingress.kubernetes.io/whitelist-source-range: 1.1.1.1 2.2.2.2
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Sync 1s (x2 over 6s) nginx-ingress-controller Scheduled for sync
$ kubectl -n ingress-nginx exec ingress-nginx-controller-6494fbd8fb-25r7f -- cat /etc/nginx/nginx.conf | grep -i 1.1.1.1
log message ;
E0912 17:31:03.025233 7 annotations.go:216] "error reading Ingress annotation" err="the annotation does not contain a valid IP address or network: invalid CIDR address: 1.1.1.1 2.2.2.2" name="Allowlist" ingress="default/httpd"
/assign
This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev
on Kubernetes Slack.
What happened:
Create the below bad-ingress with
nginx.ingress.kubernetes.io/whitelist-source-range
annotation set to invalid value1.1.1.1 2.2.2.2
. Ingress object gets created even though thewhitelist-source-range
value is incorrect (missing comma between IP addresses)The behavior is the same regardless of the
enableAnnotationValidations
value.Ingress controller fails with the following errors once the resource is created:
What you expected to happen:
Ideally, the validating webhook should reject the creation of this ingress object."
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
NGINX Ingress controller Release: v1.10.0 Build: 71f78d49f0a496c31d4c19f095469f3f23900f8a Repository: https://github.com/kubernetes/ingress-nginx nginx version: nginx/1.25.3
Kubernetes version (use
kubectl version
):Environment:
Cloud provider or hardware configuration: Azure AKS
How was the ingress-nginx-controller installed: ArgoCD deployment (helm chart 4.10.0)