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

elbv2: LBTargetGroup not created #276

Closed
fcastarede opened this issue Dec 14, 2022 · 3 comments
Closed

elbv2: LBTargetGroup not created #276

fcastarede opened this issue Dec 14, 2022 · 3 comments

Comments

@fcastarede
Copy link

fcastarede commented Dec 14, 2022

What happened?

When healthCheck is specified, the resource was not created with the following message:

cannot run refresh: refresh failed: Too many health_check blocks: No more than 1 "health_check" blocks are allowed

When healthCheck is not specified, the resource was created but there is still a warning:

cannot run plan: plan failed: arn:aws:elasticloadbalancing:us-east-1:474756349353:targetgroup/client1-k8s-cluster-ingress/db514af6374ff608: health_check.healthy_threshold 5 and health_check.unhealthy_threshold 2 must be the same for target_groups with TCP protocol:

... Despite the doc indicates 3 as default value for both healthyThreshold and unhealthyThreshold (https://marketplace.upbound.io/providers/upbound/provider-aws/v0.22.0/resources/elbv2.aws.upbound.io/LBTargetGroup/v1beta1#doc:spec-forProvider-healthCheck-healthyThreshold, https://marketplace.upbound.io/providers/upbound/provider-aws/v0.22.0/resources/elbv2.aws.upbound.io/LBTargetGroup/v1beta1#doc:spec-forProvider-healthCheck-unhealthyThreshold)

This warning blocks the deletion of this resource.

How can we reproduce it?

- name: ingress-lb-targetgroup
    base:
      apiVersion: elbv2.aws.upbound.io/v1beta1
      kind: LBTargetGroup
      spec:
        forProvider:
          healthCheck:
            - healthyThreshold: 3
            - unhealthyThreshold: 3
          port: 32080
          protocol: TCP
          region: us-east-1
    patches:
    - type: PatchSet
      patchSetName: providerconfigref
    - fromFieldPath: spec.id
      toFieldPath: metadata.name
      transforms:
      - type: string
        string:
          fmt: '%s-ingress-lb-targetgroup'
    - fromFieldPath: spec.id
      toFieldPath: spec.forProvider.name
      transforms:
      - type: string
        string:
          fmt: '%s-ingress'
    - fromFieldPath: status.VPCID
      toFieldPath: spec.forProvider.vpcId
      policy:
        fromFieldPath: Required

What environment did it happen in?

  • Universal Crossplane Version: 1.10.1-up.1
  • Provider Version: v0.22.0
@fcastarede fcastarede added the bug Something isn't working label Dec 14, 2022
@turkenf
Copy link
Collaborator

turkenf commented Apr 5, 2023

Hi, @fcastarede thanks for raising this issue. I could not reproduce this issue.

cannot run refresh: refresh failed: Too many health_check blocks: No more than 1 "health_check" blocks are allowed

To fix the above error, you should use the healthCheck arguments as follows.

    healthCheck:
    - healthyThreshold: 3
      unhealthyThreshold: 3

I did not encounter any errors when I created the example below.

apiVersion: elbv2.aws.upbound.io/v1beta1
kind: LBTargetGroup
metadata:
  labels:
    testing.upbound.io/example-name: elbv2
  name: test
spec:
  forProvider:
    name: example-lb-tg
    port: 32080
    protocol: TCP
    region: us-east-1
    healthCheck:
    - healthyThreshold: 3
      unhealthyThreshold: 3
    vpcIdSelector:
      matchLabels:
        testing.upbound.io/example-name: elbv2
---
apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPC
metadata:
  labels:
    testing.upbound.io/example-name: elbv2
  name: sample-vpc
spec:
  forProvider:
    region: us-east-1
    cidrBlock: 172.16.0.0/16
    tags:
      Name: DemoVpc

Copy link

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Aug 31, 2024
Copy link

This issue is being closed since there has been no activity for 14 days since marking it as stale. If you still need help, feel free to comment or reopen the issue!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants