README ¶
Helm executor
Helm is the Botkube executor plugin that allows you to run the Helm CLI commands directly from any communication platform.
Manual testing
This section describes a manual testing of all supported Helm executor commands. It utilizes the k3d
cluster and the leverages a built-in functionality to access your host system by referring to it as host.k3d.internal
.
Only Slack integration is described, but described steps are the same for all communication platforms.
Install Botkube
-
Export Slack tokens:
export SLACK_API_APP_TOKEN={token} # should start with xapp-1- export SLACK_API_BOT_TOKEN={token} # should start with xoxb-
-
Create
/tmp/test-values.yaml
:cat << EOF > /tmp/test-values.yaml communications: default-group: socketSlack: enabled: true channels: default: name: random bindings: executors: - 'plugin-based' appToken: "${SLACK_API_APP_TOKEN}" botToken: "${SLACK_API_BOT_TOKEN}" executors: 'plugin-based': botkube/helm: enabled: true extraEnv: - name: LOG_LEVEL_EXECUTOR_BOTKUBE_HELM value: "debug" plugins: cacheDir: "/tmp/plugins" repositories: botkube: url: http://host.k3d.internal:3000/botkube.yaml rbac: create: true rules: - apiGroups: ["*"] resources: ["*"] verbs: ["get", "watch", "list", "create", "delete", "update", "patch"] EOF
-
Start
k3d
clusterk3d cluster create labs --image=rancher/k3s:v1.25.0-k3s1
-
Build plugins:
make build-plugins
-
Start plugin server:
env PLUGIN_SERVER_HOST=http://host.k3d.internal go run test/helpers/plugin_server.go
-
Install Botkube
helm upgrade botkube --install --namespace botkube ./helm/botkube --wait --create-namespace \ -f /tmp/test-values.yaml
Steps
-
Global Help
@Botkube helm help
-
Version
@Botkube helm version -h @Botkube helm version
-
Install
@Botkube helm install -h # By absolute URL: @Botkube helm install --repo https://charts.bitnami.com/bitnami psql postgresql --set clusterDomain='testing.local' # By chart reference: @Botkube helm install https://charts.bitnami.com/bitnami/postgresql-12.1.0.tgz --create-namespace -n test --generate-name
-
List
@Botkube helm list -h @Botkube helm list -A @Botkube helm list -f 'p' -A
-
Status
@Botkube helm status -h @Botkube helm status psql
-
Upgrade
@Botkube helm upgrade -h @Botkube helm upgrade --repo https://charts.bitnami.com/bitnami psql postgresql --set clusterDomain='cluster.local'
-
History
@Botkube helm history -h @Botkube helm history psql @Botkube helm hist psql @Botkube helm history psql -o json
-
Get
@Botkube helm get -h
-
Get all
@Botkube helm get all -h @Botkube helm get all psql @Botkube helm get all psql --template {{.Release.Name}}
-
Get hooks
@Botkube helm get hooks -h @Botkube helm get hooks psql @Botkube helm get hooks psql --revision 1 @Botkube helm get hooks psql --revision 2 @Botkube helm get hooks psql --revision 3
-
Get manifest
@Botkube helm get manifest -h @Botkube helm get manifest psql
-
Get notes
@Botkube helm get notes -h @Botkube helm get notes psql -n test2
-
Get values
@Botkube helm get values -h @Botkube helm get values psql @Botkube helm get values psql --all @Botkube helm get values psql --all --output json --revision 1
-
Rollback
@Botkube helm rollback -h @Botkube helm rollback psql
-
Test
@Botkube helm test -h @Botkube helm test psql
-
Uninstall
@Botkube helm uninstall -h @Botkube helm uninstall psql
-
Unknown flag
@Botkube helm uninstall psql --random-flag
-
Known but not supported flag
@Botkube helm install --repo https://charts.bitnami.com/bitnami psql postgresql --wait
Documentation ¶
There is no documentation for this package.