Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions applications/minio-operator/v5.0.6/Kubefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM scratch

ENV NAME=${NAME:-"minio-operator"}
ENV NAMESPACE=${NAMESPACE:-"minio-system"}

COPY . .

CMD ["bash entrypoint.sh"]
18 changes: 18 additions & 0 deletions applications/minio-operator/v5.0.6/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -e

ARCHIVE="operator-5.0.6.tgz"

if ! helm -n $NAMESPACE status $NAME &> /dev/null; then
if [ ! -f $ARCHIVE ]; then
wget $URL -O $ARCHIVE
fi

helm install $NAME $ARCHIVE --namespace $NAMESPACE --create-namespace
else
echo "MinIO Operator is already installed. Skipping installation."
fi

kubectl wait --for=condition=Available deployment/minio-operator -n $NAMESPACE

echo "MinIO Operator is installed and ready."
26 changes: 26 additions & 0 deletions applications/minio-operator/v5.0.6/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -e

RetryPullFileInterval=3
RetrySleepSeconds=3
ARCHIVE="operator-5.0.6.tgz"

retryPullFile() {
local file=$1
local retry=0
local retryMax=3
set +e
while [ $retry -lt $RetryPullFileInterval ]; do
curl $file --create-dirs -o $ARCHIVE >/dev/null && break
retry=$(($retry + 1))
echo "retry pull file $file, retry times: $retry"
sleep $RetrySleepSeconds
done
set -e
if [ $retry -eq $retryMax ]; then
echo "pull file $file failed"
exit 1
fi
}

retryPullFile https://raw.githubusercontent.com/minio/operator/master/helm-releases/operator-5.0.6.tgz