remind-us

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

README

remind-us

Schedule and generate custom reminders and send via custom alerters.

Apache 2.0 Go Report Build Status GitHub release


remind-us, can generate custom reminders and alerters using a dynamically configured file. What you can do with this application is that how you can use it for. Deploy as a Cron Job, run automatically at start-up as a background process, etc.

Warning: A PoC project, currently in Alpha.

Features

  • NEW! Reminder: RSS, GitLab (PRs)
  • NEW! Alerter: Slack (Webhook)
  • Dynamic configuration support
  • Easy to use integration and alerter interfaces
  • Easy cron job integration
  • ... and much more! - Explore and contribute!

Screenshots

RSS: Slack

Output

GitLab: Slack

Output

Installation

  • Via Go
$ go get -u github.com/Dentrax/remind-us
  • Via Docker
$ docker build -t remind-us \
                  --build-arg VERSION=`git describe --abbrev=0 --tag` \
                  --build-arg COMMIT=`git rev-parse --short HEAD` \
                  --build-arg DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
                  -f Dockerfile .

Usage

  • Run the binary
$ remind-us --config-file "./config.yaml"
  • Run on Docker
$ docker run -v `pwd`/config.yaml:/app/config.yaml -it remind-us

Configuration

integrations:
  rss:
    sources:
      - url: "https://www.reddit.com/r/kubernetes/new/.rss"
        since: 1h  # searches for post in the last 1 hour, sync to the same interval as the CronJob. 
        matchTitle:
          contains:  # if 'CVE' contains in the post title
            - "CVE"
            - "book" # or
          regexes:  # you can search by writing ReGeX.
            - "^(foo|bar)$" 
  gitlab:
    baseURL: <https://gitlab.com>
    token: <token>
    listen:
      areas:
        - type: "PR"
      groups:
        - <list-of-group-id>
alerts:
  slack:
    webhook: "<your-slack-webhook-endpoint>"
    channel: "<#channel>"
    username: "<username>"
    icon: "<:icon:>"

Deployment

Kubernetes CronJob Schedule

$ mkdir configmap
$ cp /path/to/your/config.yaml ./configmap
$ kubectl create configmap my-awesome-reminder-config --from-file=./configmap/ --dry-run=client -o yaml | kubectl apply -f -
  • Create a cron.yaml file
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: my-awesome-reminder
spec:
  schedule: "0 9 * * 1-5" # set your schedule time: https://crontab.guru
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: remind-us
              image: ghcr.io/dentrax/remind-us:latest
              imagePullPolicy: IfNotPresent
              args: [ "--config-file", "/configmap/config.yaml" ]
              volumeMounts:
                - name: configmap
                  mountPath: /configmap
          restartPolicy: Never
          volumes:
            - name: configmap
              configMap:
                name: my-awesome-reminder-config
  • Deploy your CronJob!
$ kubectl apply --record=true -f ./cron.yaml

TO-DO

  • Add integration: RSS
  • Add integration: Jira
  • Add integration: Todoist
  • Add integration: GitHub
  • Add integration: Quates
  • Add alerter: stdout
  • Concurrency requests?
  • Implement golangci-lint in Actions

License

remind-us was created by Furkan 'Dentrax' Türkal

The base project code is licensed under Apache License 2.0 unless otherwise specified. Please see the LICENSE file for more information.

Best Regards

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL