Skip to content

Conversation

@mtojek
Copy link
Contributor

@mtojek mtojek commented Nov 3, 2021

Fixes: #567

Kubernetes service deployer selects the stack version based on the running Kibana:

[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:54 DEBUG install Elastic Agent in the Kubernetes cluster
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:54 DEBUG GET http://127.0.0.1:5601/login
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:54 DEBUG Prepare YAML definition for Elastic Agent running in stack v7.15.1
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:54 DEBUG Apply Kubernetes stdin
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:54 DEBUG run command: /var/lib/jenkins/workspace/PR-569-2-05934679-d7fa-4f01-8c4c-248efecf3bf3/bin/kubectl apply -f - -o yaml
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:55 DEBUG Handle "apply" command output
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:55 DEBUG Extract resources from command output
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:55 DEBUG Wait for ready resources
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:55 DEBUG Sync resource info: elastic-agent (kind: DaemonSet, namespace: kube-system)
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:55 DEBUG Sync resource info: elastic-agent (kind: ClusterRoleBinding, namespace: )
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:55 DEBUG Sync resource info: elastic-agent (kind: RoleBinding, namespace: kube-system)
[2021-11-03T08:31:55.324Z] 2021/11/03 08:31:55 DEBUG Sync resource info: elastic-agent-kubeadm-config (kind: RoleBinding, namespace: kube-system)
[2021-11-03T08:31:55.591Z] 2021/11/03 08:31:55 DEBUG Sync resource info: elastic-agent (kind: ClusterRole, namespace: )
[2021-11-03T08:31:55.591Z] 2021/11/03 08:31:55 DEBUG Sync resource info: elastic-agent (kind: Role, namespace: kube-system)
[2021-11-03T08:31:55.591Z] 2021/11/03 08:31:55 DEBUG Sync resource info: elastic-agent-kubeadm-config (kind: Role, namespace: kube-system)
[2021-11-03T08:31:55.591Z] 2021/11/03 08:31:55 DEBUG Sync resource info: elastic-agent (kind: ServiceAccount, namespace: kube-system)
[2021-11-03T08:31:55.591Z] 2021/11/03 08:31:55 DEBUG beginning wait for 8 resources with timeout of 10m0s

@mtojek mtojek self-assigned this Nov 3, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 3, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-11-03T10:49:58.899+0000

  • Duration: 37 min 20 sec

  • Commit: 601278d

Test stats 🧪

Test Results
Failed 0
Passed 439
Skipped 4
Total 443

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@mtojek mtojek requested review from ChrsMark and jsoriano November 3, 2021 08:40
Copy link
Member

@ChrsMark ChrsMark left a comment

Choose a reason for hiding this comment

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

LGTM

return errors.Wrap(err, "can't create Kibana client")
}

metadata, err := kibanaClient.InjectedMetadata()
Copy link
Member

Choose a reason for hiding this comment

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

Nit. Not sure if this injected metadata is something documented or long term supported. We could have a method to get the kibana version, ever if under the hood there can be different methods in the future to discover it. But we can also wait for this future, it may never come :)

Suggested change
metadata, err := kibanaClient.InjectedMetadata()
version, err := kibanaClient.Version()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds like a good idea, more future oriented :) I will adjust the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

👍

@mtojek mtojek merged commit f2a235e into elastic:master Nov 3, 2021
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.

Kubernetes service deployer: use correct stack version

4 participants