Open mtslzr opened 8 months 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.
/assign @esigo
we can't set the context without a request. It's meaningless to have the variable set.you'd need to find a workaround. Maybe sth similar to https://github.com/kubernetes/ingress-nginx/issues/9811#issuecomment-1586028266.
/remove-kind bug /kind support
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:
While doing some Disaster Recovery testing, we re-deployed
ingress-nginx
with the followinghttp-snippet
to log trace IDs (pulled from https://github.com/opentracing-contrib/nginx-opentracing/issues/33):When it spins up, until the first Ingress is created, the
opentelemetry_
variables are all unknown, resulting in the following error:What you expected to happen:
I would prefer that setting the following makes the
opentelemetry_
variable available from the start, instead of waiting for the first Ingress:Alternatively, I've tried figuring out a workaround to just ignore the variable if unavailable using
map
and could not find anything workable, and know that's likely outside the scope of this issue.NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Kubernetes version (use
kubectl version
):(This is from testing locally with minikube)
Environment:
uname -a
): N/Ahelm template
and then applied locally or pushed to a control repo and consumed by ArgoPlease mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.
kubectl version
kubectl get nodes -o wide
Rendered using
helm template
either locally for testing or via Gitlab CI, and then pushed to a controller repo and consumed by Argo (or applied locally to minikube for testing).kubectl describe ingressclasses
kubectl -n <ingresscontrollernamespace> get all -A -o wide
kubectl -n <ingresscontrollernamespace> describe po <ingresscontrollerpodname>
Warning RELOAD 19m nginx-ingress-controller Error reloading NGINX:
Error: exit status 1 2024/02/29 15:55:14 [emerg] 25#25: unknown "opentelemetry_context_traceparent" variable nginx: [emerg] unknown "opentelemetry_context_traceparent" variable nginx: configuration file /tmp/nginx/nginx-cfg923001734 test failed
Warning RELOAD 19m nginx-ingress-controller Error reloading NGINX:
Error: exit status 1 2024/02/29 15:55:17 [emerg] 26#26: unknown "opentelemetry_context_traceparent" variable nginx: [emerg] unknown "opentelemetry_context_traceparent" variable nginx: configuration file /tmp/nginx/nginx-cfg966897373 test failed
Name: nginx-ingress-ingress-nginx-controller Namespace: ingress Labels: app.kubernetes.io/component=controller app.kubernetes.io/instance=nginx-ingress app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=ingress-nginx app.kubernetes.io/part-of=ingress-nginx app.kubernetes.io/version=1.9.6 helm.sh/chart=ingress-nginx-4.9.1 Annotations: service.beta.kubernetes.io/azure-load-balancer-resource-group: kubernetes-development service.beta.kubernetes.io/azure-pip-name: nginx-ingress-pip Selector: app.kubernetes.io/component=controller,app.kubernetes.io/instance=nginx-ingress,app.kubernetes.io/name=ingress-nginx Type: LoadBalancer IP Family Policy: SingleStack IP Families: IPv4 IP: 10.108.108.1 IPs: 10.108.108.1 Port: http 80/TCP TargetPort: http/TCP NodePort: http 30355/TCP Endpoints: Port: https 443/TCP TargetPort: https/TCP NodePort: https 30322/TCP Endpoints: Session Affinity: None External Traffic Policy: Local HealthCheck NodePort: 32131 Events:
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES pod/nginx-ingress-ingress-nginx-controller-4sdxg 0/1 Running 9 (80s ago) 21m 10.244.0.17 minikube
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR service/nginx-ingress-ingress-nginx-controller LoadBalancer 10.108.108.1 80:30355/TCP,443:30322/TCP 8d app.kubernetes.io/component=controller,app.kubernetes.io/instance=nginx-ingress,app.kubernetes.io/name=ingress-nginx
service/nginx-ingress-ingress-nginx-controller-admission ClusterIP 10.100.100.183 443/TCP 8d app.kubernetes.io/component=controller,app.kubernetes.io/instance=nginx-ingress,app.kubernetes.io/name=ingress-nginx
service/nginx-ingress-ingress-nginx-controller-metrics ClusterIP 10.103.113.179 10254/TCP 8d app.kubernetes.io/component=controller,app.kubernetes.io/instance=nginx-ingress,app.kubernetes.io/name=ingress-nginx
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE CONTAINERS IMAGES SELECTOR daemonset.apps/nginx-ingress-ingress-nginx-controller 1 1 0 1 0 kubernetes.io/os=linux 8d controller registry.k8s.io/ingress-nginx/controller:v1.9.6@sha256:1405cc613bd95b2c6edd8b2a152510ae91c7e62aea4698500d23b2145960ab9c app.kubernetes.io/component=controller,app.kubernetes.io/instance=nginx-ingress,app.kubernetes.io/name=ingress-nginx
apiVersion: v2 name: my-nginx-ingress description: Nginx Ingress type: application dependencies:
And set the following in
values.yaml
:Render it went
helm template
and thenkube apply -f
. When the pod comes up,kubectl logs
to see the above errors.Anything else we need to know:
Not sure if the request is nonsensical, so open to a work-around to just... ignore the issue until an Ingress is created, but it's been a bit of an annoyance during testing.