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

Allow new diagnostics user, with fallback to elastic user. #231

Merged
merged 7 commits into from
Apr 29, 2024

Conversation

naemono
Copy link
Contributor

@naemono naemono commented Apr 24, 2024

Related: elastic/cloud-on-k8s#7723

Since we are now allowing disabling of the Elastic superuser, we need to provide additional options for Elasticsearch credentials to use during extracting of diagnostics. This allows:

  1. the 'elastic-internal-diagnostics' user secret will attempt to be used, and will fallback to the elastic user.
  2. We will fail if the above option does not work.

naemono added 4 commits April 24, 2024 09:03
Support both the 'elastic' and 'elastic-internal-diagnostics' user secrets.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
cmd/main.go Outdated Show resolved Hide resolved
internal/stackdiag.go Outdated Show resolved Hide resolved
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@@ -33,7 +33,7 @@ func main() {
Long: "Dump ECK and Kubernetes data for support and troubleshooting purposes.",
PreRunE: preRunOperations,
Version: internal.Version(),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unused var

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@naemono naemono changed the title Allow multiple Elasticsearch credentials options. Allow new diagnostics user, with fallback to elastic user. Apr 25, 2024
@naemono naemono requested a review from pebrc April 25, 2024 03:27
Copy link
Collaborator

@pebrc pebrc left a comment

Choose a reason for hiding this comment

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

LGTM, just a few more small things.

internal/stackdiag.go Outdated Show resolved Hide resolved
internal/stackdiag.go Outdated Show resolved Hide resolved
internal/stackdiag.go Outdated Show resolved Hide resolved
internal/stackdiag.go Outdated Show resolved Hide resolved
Attempt to continue on failure.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@naemono naemono requested a review from pebrc April 25, 2024 13:19
@naemono naemono merged commit 062b199 into elastic:main Apr 29, 2024
4 checks passed
@naemono naemono deleted the disabling-elastic-user branch April 29, 2024 13:24
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