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

Add notifications if a new profile version is available #1317

Merged
merged 14 commits into from Jan 31, 2022

Conversation

Skarlso
Copy link
Contributor

@Skarlso Skarlso commented Jan 19, 2022

Closes #1143

Testing

kubectl -n wego-system create secret generic slack-url \
--from-literal=address=https://hooks.slack.com/services/<token>
  • Setup Slack notification for flux using the following notification provider:
apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Provider
metadata:
  name: slack
  namespace: wego-system
spec:
  type: slack
  channel: general
  secretRef:
    name: slack-url
  • Port forward all the things which is the notification-controller and the source-controller
  • Start UI
./bin/gitops ui run --helm-repo-namespace wego-system --helm-repo-name podinfo --notification-controller-address http://localhost:8081
  • Install main components
./gitops install --config-repo=ssh://git@github.com/Skarlso/gitops-training.git
  • Create a profile app
./bin/gitops add app --name podinfo --url https://weaveworks.github.io/profiles-examples --config-repo ssh://git@github.com/Skarlso/gitops-training.git --chart podinfo  --deployment-type helm --auto-merge
  • Update the profile yaml file to include a new version and update the code in your gitops repo
  • Observe incoming messages to your slack channel

Screenshot 2022-01-19 at 17 23 31

Interesting.. where is my message?

Update:

Works!

Screenshot 2022-01-20 at 13 45 51

@Skarlso Skarlso added type/enhancement New feature or request team/pitch-black labels Jan 19, 2022
@Skarlso Skarlso force-pushed the notify_for_new_profile_versions branch from 20cc9b3 to 7b9a124 Compare January 19, 2022 11:40
@Skarlso Skarlso force-pushed the notify_for_new_profile_versions branch from fa2ec86 to f8682f6 Compare January 19, 2022 15:12
cmd/gitops/ui/run/cmd.go Outdated Show resolved Hide resolved
@Skarlso Skarlso force-pushed the notify_for_new_profile_versions branch from f8682f6 to 84d1d8d Compare January 19, 2022 15:32
@weaveworks weaveworks deleted a comment from aclevername Jan 19, 2022
@Skarlso Skarlso force-pushed the notify_for_new_profile_versions branch from 52317b2 to 41084ed Compare January 19, 2022 16:35
@Skarlso Skarlso force-pushed the notify_for_new_profile_versions branch from 41084ed to 5b639fc Compare January 19, 2022 19:02
Copy link
Contributor

@aclevername aclevername left a comment

Choose a reason for hiding this comment

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

couple nits- I'd wait for 2nd reviewer before merging 😄

@Himangini
Copy link
Contributor

LGTM, 2 ques

  • Did you find a place to document this ?

I'm looking for a place to document how to set up the alerting for the notification-controller to pick up and forward the notifications.

  • Are you going to add testing steps ?

testing steps incoming

cmd/gitops-server/main.go Show resolved Hide resolved
pkg/helm/watcher/cache/cache.go Outdated Show resolved Hide resolved
pkg/helm/watcher/controller/helm_watcher.go Outdated Show resolved Hide resolved
pkg/helm/watcher/controller/helm_watcher.go Outdated Show resolved Hide resolved
@Skarlso
Copy link
Contributor Author

Skarlso commented Jan 28, 2022

@Himangini Ah good questions!

testing steps

I'll add some, thanks

documentation

Nope, I have not. I'm hoping someone will point me to some docs I can update.

Copy link
Contributor

@Himangini Himangini left a comment

Choose a reason for hiding this comment

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

LGTM 🎉
Re the documentation, I'll find out where's the best place to put it. Not a blocker for this PR :)

@Skarlso Skarlso merged commit 41e6457 into main Jan 31, 2022
@Skarlso Skarlso deleted the notify_for_new_profile_versions branch February 16, 2022 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Profile Notifications
4 participants