mirror of
https://github.com/storytold/irsa-manager.git
synced 2026-10-09 00:09:43 +00:00
fix readme
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: s3-echoer
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: s3-echoer
|
||||
containers:
|
||||
- name: main
|
||||
image: amazonlinux:2018.03
|
||||
command:
|
||||
- "sh"
|
||||
- "-c"
|
||||
- "curl -sL -o /s3-echoer https://github.com/mhausenblas/s3-echoer/releases/latest/download/s3-echoer-linux && chmod +x /s3-echoer && echo This is an in-cluster test | /s3-echoer TARGET_BUCKET"
|
||||
env:
|
||||
- name: AWS_DEFAULT_REGION
|
||||
value: "ap-northeast-1"
|
||||
- name: ENABLE_IRP
|
||||
value: "true"
|
||||
restartPolicy: Never
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: s3-echoer
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: s3-echoer
|
||||
containers:
|
||||
- name: main
|
||||
image: amazonlinux:2023
|
||||
command:
|
||||
- "sh"
|
||||
- "-c"
|
||||
- "curl -sL -o /s3-echoer https://github.com/kkb0318/s3-echoer-arm/releases/latest/download/s3-echoer-linux-arm64 && chmod +x /s3-echoer && echo This is an in-cluster test | /s3-echoer TARGET_BUCKET"
|
||||
env:
|
||||
- name: AWS_DEFAULT_REGION
|
||||
value: "ap-northeast-1"
|
||||
- name: ENABLE_IRP
|
||||
value: "true"
|
||||
restartPolicy: Never
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
TARGET_BUCKET_PREFIX=s3-echoer
|
||||
AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:-ap-northeast-1}
|
||||
JOB_TEMPLATE=job-arm.yaml.template
|
||||
|
||||
# deploy s3 echoer job into k8s cluster
|
||||
timestamp=$(date +%s)
|
||||
TARGET_BUCKET=$ROLE_NAME-$timestamp
|
||||
|
||||
aws s3api create-bucket \
|
||||
--bucket $TARGET_BUCKET_PREFIX \
|
||||
--create-bucket-configuration LocationConstraint=$AWS_DEFAULT_REGION \
|
||||
--region $AWS_DEFAULT_REGION
|
||||
|
||||
sed -e "s/TARGET_BUCKET/${TARGET_BUCKET_PREFIX}/g" ${JOB_TEMPLATE} > s3-echoer-job.yaml
|
||||
|
||||
kubectl create -f s3-echoer-job.yaml
|
||||
|
||||
echo "The S3 bucket is $TARGET_BUCKET_PREFIX"
|
||||
|
||||
Reference in New Issue
Block a user