Comments (10)
The npm settings are for npm commands only.
We're using Slack's SDK behind the scene, so this is how the docs says how to do it and added to this file.
from kube-slack.
Oh wait, we're using node-slack
https://github.com/xoxco/node-slack/blob/81ed5dd5d91dd0d15b1adeb7d8cea270406752fe/slack.js#L31
so setting https_proxy or http_proxy should work...
I'm guessing that maybe Kubernetes API access is proxied too. Could you check your proxy server logs (or tcpdump)?
from kube-slack.
Thank you for the reply..
Just to confirm more our K8S master and other infra is running on the same subnet as the node so to reach the k8s API we would not need the proxy to be set.. however we need proxy to reach slack as its outside our network..
On the logs at proxy sever..sure let me check them and get back to you.. since its corporate it might be difficult to get these logs.
from kube-slack.
Yup, I'd like to know how the proxy get used.
On reading the original logs again, I noticed it mentioned EINVAL 0.0.35.130:80
. Is that IP your proxy server? And is the 0.0 prefix redacted or is it that way in the log.
from kube-slack.
The IP is not the proxy server IP.
I went to the pod shell and set the https_proxy manually and ran the following from the command line. this time its a different error..
app $ node .
{"name":"kube-slack","hostname":"kube-slack-5df468977d-845w9","pid":47,"level":30,"msg":"Kubernetes monitors started","time":"2018-05-23T23:38:22.582Z","v":0}
node:47) UnhandledPromiseRejectionWarning: Error: tunneling socket could not be established, statusCode=403
at ClientRequest.onConnect (/app/node_modules/tunnel-agent/index.js:166:19)
at Object.onceWrapper (events.js:319:30)
at emitThree (events.js:136:13)
at ClientRequest.emit (events.js:217:7)
at Socket.socketOnData (_http_client.js:474:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:597:20)
(node:47) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:47) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
from kube-slack.
Hi..
i did a try by enabling the http_noproxy as well to make sure the k8s cluster does not use proxy when it makes its call.. but still the 403 error comes up.. i will dig further and update you.
from kube-slack.
I just added SLACK_PROXY option in master. Could you please try the image with latest tag?
from kube-slack.
sure..
let me give a try..thank you!
from kube-slack.
Hi,
I just tried with the new changes in master..it looks to have an error..there is a conflict with config directory..cannot find the module config.
internal/modules/cjs/loader.js:596
throw err;
^
Error: Cannot find module 'config'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/app/src/index.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
from kube-slack.
from kube-slack.
Related Issues (20)
- Drain support HOT 1
- Use kubernetes-client promise
- Add support of global kube-slack channel configuration. HOT 5
- 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.