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

Fix Botkube version constraint during migration #1353

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

pkosiec
Copy link
Member

@pkosiec pkosiec commented Jan 17, 2024

Description

Changes proposed in this pull request:

  • Fix Botkube version constraint during migration
  • Update E2E migration test to cover the case for two executors under executor config group

The actual issue:

   FATA while running application: while merging app configuration: found critical validation errors: 3 errors occurred:
        * Key: 'Config.Actions[show-logs-on-error].Bindings.k8s-default-tools_jJkwz' 'k8s-default-tools_jJkwz' binding not defined in Config.Executors
        * Key: 'Config.Actions[describe-created-resource].Bindings.k8s-default-tools_jJkwz' 'k8s-default-tools_jJkwz' binding not defined in Config.Executors

has been resolved on Cloud side.

Testing

Test this against Botkube Cloud dev setup.

Check out the PR and build the latest CLI:

export IMAGE_TAG=v9.99.9-dev
make release-snapshot-cli
chmod +x ./dist/botkube-cli_darwin_amd64_v1/botkube && cp ./dist/botkube-cli_darwin_amd64_v1/botkube /usr/local/bin/botkube

Then, install Botkube in your k3d cluster

Option 1: Without actions

export ALLOW_KUBECTL=true
export ALLOW_HELM=true
export SLACK_CHANNEL_NAME=botkube-demo \
export SLACK_API_APP_TOKEN=xapp-... \
export SLACK_API_BOT_TOKEN=xoxb-... \
export CLUSTER_NAME=dev
botkube install --version 1.7.0 \
--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=${CLUSTER_NAME} \
--set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} \
--set 'executors.k8s-default-tools.botkube/helm.enabled'=${ALLOW_HELM}

Option 2: With actions

export ALLOW_KUBECTL=true
export ALLOW_HELM=true
export SLACK_CHANNEL_NAME=botkube-demo \
export SLACK_API_APP_TOKEN=xapp-... \
export SLACK_API_BOT_TOKEN=xoxb-... \
export CLUSTER_NAME=dev
botkube install --version 1.7.0 \
--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 "communications.default-group.socketSlack.channels.default.bindings.sources={k8s-err-with-logs-events,k8s-create-events}" \
--set settings.clusterName=${CLUSTER_NAME} \
--set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} \
--set 'executors.k8s-default-tools.botkube/helm.enabled'=${ALLOW_HELM} \
--set 'actions.describe-created-resource.enabled=true' \
--set 'actions.show-logs-on-error.enabled=true'

Migrate it:

botkube login --cloud-dashboard-url http://localhost:3000
botkube migrate --cloud-api-url http://host.k3d.internal:8080/graphql --cloud-dashboard-url http://localhost:3000

After running botkube, run:

@Botkube list executors

and see two executors there instead of one (that was a bug).

Related issue(s)

Resolves #1321

@pkosiec pkosiec added the bug Something isn't working label Jan 17, 2024
@pkosiec pkosiec force-pushed the fix-migrate branch 2 times, most recently from e618d7a to 81ec24e Compare January 18, 2024 10:42
@pkosiec pkosiec marked this pull request as ready for review January 18, 2024 12:40
@pkosiec pkosiec requested review from PrasadG193 and a team as code owners January 18, 2024 12:40
Copy link
Collaborator

@madebyrogal madebyrogal left a comment

Choose a reason for hiding this comment

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

Works perfect!

image

No issue with executors list
Screenshot 2024-01-18 at 17 22 49

Tested both options with and without actions

@pkosiec pkosiec merged commit e7c907a into kubeshop:main Jan 19, 2024
15 checks passed
@pkosiec pkosiec deleted the fix-migrate branch January 19, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible Issues with install/migrate for the botkube cloud setup
2 participants