apiVersion: apps/v1
kind: Deployment
metadata:
  name: discord-bot
  namespace: josie-health
spec:
  replicas: 1
  selector:
    matchLabels:
      app: discord-bot
  template:
    metadata:
      labels:
        app: discord-bot
    spec:
      containers:
      - name: discord-bot
        image: discord-bot:latest
        imagePullPolicy: Always
        env:
        - name: DISCORD_TOKEN
          valueFrom:
            secretKeyRef:
              name: josie-health-secrets
              key: DISCORD_TOKEN
        - name: DISCORD_GUILD_ID
          valueFrom:
            secretKeyRef:
              name: josie-health-secrets
              key: DISCORD_GUILD_ID
        resources:
          requests:
            memory: "256Mi"
            cpu: "100m"
          limits:
            memory: "512Mi"
            cpu: "250m"
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: irc-ingestion
  namespace: josie-health
spec:
  replicas: 1
  selector:
    matchLabels:
      app: irc-ingestion
  template:
    metadata:
      labels:
        app: irc-ingestion
    spec:
      containers:
      - name: irc-ingestion
        image: irc-ingestion:latest
        imagePullPolicy: Always
        env:
        - name: IRC_SERVER
          value: "irc.libera.chat"
        - name: IRC_PORT
          value: "6697"
        - name: IRC_CHANNEL
          value: "##drugs"
        - name: IRC_NICK
          valueFrom:
            secretKeyRef:
              name: josie-health-secrets
              key: IRC_NICK
        - name: IRC_SSL
          value: "true"
        resources:
          requests:
            memory: "128Mi"
            cpu: "50m"
          limits:
            memory: "256Mi"
            cpu: "100m"