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

[Issue]: AZD Deployment Fails on a valid ingress that has endpoints assigned #2390

Closed
1 task
carmodyquinnms opened this issue Jun 10, 2023 · 2 comments · Fixed by #2405
Closed
1 task

[Issue]: AZD Deployment Fails on a valid ingress that has endpoints assigned #2390

carmodyquinnms opened this issue Jun 10, 2023 · 2 comments · Fixed by #2405
Assignees
Labels
aks Azure Kubernetes Service customer-reported identify a customer issue needs-triage For new issues question

Comments

@carmodyquinnms
Copy link

Output from azd version
azd version 1.0.1 (commit e0cd1ac)

Describe the bug
azd deployment keeps failing on an ingress deployment that works fine if applied manually and is perfectly healthy. Here is the error:

  |===    | Deploying service web (Fetching endpoints for AKS service)2023/06/10 07:33:55 command_runner.go:133: Run exec: 'kubectl get ing -n ratingsapp -o json' , exit code: 0
-------------------------------------stdout-------------------------------------------
{
    "apiVersion": "v1",
    "items": [
        {
            "apiVersion": "networking.k8s.io/v1",
            "kind": "Ingress",
            "metadata": {
                "annotations": {
                    "acme.cert-manager.io/http01-edit-in-place": "true",
                    "appgw.ingress.kubernetes.io/ssl-redirect": "true",
                    "cert-manager.io/acme-challenge-type": "http01",
                    "cert-manager.io/issuer": "letsencrypt-staging",
                    "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"networking.k8s.io/v1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"acme.cert-manager.io/http01-edit-in-place\":\"true\",\"appgw.ingress.kubernetes.io/ssl-redirect\":\"true\",\"cert-manager.io/acme-challenge-type\":\"http01\",\"cert-manager.io/issuer\":\"letsencrypt-staging\",\"kubernetes.io/ingress.class\":\"azure/application-gateway\"},\"name\":\"ratings-web-https\",\"namespace\":\"ratingsapp\"},\"spec\":{\"rules\":[{\"host\":\"cqtst15.centralus.cloudapp.azure.com\",\"http\":{\"paths\":[{\"backend\":{\"service\":{\"name\":\"ratings-web\",\"port\":{\"number\":80}}},\"path\":\"/\",\"pathType\":\"Prefix\"}]}}],\"tls\":[{\"hosts\":[\"cqtst15.centralus.cloudapp.azure.com\"],\"secretName\":\"aks-tls-akv\"}]}}\n",
                    "kubernetes.io/ingress.class": "azure/application-gateway"
                },
                "creationTimestamp": "2023-06-10T12:33:44Z",
                "generation": 1,
                "name": "ratings-web-https",
                "namespace": "ratingsapp",
                "resourceVersion": "344181",
                "uid": "3dc21e51-f556-46f9-bd2f-81bcd912a838"
            },
            "spec": {
                "rules": [
                    {
                        "host": "cqtst15.centralus.cloudapp.azure.com",
                        "http": {
                            "paths": [
                                {
                                    "backend": {
                                        "service": {
                                            "name": "ratings-web",
                                            "port": {
                                                "number": 80
                                            }
                                        }
                                    },
                                    "path": "/",
                                    "pathType": "Prefix"
                                }
                            ]
                        }
                    }
                ],
                "tls": [
                    {
                        "hosts": [
                            "cqtst15.centralus.cloudapp.azure.com"
                        ],
                        "secretName": "aks-tls-akv"
                    }
                ]
            },
            "status": {
                "loadBalancer": {
                    "ingress": [
                        {
                            "ip": "13.67.228.43"
                        }
                    ]
                }
            }
        }
    ],
    "kind": "List",
    "metadata": {
        "resourceVersion": "",
        "selfLink": ""
    }
}
  (x) Failed: Deploying service web

ERROR: failed deploying service 'web': failing invoking action 'deploy', failed retrieving ingress endpoints, failed waiting for resource, failed waiting for resource, failed unmarshalling resources JSON, json: cannot unmarshal array into Go struct field IngressSpec.items.spec.Tls of type kubectl.IngressTls

To Reproduce
Replace the variables in the attached ingress file and attempt to use

Expected behavior
This should not fail

5-https-ratings-web-ingress.yaml.txt

@rajeshkamal5050
Copy link

rajeshkamal5050 commented Jun 13, 2023

@wbreza can you take a look? Please adjust milestone based on findings.

@wbreza
Copy link
Contributor

wbreza commented Jun 13, 2023

@carmodyquinnms Can you please verify this fix from this PR build addresses this issue.
#2405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aks Azure Kubernetes Service customer-reported identify a customer issue needs-triage For new issues question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants