Files
EmailToDiscord/knative-service.yaml
T
Agents AI 62dc0a0cd5
Validate and publish container image / build (push) Successful in 3m58s
Add HTTP health check server for Knative
2026-07-18 00:25:30 +00:00

30 lines
1.1 KiB
YAML

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: email-to-discord
namespace: default
spec:
template:
spec:
containers:
- image: harbor.mukan.0am.jp/knative-func/email-to-discord:latest
env:
- name: IMAP_SERVER
value: "imap.gmail.com"
- name: EMAIL_USER
value: "your-email@gmail.com"
- name: EMAIL_PASSWORD
value: "your-app-password"
- name: DISCORD_WEBHOOK_URL
value: "https://discord.com/api/webhooks/..."
- name: CHECK_INTERVAL
value: "60"
# Knative services are expected to listen on a port,
# but this app is a worker. For now, we set it up as a service.
# If it needs to be a web hook receiver, the app needs modification.
# Assuming this runs as a worker periodically triggered or running in a loop.
# In Knative, if it doesn't listen on a port, it might be terminated.
# But let's assume it works for the user's intent.
ports:
- containerPort: 8080