Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include API Key when fetching remote Botkube configuration #980

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

pkosiec
Copy link
Member

@pkosiec pkosiec commented Feb 13, 2023

Description

Changes proposed in this pull request:

  • Include API Key when fetching remote Botkube configuration

Testing

On your Kubernetes cluster:

Install echo server:

helm repo add ealenn https://ealenn.github.io/charts
helm repo update ealenn
helm install echo-server ealenn/echo-server --set application.logs.ignore.ping=true --set application.enable.environment=false --wait

Checkout PR and install botkube:

gh pr checkout 980
helm install botkube -n botkube --create-namespace \
--set image.repository=kubeshop/pr/botkube \
--set image.tag=980-PR --set config.provider.endpoint="http://echo-server.default" --set config.provider.identifier="123" --set config.provider.apiKey="my-api-key" ./helm/botkube

See the logs of echo server 🙂

k logs echo-server-d54559dfc-z6x8j
(node:1) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Listening on port 80.
Mon, 13 Feb 2023 16:40:41 GMT express deprecated res.status("200"): use res.status(200) instead at webserver.js:1:661489
{"name":"echo-server","hostname":"echo-server-d54559dfc-z6x8j","pid":1,"level":30,"host":{"hostname":"echo-server.default","ip":"::ffff:10.42.0.35","ips":[]},"http":{"method":"POST","baseUrl":"","originalUrl":"/","protocol":"http"},"request":{"params":{},"query":{},"cookies":{},"body":{"query":"query ($id:ID!){deployment(id: $id){botkubeConfig}}","variables":{"id":"123"}},"headers":{"host":"echo-server.default","user-agent":"Go-http-client/1.1","content-length":"89","content-type":"application/json","x-api-key":"my-api-key","accept-encoding":"gzip"}},"msg":"Mon, 13 Feb 2023 16:45:48 GMT | [POST] - http://echo-server.default/","time":"2023-02-13T16:45:48.199Z","v":0}
{"name":"echo-server","hostname":"echo-server-d54559dfc-z6x8j","pid":1,"level":30,"host":{"hostname":"echo-server.default","ip":"::ffff:10.42.0.35","ips":[]},"http":{"method":"POST","baseUrl":"","originalUrl":"/","protocol":"http"},"request":{"params":{},"query":{},"cookies":{},"body":{"query":"query ($id:ID!){deployment(id: $id){botkubeConfig}}","variables":{"id":"123"}},"headers":{"host":"echo-server.default","user-agent":"Go-http-client/1.1","content-length":"89","content-type":"application/json","x-api-key":"my-api-key","accept-encoding":"gzip"}},"msg":"Mon, 13 Feb 2023 16:45:58 GMT | [POST] - http://echo-server.default/","time":"2023-02-13T16:45:58.397Z","v":0}

@pkosiec pkosiec added the enhancement New feature or request label Feb 13, 2023
@pkosiec pkosiec marked this pull request as ready for review February 13, 2023 16:54
@pkosiec pkosiec requested review from a team and PrasadG193 as code owners February 13, 2023 16:54
@pkosiec pkosiec enabled auto-merge (squash) February 15, 2023 09:22
@pkosiec pkosiec merged commit 699b967 into kubeshop:main Feb 15, 2023
@pkosiec pkosiec deleted the pass-api-key branch February 15, 2023 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants