fluxcd / notification-controller

The GitOps Toolkit event forwarded and notification dispatcher

Home Page:https://fluxcd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rocket username and channel are mandatory but not documented

GJKrupa opened this issue · comments

The documentation for the Rocket notification provider says the following:

To configure a Provider for Rocket, create a Secret with the address set to the Rocket webhook URL, and a rocket Provider with a Secret reference.

However, the provider code checks for the presence of both username and channel properties as well and will error leaving it in a not ready state if these are not provided:

	if username == "" {
		return nil, errors.New("empty Rocket username")
	}

	if channel == "" {
		return nil, errors.New("empty Rocket channel")
	}

If a webhook URL is used, neither the username not the channel should be required since these are both tied to the webhook URL in the Rocket workspace configuration.

@GJKrupa You are right, from the rocket documentation, the channel and username are not required.
Do you want to raise a PR to fix this. We can take out the checks in the NewRocket function and only set the channel/username in the slack payload if they are provided