Skip to content

Commit

Permalink
turn-off checking for updates completely if MINIO_UPDATE=off (minio#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored Oct 25, 2020
1 parent d9db7f3 commit 646d691
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ RUN \

FROM alpine:3.12

ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key \
MINIO_KMS_MASTER_KEY_FILE=kms_master_key \
MINIO_SSE_MASTER_KEY_FILE=sse_master_key
MINIO_SSE_MASTER_KEY_FILE=sse_master_key \
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"

EXPOSE 9000

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.arm.release
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ LABEL maintainer="MinIO Inc <[email protected]>"

COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin

ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key \
MINIO_KMS_MASTER_KEY_FILE=kms_master_key \
MINIO_SSE_MASTER_KEY_FILE=sse_master_key
MINIO_SSE_MASTER_KEY_FILE=sse_master_key \
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"

RUN \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.arm64.release
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ LABEL maintainer="MinIO Inc <[email protected]>"

COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin

ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key \
MINIO_KMS_MASTER_KEY_FILE=kms_master_key \
MINIO_SSE_MASTER_KEY_FILE=sse_master_key
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"

RUN \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ppc64le.release
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ LABEL maintainer="MinIO Inc <[email protected]>"

COPY --from=qemu /usr/bin/qemu-ppc64le-static /usr/bin

ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key \
MINIO_KMS_MASTER_KEY_FILE=kms_master_key \
MINIO_SSE_MASTER_KEY_FILE=sse_master_key
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"

RUN \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ FROM alpine:3.12

LABEL maintainer="MinIO Inc <[email protected]>"

ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key \
MINIO_KMS_MASTER_KEY_FILE=kms_master_key \
MINIO_SSE_MASTER_KEY_FILE=sse_master_key
MINIO_SSE_MASTER_KEY_FILE=sse_master_key \
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"

RUN \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.s390x.release
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ LABEL maintainer="MinIO Inc <[email protected]>"

COPY --from=qemu /usr/bin/qemu-s390x-static /usr/bin

ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key \
MINIO_KMS_MASTER_KEY_FILE=kms_master_key \
MINIO_SSE_MASTER_KEY_FILE=sse_master_key
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"

RUN \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
Expand Down
3 changes: 1 addition & 2 deletions cmd/admin-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ func (a adminAPIHandlers) ServerUpdateHandler(w http.ResponseWriter, r *http.Req
}

if globalInplaceUpdateDisabled {
// if MINIO_UPDATE=off - inplace update is disabled, mostly
// in containers.
// if MINIO_UPDATE=off - inplace update is disabled, mostly in containers.
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrMethodNotAllowed), r.URL)
return
}
Expand Down
6 changes: 1 addition & 5 deletions cmd/common-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,7 @@ func checkUpdate(mode string) {
return
}

if globalInplaceUpdateDisabled {
logStartupMessage(updateMsg)
} else {
logStartupMessage(prepareUpdateMessage("Run `mc admin update`", lrTime.Sub(crTime)))
}
logStartupMessage(prepareUpdateMessage("Run `mc admin update`", lrTime.Sub(crTime)))
}

func newConfigDirFromCtx(ctx *cli.Context, option string, getDefaultDir func() string) (*ConfigDir, bool) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/server-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func serverMain(ctx *cli.Context) {
}
}

if !globalCLIContext.Quiet {
if !globalCLIContext.Quiet && globalInplaceUpdateDisabled {
// Check for new updates from dl.min.io.
checkUpdate(getMinioMode())
}
Expand Down

0 comments on commit 646d691

Please sign in to comment.