server and configuration-snippet invalid word { #7969
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
NGINX Ingress controller
Release: v1.0.5
Build: 7ce96cb
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.19.9
E1124 14:08:02.940741 18508 v3.go:79] EOF
Kubernetes version (use
kubectl version
):Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.5", GitCommit:"aea7bbadd2fc0cd689de94a54e5b7b758869d691", GitTreeState:"clean", BuildDate:"2021-09-15T21:10:45Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"darwin/arm64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:35:25Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}
Environment:
Bare metal:
OS (e.g. from /etc/os-release):
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Kernel (e.g.
uname -a
): Linux node3.ams01 5.4.0-86-generic Fix gofmt #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxInstall tools: Ansible
Please mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.
Basic cluster related info:
kubectl version
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:35:25Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}
kubectl get nodes -o wide
master3.ams01 Ready control-plane,master 20d v1.22.3 10.32.54.150 Ubuntu 20.04.3 LTS 5.4.0-89-generic docker://20.10.9
node3.ams01 Ready 20d v1.22.3 10.32.54.146 Ubuntu 20.04.3 LTS 5.4.0-86-generic docker://20.10.9
node3.ams02 Ready 20d v1.22.3 10.32.54.130 Ubuntu 20.04.3 LTS 5.4.0-89-generic docker://20.10.9
node4.ams01 Ready 20d v1.22.3 10.32.54.147 Ubuntu 20.04.3 LTS 5.4.0-86-generic docker://20.10.9
node4.ams02 Ready 20d v1.22.3 10.32.54.131 Ubuntu 20.04.3 LTS 5.4.0-86-generic docker://20.10.9
storage01.ams01 Ready control-plane,master 20d v1.22.3 10.32.54.145 Ubuntu 20.04.3 LTS 5.4.0-86-generic docker://20.10.9
storage01.ams02 Ready control-plane,master 20d v1.22.3 10.32.54.129 Ubuntu 20.04.3 LTS 5.4.0-86-generic docker://20.10.9
How was the ingress-nginx-controller installed: Bare metal install
Current State of the controller:
kubectl describe ingressclasses
Labels: app.kubernetes.io/component=controller
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=ingress-nginx
app.kubernetes.io/version=1.0.0
helm.sh/chart=ingress-nginx-4.0.1
Annotations:
Controller: k8s.io/ingress-nginx
Events:
Name: nginx-ams01
Labels: app.kubernetes.io/component=controller
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=ingress-nginx
app.kubernetes.io/version=1.0.5
helm.sh/chart=ingress-nginx-4.0.7
Annotations:
Controller: k8s.io/ingress-nginx-ams01
Events:
Name: nginx-ams02
Labels: app.kubernetes.io/component=controller
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=ingress-nginx
app.kubernetes.io/version=1.0.5
helm.sh/chart=ingress-nginx-4.0.7
Annotations:
Controller: k8s.io/ingress-nginx-ams02
Events: `
kubectl -n <ingresscontrollernamespace> get all -A -o wide
pod/ingress-nginx-admission-create--1-sbpz2 0/1 Completed 0 4d23h 10.233.69.141 node3.ams02
pod/ingress-nginx-admission-patch--1-tv8fx 0/1 Completed 0 4d23h 10.233.69.142 node3.ams02
pod/ingress-nginx-controller-ams01-76ccc97d87-2qqcs 1/1 Running 0 4d23h 10.233.104.208 node3.ams01
pod/ingress-nginx-controller-ams01-76ccc97d87-kfcfv 1/1 Running 0 4d23h 10.233.111.198 node4.ams01
pod/ingress-nginx-controller-ams02-648fc77d46-b8bfq 1/1 Running 0 4d23h 10.233.69.143 node3.ams02
pod/ingress-nginx-controller-ams02-648fc77d46-gqrjs 1/1 Running 0 4d23h 10.233.98.124 node4.ams02
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/ingress-nginx-controller NodePort 10.233.60.222 80:30462/TCP,443:30848/TCP 4d23h app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx
service/ingress-nginx-controller-admission ClusterIP 10.233.28.19 443/TCP 4d23h app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx
service/nginx-lb-ams01 LoadBalancer 10.233.54.154 82.150.152.170 80:30734/TCP,443:32586/TCP 4d23h app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx,topology.kubernetes.io/zone=ams01
service/nginx-lb-ams02 LoadBalancer 10.233.15.13 178.162.182.110 80:32025/TCP,443:30367/TCP 4d23h app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx,topology.kubernetes.io/zone=ams02
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
deployment.apps/ingress-nginx-controller-ams01 2/2 2 2 4d23h controller k8s.gcr.io/ingress-nginx/controller:v1.0.5@sha256:55a1fcda5b7657c372515fe402c3e39ad93aa59f6e4378e82acd99912fe6028d app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx
deployment.apps/ingress-nginx-controller-ams02 2/2 2 2 4d23h controller k8s.gcr.io/ingress-nginx/controller:v1.0.5@sha256:55a1fcda5b7657c372515fe402c3e39ad93aa59f6e4378e82acd99912fe6028d app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx
NAME DESIRED CURRENT READY AGE CONTAINERS IMAGES SELECTOR
replicaset.apps/ingress-nginx-controller-ams01-76ccc97d87 2 2 2 4d23h controller k8s.gcr.io/ingress-nginx/controller:v1.0.5@sha256:55a1fcda5b7657c372515fe402c3e39ad93aa59f6e4378e82acd99912fe6028d app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx,pod-template-hash=76ccc97d87
replicaset.apps/ingress-nginx-controller-ams02-648fc77d46 2 2 2 4d23h controller k8s.gcr.io/ingress-nginx/controller:v1.0.5@sha256:55a1fcda5b7657c372515fe402c3e39ad93aa59f6e4378e82acd99912fe6028d app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx,pod-template-hash=648fc77d46
NAME COMPLETIONS DURATION AGE CONTAINERS IMAGES SELECTOR
job.batch/ingress-nginx-admission-create 1/1 2s 4d23h create k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660 controller-uid=18cb1b3b-5c51-4fbc-825f-e8fb33c1d9d2
job.batch/ingress-nginx-admission-patch 1/1 3s 4d23h patch k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660 controller-uid=aa8f8f50-2f56-4dae-b5c9-773f5747c7fd`
What happened:
If we add a "{" char to our snippet it fails. For example a exact copy paste from https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-snippet
What you expected to happen:
I think it sould not see "{" as an invalid word
How to reproduce it:
Run
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/baremetal/deploy.yaml
on a bare metal cluster.Apply the following ingress:
`apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-vdo-x
namespace: vdo-x
annotations:
cert-manager.io/cluster-issuer: letREDACTED01
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($request_uri ~* .(js|css|gif|jpe?g|png)) {
expires 1M;
add_header Cache-Control "public";
}
spec:
ingressClassName: nginx-ams01
tls:
- hosts:
- cREDACTEDm
secretName: vdox-tls-ams01
rules:
http:
paths:
pathType: Prefix
backend:
service:
name: vdo-x
port:
number: 80`
--->
/kind bug
The text was updated successfully, but these errors were encountered: