apiVersion: apps/v1
kind: Deployment
metadata:
  name: slack-moderator-words
  labels:
    app: slack-moderator-words
spec:
  replicas: 2
  selector:
    matchLabels:
      app: slack-moderator-words
  template:
    metadata:
      labels:
        app: slack-moderator-words
    spec:
      containers:
      - name: slack-moderator-words
        image: gcr.io/kubernetes-tools/slack-moderator-words:latest
        imagePullPolicy: Always
        args:
          - --config-path=/etc/slack-moderator-words/config.json
          - --filter-config-path=/etc/slack-moderator-words/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
        readinessProbe:
          httpGet:
            path: /healthz
            scheme: HTTP
            port: 8077
        livenessProbe:
          httpGet:
            path: /healthz
            scheme: HTTP
            port: 8077
      volumes:
       - name: configs
         projected:
          sources:
          - secret:
              name: slack-moderator-words-config
          - secret:
              name: slack-moderator-words-filters
