Giter Club home page Giter Club logo

slack-operator's Introduction

slack-operator

Kubernetes operator for Slack

About

Slack operator is used to automate the process of setting up a Slack channel for alertmanager in a k8s native way. By using CRDs it lets you:

  1. Manage Channels
  2. Configure Issues

It uses Slack Api in it's underlying layer and can be extended to perform other tasks that are supported via the REST API.

Usage

Prerequisites

Create secret

Create the following secret which is required for slack-operator:

kind: Secret
apiVersion: v1
metadata:
  name: slack-secret
type: Opaque
data:
  APIToken: <SLACK_API_TOKEN>

Deploy operator

  • Make sure that certman is deployed in your cluster since webhooks require certman to generate valid certs since webhooks serve using HTTPS
  • To install certman
$ kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml
  • Deploy operator
$ oc apply -f bundle/manifests

Local Development

  1. Create slack-secret secret

  2. Run make run ENABLE_WEBHOOKS=false WATCH_NAMESPACE=default OPERATOR_NAMESPACE=default where WATCH_NAMESPACE denotes the namespaces that the operator is supposed to watch and OPERATOR_NAMESPACE is the namespace in which it's supposed to be deployed.

  3. Before committing your changes run the following to ensure that everything is verified and up-to-date:

    • make verify

Running Tests

Pre-requisites:

  1. Create a namespace with the name test
  2. Create slack-secret secret in test namespace

To run tests:

Use the following command to run tests: make test OPERATOR_NAMESPACE=test USE_EXISTING_CLUSTER=true

slack-operator's People

Contributors

abdulhaseeb2 avatar ahmedwaleedmalik avatar hazim1093 avatar hussnain612 avatar kahootali avatar muneebaijaz avatar rehanjaved237 avatar stakater-user avatar usamaahmadkhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

slack-operator's Issues

Cannot unarchive channel as bot user

Ran into some issues getting this running. If I use a bot token it cannot unarchive channels because of this bug

But if I use a user token I get an error that i cannot add or remove self from channel.

I was thinking about either adding support for both user and bot tokens, or maybe checking if user is self before adding/removing, but wanted to see if there was another workaround.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.