Skip to content

Limited character for name of targetgroup in GatewayClassBlueprint#221

Merged
Kent Vilhelmsen (kemv) merged 3 commits intomainfrom
feature/targetgroup-char-limit
Jul 26, 2023
Merged

Limited character for name of targetgroup in GatewayClassBlueprint#221
Kent Vilhelmsen (kemv) merged 3 commits intomainfrom
feature/targetgroup-char-limit

Conversation

@kemv
Copy link
Contributor

@kemv Kent Vilhelmsen (kemv) commented Jul 24, 2023

Description

TargetGroups in AWS have a name character limit of 32. The current template generates a name that is gw-<NAMESPACE>-<NAME>. This doesn't leave a lot of room in general, and if one deploys the same config to several clusters, then there is very little space for cluster identifiers, eg cluster-1.

To combat these issues, and issues with accidentally creating TargetGroups with too long names, this PR to the blueprint will cut off name if they are too long, and furthermore suffix names with the first 6 characters of a SHA1, which is generated over the entire name. This should ensure that resources should have different names if they contain their cluster identifier.

Checklist

  • [N/A] Unit tests updated
  • End user documentation updated
  • [N/A] If changes apply to Helm chart, a note have been made in the 'UNRELEASED' section of the charts CHANGELOG.md

@kemv Kent Vilhelmsen (kemv) marked this pull request as ready for review July 24, 2023 08:45
@kemv Kent Vilhelmsen (kemv) changed the title Limited character binding for targetgroup Limited character for name of targetgroup in GatewayClassBlueprint Jul 24, 2023
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kemv Kent Vilhelmsen (kemv) merged commit 83c6f62 into main Jul 26, 2023
@kemv Kent Vilhelmsen (kemv) deleted the feature/targetgroup-char-limit branch July 26, 2023 11:25
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

Successfully merging this pull request may close these issues.

2 participants