Comments (5)
I just added SLACK_CHANNEL option in master. Could you please try the image with latest tag?
from kube-slack.
I'm not sure I understand this request.
If you want to change Slack channel, then you can do so by configuring your incoming webhooks channel.
The kube-slack/slack-channel
annotation is for overriding the above configuration for specific pods and is not required.
from kube-slack.
OK, i will try to explain, maybe i'm mistaken due to my lack of knowledge in slack.
-
i have 9 namespaces across 4 clusters, with 22 deployments each, to taint every pod with kube-
slack/slack-channel
is out of the question, because i need it globally configured per cluster, so it seems a misuse of the specific-pods-annotations feature. (from what i understand it is impossible to configure multiple channels per incoming webhook, and even if it is possible there is no environment variable in kube-slack deployment for changing the channel) -
Although i can create 4 Incoming WebHooks (1 for each cluster) and place their URL in each of the kube-slack deployments, i will have to maintain some kind of map (
SLACK_URL
vsCLUSER_NAME
), which turns to be very clumsy, and i want to keep my cluster's deployment and management logic to a minimum, like i did so far with any organization-wide tool that has to be per cluster configured.
- the only thing that changes between clusters is the
CLUSTER_NAME
which can also be used asSLACK_CHANNEL
(or some kind of string manipulation of it). if i cloud change only theSLACK_CHANNEL
when i deploy kube-slack as part of single k8s cluster deployment process while theSLACK_URL
or theSLACK_TOKEN
remains the same.
hope that it explains the reason. @mdemri
from kube-slack.
thanks! i will check it today and let you know
from kube-slack.
Thanks @whs it works great, and it is really helpful :)
now my kube-slack deployment, serviceaccount, clusterrole, clusterrolebinding are identical to all clusters the only thing that changes is the environment vars secret:
---
apiVersion: v1
kind: Secret
metadata:
name: env-vars
namespace: kube-system
type: Opaque
data:
KUBE_CLUSTER_NAME: {{ kubernetes_cluster_name | b64encode }}
KUBE_ARK_REPO_URL: {{ kubernetes_ark_repo_url | b64encode }} # hardcoded static var
KUBE_SLACK_WEBHOOK_URL: {{ kubernetes_slack_webhook_url | b64encode }} # hardcoded static var
KUBE_SLACK_CHANNEL: {{ kubernetes_slack_channel | b64encode }}
when kubernetes_slack_channel
is "#k8s_{{ kubernetes_cluster_name.split('.')[0] }}_events"
from kube-slack.
Related Issues (20)
- Drain support HOT 1
- Proxy setting to reach slack webhooks. HOT 10
- Use kubernetes-client promise
- Sometimes PostStartHookError message is "" even though the event has a error log HOT 2
- Feature Request - Option of Slack Username HOT 6
- Getting cert error when pod starting HOT 2
- kube-slack can mix-up different pods if they have same label HOT 2
- "Container entered status *Running*" in the wrong channel HOT 3
- Lots of errors when upgrading to 4.0.1 HOT 5
- Logs are not forwarded by fluent-bit by default HOT 5
- Posting to different channels per pod with newer Slack APIs HOT 2
- helm chart not upto date HOT 1
- feature request: to watch only pods with set pod annotation
- Feature Request: Allow to configure the different username for slack notifications
- No Message during Deployment
- Directed Slack Notifications
- Configuration property "slack_username" is not defined HOT 2
- kube-slack/ignore-pod annotation does not work if you set an empty string as value.
- Pod Security Policy compliant: runAsNonRoot HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kube-slack.