Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: include mc in kotsadm for minio upgrade #4112

Closed
wants to merge 2 commits into from
Closed
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: 4 additions & 4 deletions .image.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated file, do not modify. This file is generated from a text file containing a list of images. The
# most recent tag is interpolated from the source repository and used to generate a fully qualified image
# name.
MINIO_TAG='RELEASE.2023-09-23T03-47-50Z'
MC_TAG='RELEASE.2023-09-22T05-07-46Z'
MINIO_TAG='RELEASE.2023-10-25T06-33-25Z'
MC_TAG='RELEASE.2023-10-24T21-42-22Z'
RQLITE_TAG='7.21.4'
DEX_TAG='v2.37.0'
SCHEMAHERO_TAG='0.14.0'
LVP_TAG='v0.5.4'
SCHEMAHERO_TAG='0.16.0'
LVP_TAG='v0.5.5'
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include Makefile.build.mk
CURRENT_USER := $(shell id -u -n)
MINIO_TAG ?= RELEASE.2023-09-23T03-47-50Z
MC_TAG ?= RELEASE.2023-09-22T05-07-46Z
MINIO_TAG ?= RELEASE.2023-10-25T06-33-25Z
MC_TAG ?= RELEASE.2023-10-24T21-42-22Z
RQLITE_TAG ?= 7.21.4
DEX_TAG ?= v2.37.0
LVP_TAG ?= v0.5.4
LVP_TAG ?= v0.5.5

define sendMetrics
@if [ -z "${PROJECT_NAME}" ]; then \
Expand Down
10 changes: 10 additions & 0 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ RUN cd /tmp && curl -fsSL -o helm.tar.gz "${HELM3_URL}" \
&& ln -s "${KOTS_HELM_BIN_DIR}/helm3" "${KOTS_HELM_BIN_DIR}/helm" \
&& rm -rf helm.tar.gz linux-amd64

# Install Minio client - See https://dl.minio.io/client/mc/release/linux-amd64/archive/ for latest version
ENV KOTS_MC_BIN_DIR=/usr/local/bin
ENV MC_VERSION=RELEASE.2023-10-24T21-42-22Z
ENV MC_URL=https://dl.minio.io/client/mc/release/linux-amd64/archive/mc.${MC_VERSION}
ENV MC_SHA256SUM=1609c149cf24eb6238e014e548ab0f66812bbc59d1ae51af8cfe7f006a809a8f
RUN cd /tmp && curl -fsSL -o mc "${MC_URL}" \
&& echo "${MC_SHA256SUM} mc" | sha256sum -c - \
&& chmod a+x mc \
&& mv mc "${KOTS_MC_BIN_DIR}/mc"

# Setup user
RUN useradd -c 'kotsadm user' -m -d /home/kotsadm -s /bin/bash -u 1001 kotsadm
USER kotsadm
Expand Down
2 changes: 1 addition & 1 deletion migrations/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL:=/bin/bash
PROJECT_NAME ?= kotsadm-migrations
RQLITE_TAG ?= 7.21.4
SCHEMAHERO_TAG ?= 0.14.0
SCHEMAHERO_TAG ?= 0.16.0

.PHONY: schema-alpha
schema-alpha: IMAGE = kotsadm/${PROJECT_NAME}:alpha
Expand Down
8 changes: 4 additions & 4 deletions pkg/image/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package image
// image name.

const (
Minio = "minio/minio:RELEASE.2023-09-23T03-47-50Z"
Mc = "minio/mc:RELEASE.2023-09-22T05-07-46Z"
Minio = "minio/minio:RELEASE.2023-10-25T06-33-25Z"
Mc = "minio/mc:RELEASE.2023-10-24T21-42-22Z"
Rqlite = "rqlite/rqlite:7.21.4"
Dex = "ghcr.io/dexidp/dex:v2.37.0"
Schemahero = "schemahero/schemahero:0.14.0"
Lvp = "replicated/local-volume-provider:v0.5.4"
Schemahero = "schemahero/schemahero:0.16.0"
Lvp = "replicated/local-volume-provider:v0.5.5"
)
2 changes: 1 addition & 1 deletion pkg/kotsadm/objects/minio_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func migrateToMinioXlInitContainers(deployOptions types.DeployOptions, resourceR

return []corev1.Container{
{
Image: GetAdminConsoleImage(deployOptions, "minio-client"),
Image: GetAdminConsoleImage(deployOptions, "kotsadm"),
ImagePullPolicy: corev1.PullIfNotPresent,
Name: "copy-minio-client",
Command: []string{
Expand Down
2 changes: 1 addition & 1 deletion pkg/kotsadm/objects/scripts/copy-minio-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ fi

echo "copying minio client binary to migration directory and preserving permissions"
mkdir -p $KOTSADM_MINIO_MIGRATION_DIR/bin
cp /usr/bin/mc $KOTSADM_MINIO_MIGRATION_DIR/bin/mc
cp /usr/local/bin/mc $KOTSADM_MINIO_MIGRATION_DIR/bin/mc
Loading