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

Filter not supported verbs by interactive kubectl, improve telemetry for interactive Slack messages #810

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

pkosiec
Copy link
Member

@pkosiec pkosiec commented Oct 12, 2022

Description

Changes proposed in this pull request:

  • Filter not supported verbs for interactive kubectl (currently it is not used, but @mszostok will switch to actual Command Guard in one of the next PRs)
  • Implement telemetry for actionable messages
  • Add missing telemetry to help and feedback typed commands
  • Fix "invalid verb" problem for the edit command, even if the verb is valid

Testing

To test against real Segment, contact me 🙂 Alternatively, you can test it with fake reporter with the following instruction:

Check out this PR.
Replace noop_reporter.go ReportCommand method with:

// ReportCommand reports a new executed command. The command should be anonymized before using this method.
func (n NoopReporter) ReportCommand(a config.CommPlatformIntegration, b string, c command.Origin) error {
	// TODO: Remove
	fmt.Printf(">>> Reported command: %s/%s/%s\n", a, b, c)
	return nil
}

Run Botkube locally:

export KUBECONFIG=...

export BOTKUBE_SETTINGS_LOG_LEVEL=info
export BOTKUBE_SETTINGS_KUBECONFIG=$KUBECONFIG
export BOTKUBE_CONFIG_PATHS="$(pwd)/resource_config.yaml,$(pwd)/comm_config.yaml"
go run cmd/botkube/main.go

Play around with different commands and see what is reported. Test:

  • actionable messages (you can use the sample YAML from the testing instruction of the Make event notifications actionable #803 PR)
  • interactive kubectl
  • edit source bindings
  • help command
  • feedback command (both button from help and typed command)

Separate PRs

  • Add delete confirmation for message action
  • Documentation

Related issue(s)

#786

@pkosiec pkosiec added enhancement New feature or request wip slack labels Oct 12, 2022
@pkosiec pkosiec changed the title Add kubectl delete confirmation, filter not supported verbs by interactive kubectl Filter not supported verbs by interactive kubectl, improve telemetry for interactive Slack messages Oct 13, 2022
@pkosiec pkosiec marked this pull request as ready for review October 13, 2022 10:12
@pkosiec pkosiec requested review from a team and PrasadG193 as code owners October 13, 2022 10:12
@pkosiec pkosiec added this to the v0.15.0 milestone Oct 13, 2022
@pkosiec pkosiec removed the wip label Oct 13, 2022
@pkosiec
Copy link
Member Author

pkosiec commented Oct 13, 2022

Pull request rebased - added support for plain text command origin 🙂

@pkosiec pkosiec merged commit 7cfcfba into kubeshop:main Oct 13, 2022
@pkosiec pkosiec deleted the actionable-messages-confirm branch October 13, 2022 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request slack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants