Add HTTP health check server for Knative
Validate and publish container image / build (push) Successful in 3m58s
Validate and publish container image / build (push) Successful in 3m58s
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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
|
||||
Reference in New Issue
Block a user