Skip to content

Commit

Permalink
Add Slack view submission topic for squarebot
Browse files Browse the repository at this point in the history
Squarebot will publish Slack view submission payload messages and
templatebot will consume them.
  • Loading branch information
jonathansick committed Sep 25, 2024
1 parent 515cdab commit 18253c4
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ spec:
---
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: "lsst.square-events.squarebot.slack.interaction.view-submission"
labels:
strimzi.io/cluster: {{ .Values.cluster.name }}
spec:
partitions: 4
replicas: 3
config:
# http://kafka.apache.org/documentation/#topicconfigs
retention.ms: 1800000 # 30 minutes
---
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: "lsst.square-events.squarebot.slack.app.mention"
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ spec:
operations:
- "Write"
- "Describe"
- resource:
type: topic
name: "lsst.square-events.squarebot.slack.interaction.view-submission"
patternType: literal
type: allow
host: "*"
operations:
- "Write"
- "Describe"
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ spec:
operations:
- "Read"
- "Describe"
- resource:
type: topic
name: "lsst.square-events.squarebot.slack.interaction.view-submission"
patternType: literal
type: allow
host: "*"
operations:
- "Read"
- "Describe"
1 change: 1 addition & 0 deletions applications/squarebot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Squarebot feeds events from services like Slack and GitHub into the SQuaRE Event
| config.topics.slackMessageGroups | string | `"lsst.square-events.squarebot.slack.message.groups"` | Kafka topic name for the Slack `message.groups` events (private channels) |
| config.topics.slackMessageIm | string | `"lsst.square-events.squarebot.slack.message.im"` | Kafka topic name for the Slack `message.im` events (direct message channels) |
| config.topics.slackMessageMpim | string | `"lsst.square-events.squarebot.slack.message.mpim"` | Kafka topic name for the Slack `message.mpim` events (multi-person direct messages) |
| config.topics.slackViewSubmission | string | `"lsst.square-events.squarebot.slack.interaction.view-submission"` | Kafka topic for Slack `view_submission` interaction events |
| fullnameOverride | string | `""` | Override the full name for resources (includes the release name) |
| global.baseUrl | string | Set by Argo CD | Base URL for the environment |
| global.host | string | Set by Argo CD | Host name for ingress |
Expand Down
1 change: 1 addition & 0 deletions applications/squarebot/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ data:
SQUAREBOT_TOPIC_MESSAGE_IM: {{ .Values.config.topics.slackMessageIm | quote }}
SQUAREBOT_TOPIC_MESSAGE_MPIM: {{ .Values.config.topics.slackMessageMpim | quote }}
SQUAREBOT_TOPIC_BLOCK_ACTIONS: {{ .Values.config.topics.slackBlockActions | quote }}
SQUAREBOT_TOPIC_VIEW_SUBMISSION: {{ .Values.config.topics.slackViewSubmission | quote }}
3 changes: 3 additions & 0 deletions applications/squarebot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ config:

# -- Kafka topic for Slack `block_actions` interaction events
slackBlockActions: "lsst.square-events.squarebot.slack.interaction.block-actions"

# -- Kafka topic for Slack `view_submission` interaction events
slackViewSubmission: "lsst.square-events.squarebot.slack.interaction.view-submission"
1 change: 1 addition & 0 deletions applications/templatebot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Create new projects
| config.topics.slackAppMention | string | `"lsst.square-events.squarebot.slack.app.mention"` | Kafka topic name for the Slack `app_mention` events |
| config.topics.slackBlockActions | string | `"lsst.square-events.squarebot.slack.interaction.block-actions"` | Kafka topic for Slack `block_actions` interaction events |
| config.topics.slackMessageIm | string | `"lsst.square-events.squarebot.slack.message.im"` | Kafka topic name for the Slack `message.im` events (direct message channels) |
| config.topics.slackViewSubmission | string | `"lsst.square-events.squarebot.slack.interaction.view-submission"` | Kafka topic for Slack `view_submission` interaction events |
| global.baseUrl | string | Set by Argo CD | Base URL for the environment |
| global.host | string | Set by Argo CD | Host name for ingress |
| global.vaultSecretsPath | string | Set by Argo CD | Base path for Vault secrets |
Expand Down
1 change: 1 addition & 0 deletions applications/templatebot/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ data:
TEMPLATEBOT_APP_MENTION_TOPIC: {{ .Values.config.topics.slackAppMention | quote }}
TEMPLATEBOT_MESSAGE_IM_TOPIC: {{ .Values.config.topics.slackMessageIm | quote }}
TEMPLATEBOT_BLOCK_ACTIONS_TOPIC: {{ .Values.config.topics.slackBlockActions | quote }}
TEMPLATEBOT_VIEW_SUBMISSION_TOPIC: {{ .Values.config.topics.slackViewSubmission | quote }}
3 changes: 3 additions & 0 deletions applications/templatebot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ config:
# -- Kafka topic for Slack `block_actions` interaction events
slackBlockActions: "lsst.square-events.squarebot.slack.interaction.block-actions"

# -- Kafka topic for Slack `view_submission` interaction events
slackViewSubmission: "lsst.square-events.squarebot.slack.interaction.view-submission"

ingress:
# -- Additional annotations for the ingress rule
annotations: {}
Expand Down

0 comments on commit 18253c4

Please sign in to comment.