Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ We have the following tools:
- [slack-event-log](./slack-event-log): Event logging for global Kubernetes events. Watch users join, create/remove emoji, and so forth.
- [slack-report-message](./slack-report-message): Enables users to optionally anonymously report messages, and sends those reports to some Slack channel
- [slack-moderator](./slack-moderator): Like `slack-report-message`, but if a Slack Admin or Owner uses the "report" button, instead lets them remove users and/or their content.
- [slack-moderator-words](./slack-moderator-words): Displays a message to users if they use non-inclusive langauge
- [slack-welcomer](./slack-welcomer): Sends a welcome message to every user who joins Slack.
- [slack-post-message](./slack-post-message): Enables users who are part of a given slack usergroup(s), to post message in multiple channel(s) using a Modal form
- [Tempelis](./tempelis): Control your Slack setup with yaml config files. Combine with a CI system to implement Slack GitOps.
Expand Down
31 changes: 13 additions & 18 deletions cluster/slack-moderator-words/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,31 @@ spec:
spec:
containers:
- name: slack-moderator-words
image: gcr.io/kubernetes-tools/slack-moderator-words:latest
image: gcr.io/k8s-staging-slack-infra/slack-moderator-words:latest
imagePullPolicy: Always
args:
- --config-path=/etc/slack-moderator-words/config.json
- --filter-config-path=/etc/slack-moderator-words/filters.yaml
- --filter-config-path=/etc/filters/filters.yaml
ports:
- containerPort: 8080
protocol: TCP
env:
- name: PATH_PREFIX
value: /infra/moderator-words
volumeMounts:
- mountPath: /etc/slack-moderator-words/
name: configs
readOnly: true
- mountPath: /etc/slack-moderator-words
name: config
- mountPath: /etc/filters
name: filters
readinessProbe:
httpGet:
path: /healthz
scheme: HTTP
port: 8077
livenessProbe:
httpGet:
path: /healthz
scheme: HTTP
port: 8077
port: 8080
volumes:
- name: configs
projected:
sources:
- secret:
name: slack-moderator-words-config
- secret:
name: slack-moderator-words-filters
- name: config
secret:
secretName: slack-moderator-words-config
- name: filters
configMap:
name: slack-moderator-words-filters
10 changes: 10 additions & 0 deletions cluster/slack-moderator-words/filters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: slack-moderator-words-filters
data:
filters.yaml: |-
- triggers:
- guys
action: chat.postEphemeral
message: "May I suggest \"all\" instead when addessing a group of people? Thank you. :slightly_smiling_face:"
2 changes: 1 addition & 1 deletion cluster/slack-moderator-words/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ spec:
ports:
- protocol: TCP
port: 80
targetPort: 8077
targetPort: 8080
3 changes: 0 additions & 3 deletions slack-moderate-words/Dockerfile

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.json

# go binary
slack-moderate-words
slack-moderator-words
3 changes: 3 additions & 0 deletions slack-moderator-words/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM gcr.io/distroless/base
ADD slack-moderator-words /slack-moderator-words
ENTRYPOINT ["/slack-moderator-words"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# slack-moderator-words

slack-moderator-words provides a moderation when positng some specific words, and will let the user know how to write better messages.
slack-moderator-words provides a moderation when posting some specific words, and will let the user know how to write better messages.

## Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"

"sigs.k8s.io/slack-infra/slack"
"sigs.k8s.io/slack-infra/slack-moderate-words/model"
"sigs.k8s.io/slack-infra/slack-moderator-words/model"
)

type handler struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"gopkg.in/yaml.v3"

"sigs.k8s.io/slack-infra/slack"
"sigs.k8s.io/slack-infra/slack-moderate-words/model"
"sigs.k8s.io/slack-infra/slack-moderator-words/model"
)

type options struct {
Expand Down
2 changes: 2 additions & 0 deletions variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ variants:
TOOL: tempelis
slack-post-message:
TOOL: slack-post-message
slack-moderator-words:
TOOL: slack-moderator-words