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

fix(k8s): fix VIPs configmap entries with invalid keys for ExternalName services #8168

Merged
merged 12 commits into from Oct 31, 2023

Conversation

bartsmykla
Copy link
Contributor

Services with the ExternalName type do not allow us to get an IP address, so the generated VIPs config map contains entries with invalid keys, such as 1:. This was hard to debug because we were getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with appropriate log when it'll happen.

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues
    • No relevant issue
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS
    • It won't
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Don't forget ci/ labels to run additional/fewer tests
    • Added unit test
  • Do you need to update UPGRADE.md?
    • There is no need
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label)
    • It does

…me services

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

Could you help me understand how this fix relates to invalid VIPs?

service_controller.go is used to annotate services with an ngxing/kong annotation to use ClusterIP instead of PodIP.

Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla enabled auto-merge (squash) October 30, 2023 10:52
Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla merged commit 23f9001 into kumahq:master Oct 31, 2023
5 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2023

backporting to release-2.1 with action

backporting to release-2.3 with action
backporting to release-2.4 with action

kumahq bot pushed a commit that referenced this pull request Oct 31, 2023
…me services (#8168)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
kumahq bot pushed a commit that referenced this pull request Oct 31, 2023
…me services (#8168)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
kumahq bot pushed a commit that referenced this pull request Oct 31, 2023
…me services (#8168)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
kumahq bot pushed a commit that referenced this pull request Oct 31, 2023
…me services (#8168)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
kumahq bot pushed a commit that referenced this pull request Oct 31, 2023
…me services (#8168)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Oct 31, 2023
…me services (backport of #8168) (#8198)

fix(k8s): fix VIPs configmap entries with invalid keys for ExternalName services (#8168)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
Co-authored-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Oct 31, 2023
…me services (backport of #8168) (#8196)

fix(k8s): fix VIPs configmap entries with invalid keys for ExternalName services (#8168)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
Co-authored-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Oct 31, 2023
…me services (backport of #8168) (#8195)

fix(k8s): fix VIPs configmap entries with invalid keys for ExternalName services (#8168)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
Co-authored-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla deleted the fix/ignore-externalname-services branch October 31, 2023 07:01
bartsmykla pushed a commit that referenced this pull request Oct 31, 2023
…me services (backport of #8168) (#8194)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla pushed a commit that referenced this pull request Oct 31, 2023
…me services (backport of #8168) (#8197)

Services with the `ExternalName` type do not allow us to get an
IP address, so the generated VIPs config map contains entries with
invalid keys, such as `1:`. This was hard to debug because we were
getting an EOF error during unmarshalling of the VIPs config map.

This commit fixes the issue by ignoring services of that type with
appropriate log when it'll happen.

Signed-off-by: Bart Smykla <bartek@smykla.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants