blob: 55f86cc7337576c12689ec83889c03dd4e902927 [file] [log] [blame]
apiVersion: v1
kind: Pod
metadata:
name: minio-importer-webhook
namespace: minio
labels:
app: minio-importer-webhook
spec:
volumes:
- name: minio-creds
secret:
secretName: minio-creds
initContainers:
- name: setup-arn
image: minio/mc:RELEASE.2020-04-04T05-28-55Z
imagePullPolicy: IfNotPresent
volumeMounts:
- name: minio-secrets
readOnly: true
mountPath: "/etc/minio"
command: ["/bin/sh", "-c"]
args: ["mc config host add pcloud http://minio.minio.svc:9000 $(cat /etc/minio-creds/accesskey) $(cat /etc/minio-creds/secretkey) && mc mb pcloud/images && mc admin config set pcloud notify_webhook:pcloud queue_limit=\"1000\" queue_dir=\"/data/events\" endpoint=\"http://minio-importer.app-minio-importer.svc:80/new_object\" && mc admin service restart pcloud"]
containers:
- name: setup-events
image: minio/mc:RELEASE.2020-04-04T05-28-55Z
imagePullPolicy: IfNotPresent
volumeMounts:
- name: minio-secrets
readOnly: true
mountPath: "/etc/minio"
command: ["/bin/sh", "-c"]
args: ["mc config host add pcloud http://minio.minio.svc:9000 $(cat /etc/minio-creds/accesskey) $(cat /etc/minio-creds/secretkey) && mc event add pcloud/images arn:minio:sqs::pcloud:webhook --event put && mc event list pcloud/images"]
restartPolicy: Never
# mc admin config set mio notify_webhook:pcloud-controller queue_limit=\"1000\" queue_dir=\"/data/events\" endpoint=\"http://pcloud-controller-service.pcloud:1111/minio_webhook\"
# mc event add myminio/images arn:minio:sqs::pcloud-controller:webhook --event put
# args: ["mc config host add mio http://minio-hl-svc:9000 $(cat /etc/minio-secrets/accesskey) $(cat /etc/minio-secrets/secretkey) && mc mb mio/images && mc admin config set mio notify_webhook:pcloud queue_limit=\"1000\" queue_dir=\"/data/events\" endpoint=\"http://pcloud-controller-service.pcloud:1111/minio_webhook\" && mc event add mio/images arn:minio:sqs::pcloud:webhook --event put && mc event list mio/images"]