Skip to content

github-actions: undeploy observability deployments using ephemeral GH tokens#195215

Merged
v1v merged 1 commit intoelastic:mainfrom
v1v:refactor/use-undeploy-with-ephemeral-tokens
Oct 7, 2024
Merged

github-actions: undeploy observability deployments using ephemeral GH tokens#195215
v1v merged 1 commit intoelastic:mainfrom
v1v:refactor/use-undeploy-with-ephemeral-tokens

Conversation

@v1v
Copy link
Copy Markdown
Member

@v1v v1v commented Oct 7, 2024

Summary

Remove access to Vault or GH PAT and use a GH App to generate ephemeral tokens (this will change in the future to use OIDC or something similar but meanwhile let's us the least-permissive access)

It uses https://github.com/elastic/oblt-actions/tree/v1/oblt-cli/undeploy-my-kibana

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@v1v v1v requested review from a team as code owners October 7, 2024 10:35
@v1v v1v self-assigned this Oct 7, 2024
@v1v v1v added release_note:skip Skip the PR/issue when compiling release notes skip-ci labels Oct 7, 2024
@reakaleek
Copy link
Copy Markdown
Member

Ay, the manual change on the token caused another issue. 😢

@v1v
Copy link
Copy Markdown
Member Author

v1v commented Oct 7, 2024

Ay, the manual change on the token caused another issue. 😢

No worries, I plan to fix it now

@reakaleek
Copy link
Copy Markdown
Member

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@v1v v1v merged commit 103acda into elastic:main Oct 7, 2024
@v1v v1v deleted the refactor/use-undeploy-with-ephemeral-tokens branch October 7, 2024 12:14
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.15, 8.x

https://github.com/elastic/kibana/actions/runs/11215264620

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.15
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 7, 2024
…eral GH tokens (#195215) (#195236)

# Backport

This will backport the following commits from `main` to `8.15`:
- [github-actions: undeploy observability deployments using ephemeral GH
tokens (#195215)](#195215)

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

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

<!--BACKPORT [{"author":{"name":"Victor
Martinez","email":"victormartinezrubio@gmail.com"},"sourceCommit":{"committedDate":"2024-10-07T12:14:50Z","message":"github-actions:
undeploy observability deployments using ephemeral GH tokens
(#195215)","sha":"103acda7472cef401e0fb28850ac8ce2d62d756f","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","skip-ci","backport:prev-major"],"title":"github-actions:
undeploy observability deployments using ephemeral GH
tokens","number":195215,"url":"https://github.com/elastic/kibana/pull/195215","mergeCommit":{"message":"github-actions:
undeploy observability deployments using ephemeral GH tokens
(#195215)","sha":"103acda7472cef401e0fb28850ac8ce2d62d756f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195215","number":195215,"mergeCommit":{"message":"github-actions:
undeploy observability deployments using ephemeral GH tokens
(#195215)","sha":"103acda7472cef401e0fb28850ac8ce2d62d756f"}}]}]
BACKPORT-->

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
kibanamachine added a commit that referenced this pull request Oct 7, 2024
…ral GH tokens (#195215) (#195237)

# Backport

This will backport the following commits from `main` to `8.x`:
- [github-actions: undeploy observability deployments using ephemeral GH
tokens (#195215)](#195215)

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

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

<!--BACKPORT [{"author":{"name":"Victor
Martinez","email":"victormartinezrubio@gmail.com"},"sourceCommit":{"committedDate":"2024-10-07T12:14:50Z","message":"github-actions:
undeploy observability deployments using ephemeral GH tokens
(#195215)","sha":"103acda7472cef401e0fb28850ac8ce2d62d756f","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","skip-ci","backport:prev-major"],"title":"github-actions:
undeploy observability deployments using ephemeral GH
tokens","number":195215,"url":"https://github.com/elastic/kibana/pull/195215","mergeCommit":{"message":"github-actions:
undeploy observability deployments using ephemeral GH tokens
(#195215)","sha":"103acda7472cef401e0fb28850ac8ce2d62d756f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195215","number":195215,"mergeCommit":{"message":"github-actions:
undeploy observability deployments using ephemeral GH tokens
(#195215)","sha":"103acda7472cef401e0fb28850ac8ce2d62d756f"}}]}]
BACKPORT-->

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes skip-ci v8.15.3 v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants