keel icon indicating copy to clipboard operation
keel copied to clipboard

Slack's approval system seems to be unresponsive

Open hjpotter92 opened this issue 3 years ago • 14 comments

I have gone through #349 and #362. I have configured keel using following configurations:

- name: AUTHENTICATED_WEBHOOKS
  value: "false"
- name: SLACK_BOT_NAME
  value: "keel"
- name: SLACK_CHANNELS
  value: "keel-updates"
- name: SLACK_APPROVALS_CHANNEL
  value: "keel-approvals"
- name: NOTIFICATION_LEVEL
  value: "debug"

I configured the app/bot using the link provided in docs (URL: https://[organisation].slack.com/apps/A0F7YS25R-bots).

image

I setup a policy for one of the deployments in my kubernetes cluster. I do receive approval request notification in slack channel:

image

As can be seen in the screenshots above, the notifications for approvals do arrive to the channel, however the approvals system does not.

Any help/pointers would be appreciated.

hjpotter92 avatar Oct 12 '20 13:10 hjpotter92

Did you also setup the incoming side of things and therefore provide a SLACK_TOKEN env var to the keel deployment?

GijsvanDulmen avatar Oct 22 '20 18:10 GijsvanDulmen

Yes, @GijsvanDulmen . Slack token is loaded via a kubernetes opaque secret manifest:


apiVersion: v1
data:
  SLACK_TOKEN: <base-64 encoded app token>
  BASIC_AUTH_USER: a2VlbGFkbWlu
  BASIC_AUTH_PASSWORD: UGEkJDF3b3Jk
kind: Secret
metadata:
  name: keel-secrets
type: Opaque
---

hjpotter92 avatar Oct 22 '20 19:10 hjpotter92

You could try to use the slack token variable on the deployment, just to see if that works. kubectl -n keel set env deployment/keel SLACK_TOKEN="******"

But the wisest thing to do is to check with for example webhookrelay if you're webhook is actually send. Maybe Slack has a dashboard for it as well? Don't know really, just trying to help :-)

GijsvanDulmen avatar Oct 23 '20 06:10 GijsvanDulmen

@GijsvanDulmen I see that the token environment variable is set correctly in the pod:

 # env | grep SLACK
SLACK_APPROVALS_CHANNEL=keel-approvals
SLACK_BOT_NAME=keel
SLACK_TOKEN=xoxb-<REDACTED>
SLACK_CHANNELS=keel-updates

Will look into webhook relay soon.

hjpotter92 avatar Oct 27 '20 05:10 hjpotter92

I have gone through #349 and #362. I have configured keel using following configurations:

- name: AUTHENTICATED_WEBHOOKS
  value: "false"
- name: SLACK_BOT_NAME
  value: "keel"
- name: SLACK_CHANNELS
  value: "keel-updates"
- name: SLACK_APPROVALS_CHANNEL
  value: "keel-approvals"
- name: NOTIFICATION_LEVEL
  value: "debug"

I configured the app/bot using the link provided in docs (URL: https://[organisation].slack.com/apps/A0F7YS25R-bots).

image

I setup a policy for one of the deployments in my kubernetes cluster. I do receive approval request notification in slack channel:

image

As can be seen in the screenshots above, the notifications for approvals do arrive to the channel, however the approvals system does not.

Any help/pointers would be appreciated.

any updates about this issue?

armansaa avatar Nov 10 '20 06:11 armansaa

@armansaa nope. the notifications are still being received on slack, but the approvals are not being detected.

hjpotter92 avatar Nov 12 '20 08:11 hjpotter92

@hjpotter92 I'm also having this issue This seems to be present in 0.17.0-rc1 and potentially v 0.16.1 (I've seen this similar behaviour in my production cluster when it upgraded to 0.16.1 I had to revert to 0.15.1)

Seems like Keel can send messages, however, it cannot read approval messages or accept commands.

Is this potentially a slack bot scope issue?

ghost avatar Nov 17 '20 01:11 ghost

it might be the slack bot scopes

rusenask avatar Nov 17 '20 10:11 rusenask

it might be the slack bot scopes

@rusenask but I don't see any configuration for that

hjpotter92 avatar Nov 17 '20 11:11 hjpotter92

@hjpotter92 I'm also having this issue This seems to be present in 0.17.0-rc1 and potentially v 0.16.1 (I've seen this similar behaviour in my production cluster when it upgraded to 0.16.1 I had to revert to 0.15.1)

Seems like Keel can send messages, however, it cannot read approval messages or accept commands.

Is this potentially a slack bot scope issue?

Yes, reverting to older version of keel indeed fixed the issue., Screenshot below.

image

hjpotter92 avatar Nov 17 '20 11:11 hjpotter92

it might be the slack bot scopes

The bot hasn't changed, has the potentially been any changes since 15.1 that could have required new bot scopes? I can see there's an issue open for slack integration method depreciation #491 , however older versions of Keel seem to work fine so this may be unrelated.

ghost avatar Nov 18 '20 00:11 ghost

@hjpotter92 just checking if you ever found out what was wrong with this? I'm still having this issue but I've learned to live with it for now for deployments that require approvals (using the UI to approve instead of slack)

ghost avatar Feb 02 '21 01:02 ghost

@hjpotter92 just checking if you ever found out what was wrong with this? I'm still having this issue but I've learned to live with it for now for deployments that require approvals (using the UI to approve instead of slack)

@sm-kuba we've reverted keel to 0.15.1 ^_^ no idea if there were breaking changes since 0.15 to 0.17; but so far we've been happy.

hjpotter92 avatar Feb 02 '21 12:02 hjpotter92

I setup keel last week and I'm experiencing the same issue.

damianesteban avatar Aug 15 '21 23:08 damianesteban