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

Consul Api Gateway upgrade to chart v1.2.0 #2590

Closed
IwkVrr opened this issue Jul 19, 2023 · 2 comments · Fixed by #2597
Closed

Consul Api Gateway upgrade to chart v1.2.0 #2590

IwkVrr opened this issue Jul 19, 2023 · 2 comments · Fixed by #2597
Labels
theme/api-gateway Related to Consul API Gateway type/bug Something isn't working

Comments

@IwkVrr
Copy link

IwkVrr commented Jul 19, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

I have been using the api gateway feature with helm chart version 1.1.2 successfully and I'm trying to upgrade to use the latest version 1.2.0 but I'm encountering errors.

Reproduction Steps

I used the following values.yaml to setup the api gateway with helm chart v1.1.2:

apiGateway:
  enabled: true
  image: hashicorp/consul-api-gateway:0.5.4
  managedGatewayClass:
    copyAnnotations:
      service:
        annotations: |
          - external-dns.alpha.kubernetes.io/hostname
          - service.beta.kubernetes.io/aws-load-balancer-scheme
          - service.beta.kubernetes.io/aws-load-balancer-name
          - service.beta.kubernetes.io/aws-load-balancer-type
          - service.beta.kubernetes.io/aws-load-balancer-nlb-target-type
          - service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout
          - service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval
          - service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold
          - service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold
          - service.beta.kubernetes.io/aws-load-balancer-manage-backend-security-group-rules
          - service.beta.kubernetes.io/aws-load-balancer-proxy-protocol
          - service.beta.kubernetes.io/aws-load-balancer-backend-protocol
          - service.beta.kubernetes.io/aws-load-balancer-attributes
          - service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags

And modified it to the following for v1.2.0:

connectInject:
  enabled: true
  apiGateway:
    enabled: true
    managedGatewayClass:
      copyAnnotations:
        service:
          annotations: |
            - external-dns.alpha.kubernetes.io/hostname
            - service.beta.kubernetes.io/aws-load-balancer-scheme
            - service.beta.kubernetes.io/aws-load-balancer-name
            - service.beta.kubernetes.io/aws-load-balancer-type
            - service.beta.kubernetes.io/aws-load-balancer-nlb-target-type
            - service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout
            - service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval
            - service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold
            - service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold
            - service.beta.kubernetes.io/aws-load-balancer-manage-backend-security-group-rules
            - service.beta.kubernetes.io/aws-load-balancer-proxy-protocol
            - service.beta.kubernetes.io/aws-load-balancer-backend-protocol
            - service.beta.kubernetes.io/aws-load-balancer-attributes
            - service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags

Trying to install with the above throws the following error:
Error: INSTALLATION FAILED: YAML parse error on consul/templates/gateway-resources-job.yaml: error converting YAML to JSON: yaml: line 48: did not find expected key

The gateway-resources-job.yaml file doesn't seem to accept multiline string.

Expected behavior

Api gateway controller installed successfully

Environment details

If not already included, please provide the following:

  • consul-k8s version: 1.2.0

Additionally, please provide details regarding the Kubernetes Infrastructure, as shown below:

  • Kubernetes version: v1.27
  • Cloud Provider: EKS

Additional Context

Modified the values.yaml to use a one line string instead:

connectInject:
  enabled: true
  apiGateway:
    enabled: true
    managedGatewayClass:
      copyAnnotations:
        service:
          annotations: service.beta.kubernetes.io/aws-load-balancer-name

Which was successful to proceed to consul installation but the gateway-resource job errors with the following:

test-gateway-resources-4xpj2 error decoding service annotations: yaml: unmarshal errors:
test-gateway-resources-4xpj2   line 1: cannot unmarshal !!str `service...` into []string

Also tried without setting the managedGatewayClass with the following values.yaml:

connectInject:
  enabled: true
  apiGateway:
    enabled: true

I don't see any api gateway controller pod created and when trying to create a Gateway resource the status stays as below:

Status:
   Conditions:
     Last Transition Time:  1970-01-01T00:00:00Z
     Message:               Waiting for controller
     Reason:                NotReconciled
     Status:                Unknown
     Type:                  Accepted
@IwkVrr IwkVrr added the type/bug Something isn't working label Jul 19, 2023
@t-eckert
Copy link
Contributor

@IwkVrr, thank you for opening this issue. We are aware and already have a fix on its way. We apologize for the inconvenience.

@nathancoleman nathancoleman added the theme/api-gateway Related to Consul API Gateway label Jul 19, 2023
@nathancoleman
Copy link
Member

nathancoleman commented Jul 19, 2023

This issue impacts both

  • connectInject.apiGateway.managedGatewayClass.nodeSelector
  • connectInject.apiGateway.managedGatewayClass.copyAnnotations.service

I'll have a fix up shortly targeting the v1.2.1 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/api-gateway Related to Consul API Gateway type/bug Something isn't working
Projects
None yet
3 participants