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

Add option to install Botkube via CLI, add --verbose flag #1134

Merged
merged 4 commits into from
Jul 12, 2023

Conversation

mszostok
Copy link
Contributor

@mszostok mszostok commented Jul 9, 2023

Description

Changes proposed in this pull request:

  • Add option to install Botkube via CLI
    - use Helm Go SDK underneath to install the chart
    - make sure it can be run with debug/verbose
    - support dry-run
    - support Botkube version and overrides
    - Respect KUBECONFIG env variable
  • Add --verbose flag
    • it supports also modes that can be used to print more details. For example, for GraphQL call, we can print requests/responses when --verbose=trace is used. It should be useful to print it only if needed, as printing that all the time could be too messy.

Testing

  1. Build the CLI
  2. Create k8s cluster
  3. Run:
export SLACK_CHANNEL_NAME=random
export SLACK_APP_TOKEN="xapp-1-"
export SLACK_BOT_TOKEN="xoxb-"

botkube install --verbose \
--set communications.default-group.socketSlack.enabled=true \
--set communications.default-group.socketSlack.channels.default.name=${SLACK_CHANNEL_NAME} \
--set communications.default-group.socketSlack.appToken=${SLACK_API_APP_TOKEN} \
--set communications.default-group.socketSlack.botToken=${SLACK_API_BOT_TOKEN} \
--set settings.clusterName=labs \
--set 'executors.k8s-default-tools.botkube/kubectl.enabled'=true \
--set 'executors.k8s-default-tools.botkube/helm.enabled'=true

here are described all install flags: https://github.com/kubeshop/botkube/blob/db6a62fcce7dee3856827fa05a32971e837c400f/cmd/cli/docs/botkube_install.md

Screen.Recording.2023-07-10.at.23.42.15.mov

Notes

In the next PR I will add streaming Botkube Pod logs. This PR is already huge and I'm still working on logs.

Related issue(s)

@mszostok mszostok added the enhancement New feature or request label Jul 9, 2023
@mszostok mszostok force-pushed the cli/add-install branch 2 times, most recently from 096f50e to db6a62f Compare July 10, 2023 17:54
@mszostok mszostok marked this pull request as ready for review July 10, 2023 17:54
@mszostok mszostok requested review from a team and PrasadG193 as code owners July 10, 2023 17:54
@mszostok mszostok force-pushed the cli/add-install branch 2 times, most recently from 60517fe to 9ce9fcd Compare July 11, 2023 13:03
Copy link
Contributor

@huseyinbabal huseyinbabal left a comment

Choose a reason for hiding this comment

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

Lot's of improvements, thank you 🚀

@mszostok mszostok enabled auto-merge (squash) July 12, 2023 16:45
@mszostok mszostok merged commit e0c8adf into kubeshop:main Jul 12, 2023
13 checks passed
@pkosiec pkosiec mentioned this pull request Jul 13, 2023
@mszostok mszostok linked an issue Jul 13, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add install command to Botkube CLI
2 participants