# README

SlackController

A sample controller that demonstrates how to write a controller that targets the cluster registry. This controller will post messages to a Slack channel when a cluster is added to or removed from the registry.

Quickstart

  1. Set up a cluster registry. Refer to the user guide for more info.
  2. Run go build ./examples/slackcontroller to build the controller.
  3. Create a Slack incoming webhook and get its URL to pass via the -slack-url flag on slackcontroller.
  4. Deploy the controller into a cluster, making sure you pass the incoming webhook URL to its -slack-url flag.

# Functions

NewSlackController returns a new clusterregistry controller.

# Constants

MessageResourceSynced is the message used for an Event fired when a Cluster is synced successfully.
SuccessSynced is used as part of the Event 'reason' when a Cluster is synced.

# Structs

Controller is the controller implementation for Cluster resources.