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

[Observability Onboarding] Kubernetes EA flow fails with invalid refspec #199754

Closed
flash1293 opened this issue Nov 12, 2024 · 4 comments · Fixed by #199758
Closed

[Observability Onboarding] Kubernetes EA flow fails with invalid refspec #199754

flash1293 opened this issue Nov 12, 2024 · 4 comments · Fixed by #199758
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature: Observability Onboarding Team:obs-ux-logs Observability Logs User Experience Team

Comments

@flash1293
Copy link
Contributor

flash1293 commented Nov 12, 2024

The Kubernetes EA flow uses kustomize and loads its template from github, using the agent version number as the tag. However, with the "Independent Agent Release", this doesn't work anymore because a build number is added:

kubectl kustomize https://github.com/elastic/elastic-agent/deploy/kubernetes/elastic-agent-kustomize/default/elastic-agent-standalone\?ref\=v8.15.3+build202411051926

This tries to resolve the ref v8.15.3 build202411051926 which doesn't exist

Image

@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience Team:obs-ux-logs Observability Logs User Experience Team Feature: Observability Onboarding labels Nov 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-onboarding-team (Feature: Observability Onboarding)

@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

@flash1293 flash1293 self-assigned this Nov 12, 2024
@flash1293
Copy link
Contributor Author

Looked into this a little further and it's not possible to create the tag in the repo because it contains a space (as the + is URL-encoded as it's part of the Github URL), and git doesn't allow spaces in tag names.

The only ways to fix are:

  • Change the Kibana code so it strips away the build number
  • Change the configuration of the used elastic agent version to not specify the build number, which would essentially disable Independent Agent Release

@cmacknz
Copy link
Member

cmacknz commented Nov 12, 2024

Docker doesn't actually support the + build metadata in the semver standard.

The actual container image for an independent release will be 8.15.3.build202411051926 with the +replaced by.` because of distribution/distribution#1201. https://hub.docker.com/layers/elastic/elastic-agent/8.15.3.build202411051926/images/sha256-df5caa29d694745945232bb571119965c222cd5ef6e50d2cfa9cd6aedfce65f4?context=explore

So this is slightly more complicated than just passing the + through, it needs to be transformed to ..

The current independent agent release is a test that contains no changes to anything that runs on Kubernetes, so if there is a way to just ignore this release that would work here.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 14, 2024
## Summary

Closes elastic#199754 by introducing
more fine-grained version getters to get the base version (to resolve to
the git tag in the repo), the actual version which might include the IAR
suffix and the docker version which replaces + with .

For testing, EA host and kubernetes as well as OTel host should be
tested. See here:
elastic#199758 (comment)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 7ef9773)
kibanamachine added a commit that referenced this issue Nov 14, 2024
…0191)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Observability Onboarding] Fix kustomize command
(#199758)](#199758)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Joe
Reuter","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-14T14:09:24Z","message":"[Observability
Onboarding] Fix kustomize command (#199758)\n\n## Summary\r\n\r\nCloses
#199754 by introducing\r\nmore
fine-grained version getters to get the base version (to resolve
to\r\nthe git tag in the repo), the actual version which might include
the IAR\r\nsuffix and the docker version which replaces + with
.\r\n\r\nFor testing, EA host and kubernetes as well as OTel host should
be\r\ntested. See
here:\r\nhttps://github.com//pull/199758#issuecomment-2473753175\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"7ef9773d626c21556361d85578b039773e33ffb5","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","Feature:
Observability Onboarding","v8.17.0","v8.16.1"],"title":"[Observability
Onboarding] Fix kustomize
command","number":199758,"url":"https://github.com/elastic/kibana/pull/199758","mergeCommit":{"message":"[Observability
Onboarding] Fix kustomize command (#199758)\n\n## Summary\r\n\r\nCloses
#199754 by introducing\r\nmore
fine-grained version getters to get the base version (to resolve
to\r\nthe git tag in the repo), the actual version which might include
the IAR\r\nsuffix and the docker version which replaces + with
.\r\n\r\nFor testing, EA host and kubernetes as well as OTel host should
be\r\ntested. See
here:\r\nhttps://github.com//pull/199758#issuecomment-2473753175\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"7ef9773d626c21556361d85578b039773e33ffb5"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199758","number":199758,"mergeCommit":{"message":"[Observability
Onboarding] Fix kustomize command (#199758)\n\n## Summary\r\n\r\nCloses
#199754 by introducing\r\nmore
fine-grained version getters to get the base version (to resolve
to\r\nthe git tag in the repo), the actual version which might include
the IAR\r\nsuffix and the docker version which replaces + with
.\r\n\r\nFor testing, EA host and kubernetes as well as OTel host should
be\r\ntested. See
here:\r\nhttps://github.com//pull/199758#issuecomment-2473753175\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"7ef9773d626c21556361d85578b039773e33ffb5"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: Joe Reuter <[email protected]>
wayneseymour pushed a commit to wayneseymour/kibana that referenced this issue Nov 18, 2024
## Summary

Closes elastic#199754 by introducing
more fine-grained version getters to get the base version (to resolve to
the git tag in the repo), the actual version which might include the IAR
suffix and the docker version which replaces + with .

For testing, EA host and kubernetes as well as OTel host should be
tested. See here:
elastic#199758 (comment)

---------

Co-authored-by: kibanamachine <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Nov 18, 2024
## Summary

Closes elastic#199754 by introducing
more fine-grained version getters to get the base version (to resolve to
the git tag in the repo), the actual version which might include the IAR
suffix and the docker version which replaces + with .

For testing, EA host and kubernetes as well as OTel host should be
tested. See here:
elastic#199758 (comment)

---------

Co-authored-by: kibanamachine <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Nov 18, 2024
## Summary

Closes elastic#199754 by introducing
more fine-grained version getters to get the base version (to resolve to
the git tag in the repo), the actual version which might include the IAR
suffix and the docker version which replaces + with .

For testing, EA host and kubernetes as well as OTel host should be
tested. See here:
elastic#199758 (comment)

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature: Observability Onboarding Team:obs-ux-logs Observability Logs User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants