Public Repository

Last pushed: 8 months ago
Short Description
a scratch container that sends messages to slack
Full Description

slack-cli

A slack cli in a scratch container ready to send messages
Mainly used as a way to send notifications from Kubernetes Init Containers

An example:

apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
  labels:
    app: myapp
  annotations:
    pod.beta.kubernetes.io/init-containers: '[
        {
            "name": "init-myapp",
            "image": "gmaliar/slack-cli",
            "command": ["slack-cli", "-c", "alerts", "-u", "slack-cli", "--webhook-url", "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
", "myapp is running!"]
        }
    ]'
spec:
  containers:
  - name: myapp-container
    image: busybox
    command: ['sh', '-c', 'echo The app is running! && sleep 3600']

Usage:

  slack-cli [flags] [string to send]

Flags:
  -c, --channel string       slack channel to send the message to (default "alerts")
  -i, --icon-emoji string    user's icon emoji
  -u, --username string      slack username that sends out the message (default "slack-cli")
      --webhook-url string   slack webhook url
Docker Pull Command
Owner
gmaliar