gigi206 opened a new issue, #2033: URL: https://github.com/apache/apisix-ingress-controller/issues/2033
### Current Behavior [argocd](https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/) is configured with a TLS, so I configured Ingress with the annotation `k8s.apisix.apache.org/upstream-scheme: https`: ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: argo-cd-argocd-server namespace: argo-cd labels: app.kubernetes.io/component: server app.kubernetes.io/instance: argo-cd app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: argocd-server app.kubernetes.io/part-of: argocd app.kubernetes.io/version: v2.8.4 argocd.argoproj.io/instance: argo-cd helm.sh/chart: argo-cd-5.46.7 annotations: cert-manager.io/cluster-issuer: selfsigned-cluster-issuer k8s.apisix.apache.org/http-to-https: 'true' k8s.apisix.apache.org/upstream-scheme: https spec: ingressClassName: apisix tls: - hosts: - argocd.gigix secretName: argocd-cert-tls rules: - host: argocd.gigix http: paths: - path: / pathType: Prefix backend: service: name: argo-cd-argocd-server port: number: 443 ``` ```shell $ curl -IL http://argocd.gigix -k HTTP/1.1 301 Moved Permanently Date: Sat, 04 Nov 2023 20:01:12 GMT Content-Type: text/html Content-Length: 241 Connection: keep-alive Location: https://argocd.gigix/ Server: APISIX/3.6.0 HTTP/2 307 content-type: text/html; charset=utf-8 location: https://argocd.gigix/ date: Sat, 04 Nov 2023 20:01:12 GMT server: APISIX/3.6.0 HTTP/2 307 content-type: text/html; charset=utf-8 location: https://argocd.gigix/ date: Sat, 04 Nov 2023 20:01:12 GMT server: APISIX/3.6.0 ... ... ... curl: (47) Maximum (50) redirects followed ``` The upstream is created and we can see that `scheme` is set to **http**: ```json { "nodes": [ { "host": "10.42.0.246", "port": 8080, "weight": 100 } ], "type": "roundrobin", "hash_on": "vars", "scheme": "http", "pass_host": "pass", "desc": "Created by apisix-ingress-controller, DO NOT modify it manually", "labels": { "managed-by": "apisix-ingress-controller", "meta_backend": "argo-cd-argocd-server", "meta_namespace": "argo-cd", "meta_port": "443" } } ``` ### Expected Behavior ```json { "nodes": [ { "host": "10.42.0.246", "port": 8080, "weight": 100 } ], "type": "roundrobin", "hash_on": "vars", "scheme": "https", "pass_host": "pass", "desc": "Created by apisix-ingress-controller, DO NOT modify it manually", "labels": { "managed-by": "apisix-ingress-controller", "meta_backend": "argo-cd-argocd-server", "meta_namespace": "argo-cd", "meta_port": "443" } } ``` ### Error Logs _No response_ ### Steps to Reproduce Configure a Kubernetes Ingress with the annotation `k8s.apisix.apache.org/upstream-scheme: https` ### Environment ```shell $ hostnamectl Static hostname: k8s-m1 Icon name: computer-vm Chassis: vm 🖴 Machine ID: 6f17adb8b3e74f8485e479e2b323d04c Boot ID: de843eb19e50466e884be50daa296771 Virtualization: kvm Operating System: Debian GNU/Linux 12 (bookworm) Kernel: Linux 6.1.0-13-amd64 Architecture: x86-64 Hardware Vendor: QEMU Hardware Model: Standard PC _i440FX + PIIX, 1996_ Firmware Version: 1.16.0-debian-1.16.0-5 ``` ```shell $ kubectl version --short Flag --short has been deprecated, and will be removed in the future. The --short output will become the default. Client Version: v1.25.13+rke2r1 Kustomize Version: v4.5.7 Server Version: v1.25.13+rke2r1 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
