Giter VIP home page Giter VIP logo

Comments (10)

whs avatar whs commented on July 26, 2024

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.

whs avatar whs commented on July 26, 2024

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.

Saggi432 avatar Saggi432 commented on July 26, 2024

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.

whs avatar whs commented on July 26, 2024

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.

Saggi432 avatar Saggi432 commented on July 26, 2024

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.

Saggi432 avatar Saggi432 commented on July 26, 2024

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.

whs avatar whs commented on July 26, 2024

I just added SLACK_PROXY option in master. Could you please try the image with latest tag?

from kube-slack.

Saggi432 avatar Saggi432 commented on July 26, 2024

sure..
let me give a try..thank you!

from kube-slack.

Saggi432 avatar Saggi432 commented on July 26, 2024

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.

whs avatar whs commented on July 26, 2024

from kube-slack.

Related Issues (20)

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.