35 lines
786 B
YAML
35 lines
786 B
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: create-bucket
|
|
namespace: block-storage
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: createbucket
|
|
image: amazon/aws-cli
|
|
command: ["aws"]
|
|
args:
|
|
- s3api
|
|
- create-bucket
|
|
- --bucket
|
|
- postgres
|
|
- --endpoint-url
|
|
- http://minio:80
|
|
env:
|
|
- name: AWS_ACCESS_KEY_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio-secret
|
|
key: accesskey
|
|
|
|
- name: AWS_SECRET_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio-secret
|
|
key: secretkey
|
|
|
|
restartPolicy: Never
|
|
backoffLimit: 1
|