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

autocreate the elb with addon #5646

Open
thisurawijesekera opened this issue Oct 2, 2024 · 0 comments
Open

autocreate the elb with addon #5646

thisurawijesekera opened this issue Oct 2, 2024 · 0 comments

Comments

@thisurawijesekera
Copy link

thisurawijesekera commented Oct 2, 2024

When I am trying to autocreate the elb by nginx cce addon I am getting below error.

╷ │ Error: error creating CCE add-on: Bad request with: [POST [https://3d019829-8066-11ef-b874-0255ac10003d.cce.***.myhuaweicloud.com/api/v3/addons],](https://3d019829-8066-11ef-b874-0255ac10003d.cce.%2A%2A%2A.myhuaweicloud.com/api/v3/addons],) request_id: 76c298b1a376a44e95bda0e3f930cee4, error message: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","code":400,"errorCode":"CCE.03400001","errorMessage":"Invalid request.","error":{"message":"kubernetes.io/elb.id and loadBalancerIP cannot both be empty","code":"SVCSTG.CCE-ADDONMGR.4000002"},"message":"kubernetes.io/elb.id and loadBalancerIP cannot both be empty","reason":"BadRequest"}

How can I have the Here is my terraform code.

+ resource "huaweicloud_cce_addon" "nginx_ingress" {
      + cluster_id    = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      + description   = (known after apply)
      + id            = (known after apply)
      + region        = "***"
      + status        = (known after apply)
      + template_name = "nginx-ingress"
      + version       = "2.6.5"

      + values {
          + basic_json  = jsonencode({})
          + custom_json = jsonencode(
                {
                  + config                = {
                      + keep-alive-requests = "100"
                    }
                  + defaultBackend        = {
                      + enabled = true
                    }
                  + defaultBackendService = "backend-service"
                  + headers               = {}
                  + service               = {
                      + annotations = {
                          + "kubernetes.io/elb.autocreate"   = jsonencode(
                                {
                                  + available_zone       = [
                                      + "***a",
                                    ]
                                  + bandwidth_chargemode = "traffic"
                                  + bandwidth_name       = "bandwidth-cce-3d0[198](https://github.com/xxxxx/terraform-hauwei/actions/runs/11141825370/job/30963542038#step:17:199)29-8066-11ef-b874-0255ac10003d"
                                  + bandwidth_sharetype  = "PER"
                                  + bandwidth_size       = 5
                                  + eip_type             = "5_bgp"
                                  + l4_flavor_name       = "L4_flavor.elb.s1.small"
                                  + name                 = "dev01-cluster-nlb-public"
                                  + type                 = "public"
                                }
                            )
                          + "kubernetes.io/elb.pass-through" = "true"
                        }
                    }
                  + tcp                   = {}
                  + udp                   = {}
                }
            )
          + flavor_json = jsonencode(
                {
                  + description = "An nginx Ingress controller that uses ConfigMap to store the nginx configuration."
                  + name        = "nginx-ingress"
                  + replicas    = 1
                  + resources   = [
                      + {
                          + limitsCpu   = "1000m"
                          + limitsMem   = "1000Mi"
                          + name        = "nginx-ingress"
                          + requestsCpu = "[200](https://github.com/xxxx/terraform-hauwei/actions/runs/11141825370/job/30963542038#step:17:201)m"
                          + requestsMem = "200Mi"
                        },
                    ]
                }
            )
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant