diff --git a/operations/helm/charts/mimir-distributed/Chart.lock b/operations/helm/charts/mimir-distributed/Chart.lock index 65bbf937b56..dca375a4bc9 100644 --- a/operations/helm/charts/mimir-distributed/Chart.lock +++ b/operations/helm/charts/mimir-distributed/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: minio repository: https://charts.min.io/ - version: 5.0.14 + version: 5.2.0 - name: grafana-agent-operator repository: https://grafana.github.io/helm-charts version: 0.4.1 - name: rollout-operator repository: https://grafana.github.io/helm-charts version: 0.16.0 -digest: sha256:33a6495669844c9ad8267291176412654af09f06a065db3a254a5f9f170dd050 -generated: "2024-08-05T06:39:45.824005102Z" +digest: sha256:399a73aea75bbbc711584c181308863fde65da18fe04bafcd4c0352d113f94c5 +generated: "2024-08-23T05:38:22.662648712Z" diff --git a/operations/helm/charts/mimir-distributed/Chart.yaml b/operations/helm/charts/mimir-distributed/Chart.yaml index b41a2281974..f08444e3eb5 100644 --- a/operations/helm/charts/mimir-distributed/Chart.yaml +++ b/operations/helm/charts/mimir-distributed/Chart.yaml @@ -9,7 +9,7 @@ name: mimir-distributed dependencies: - name: minio alias: minio - version: 5.0.14 + version: 5.2.0 repository: https://charts.min.io/ condition: minio.enabled - name: grafana-agent-operator diff --git a/operations/helm/charts/mimir-distributed/README.md b/operations/helm/charts/mimir-distributed/README.md index 262520680d6..dd08dd8ade8 100644 --- a/operations/helm/charts/mimir-distributed/README.md +++ b/operations/helm/charts/mimir-distributed/README.md @@ -24,7 +24,7 @@ Kubernetes: `^1.20.0-0` | Repository | Name | Version | |------------|------|---------| -| https://charts.min.io/ | minio(minio) | 5.0.14 | +| https://charts.min.io/ | minio(minio) | 5.2.0 | | https://grafana.github.io/helm-charts | grafana-agent-operator(grafana-agent-operator) | 0.4.1 | | https://grafana.github.io/helm-charts | rollout_operator(rollout-operator) | 0.16.0 | diff --git a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 3295b662546..a6c838efdee 100644 --- a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: gateway-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-enterprise-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index cac98fa5bc4..b3ffd078648 100644 --- a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-enterprise-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-enterprise-values heritage: Helm spec: diff --git a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 9a623af4e0d..b0be33df664 100644 --- a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-enterprise-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: gateway-enterprise-values annotations: - checksum/secrets: e4b52e15d614ff34251a0ff592f442e4106a23e5c58d765e10e9558aa5e68ed4 - checksum/config: ad79cceb30d1a6dfaeeb4113b927d28a12a8823620024d72873ae1940c9d4b32 + checksum/secrets: 4634e8fa4e88b28d0589ae2969f508011cb59399aa38602a36718dec4e6aee31 + checksum/config: 17e9e037408100f3834c8e6c5773e6faf41c970f97beec11f7e82b65d41ed99a spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index e295e015f17..6f776cebec7 100644 --- a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-enterprise-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-enterprise-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 75609724516..f3acb4bdb79 100644 --- a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-enterprise-values heritage: Helm spec: diff --git a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index afbe1fb0a3a..1d4e1a12711 100644 --- a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-enterprise-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 63fbefc7840..df1f77a1b7f 100644 --- a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-enterprise-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index de2f2ada499..5fc26b2bf16 100644 --- a/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/gateway-enterprise-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: gateway-enterprise-values-mimir-make-minio-buckets-5.0.14 + name: gateway-enterprise-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: gateway-enterprise-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index bdf3ce7fd22..e1fff1ef9af 100644 --- a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: gateway-nginx-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-nginx-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index 94a9a087084..ff76225947e 100644 --- a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-nginx-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-nginx-values heritage: Helm spec: diff --git a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 9bbdbbd45a1..2295be9039e 100644 --- a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-nginx-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-nginx-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: gateway-nginx-values annotations: - checksum/secrets: abcaf9b2c4ea7db35628be51996fd0c48ea9e5f15de12b8a220c77f76c9aa1d0 - checksum/config: 2f4416d7866c8963263db9d235c3a966fea9c994614ef33264474adba1e27def + checksum/secrets: bc6cb01d9198e0b011791fd7e9c650878f8398ef31c454c1e61d40dc5c070d87 + checksum/config: 11d8fc3df6f9b48d35109437d5962133bc62dfd5e51440c5f1c7f400d7a78de2 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 44b6fede1ee..d7ed877a6e6 100644 --- a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-nginx-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-nginx-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index e50a7ea7159..452bb9f01e3 100644 --- a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-nginx-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-nginx-values heritage: Helm spec: diff --git a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index e859fab4265..9542695389f 100644 --- a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-nginx-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-nginx-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 39c9d0eb605..04eeae3f5e6 100644 --- a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: gateway-nginx-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: gateway-nginx-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 0d6c777db53..b00e75dc62f 100644 --- a/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/gateway-nginx-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: gateway-nginx-values-mimir-make-minio-buckets-5.0.14 + name: gateway-nginx-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: gateway-nginx-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 4969701f5be..6f56afc3fd1 100644 --- a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: graphite-enabled-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: graphite-enabled-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index a773f90e083..ffed4b72c2b 100644 --- a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: graphite-enabled-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: graphite-enabled-values heritage: Helm spec: diff --git a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 0f4a9cd5261..71f7525df9c 100644 --- a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: graphite-enabled-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: graphite-enabled-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: graphite-enabled-values annotations: - checksum/secrets: 545fbc32bd7ff7e1401207d79924ed32e95c84173658cd23028f18854e928aab - checksum/config: 00303abe67d4352d4c5ec69c61f51ddf70ebb97c649e140cde0d85bebf6839f4 + checksum/secrets: 5b85a1d9aea245d0ea765072e06bd83793f3b31e847360c8bb6a35123020eba5 + checksum/config: e89de3dfe5b80c57c364e1d521daf0022d7628354c01a68c5c6300ed97dc7b25 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 59b3b854667..a0678f5f8fb 100644 --- a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: graphite-enabled-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: graphite-enabled-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 1101bb062d0..ec1bf39ae09 100644 --- a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: graphite-enabled-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: graphite-enabled-values heritage: Helm spec: diff --git a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 96c15258112..5e1268bd8bd 100644 --- a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: graphite-enabled-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: graphite-enabled-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 1875f8deb45..f8140bd392a 100644 --- a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: graphite-enabled-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: graphite-enabled-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index bd51297add4..d423d16366a 100644 --- a/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/graphite-enabled-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: graphite-enabled-values-mimir-make-minio-buckets-5.0.14 + name: graphite-enabled-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: graphite-enabled-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 04048ea1622..3d847c78adf 100644 --- a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: keda-autoscaling-global-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-global-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index f6eea97cb6d..ef7991b1b5b 100644 --- a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-global-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-global-values heritage: Helm spec: diff --git a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 413a8081193..1c595f7168e 100644 --- a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-global-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-global-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: keda-autoscaling-global-values annotations: - checksum/secrets: 5ca773d7b510a66ffbd530dbac05437cccfe3ec12f2f2ab6b763527b0d29500c - checksum/config: 4edc1371972f640d1f8710c65a61af9fc400bb19d3bdf1260413cafb836a9cb7 + checksum/secrets: 3dd65a2aa265220aeeddd3a98b5f01f1665604ac26faf3ed20eb6357bc3d17a8 + checksum/config: cdb40d189030cc1567bc6ed424a2e1a88230e6a6fd5d7d287bf9417d5f8fc1d6 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 5c7224abda9..534459777d7 100644 --- a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-global-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-global-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 3a2d5d367e7..a64e71c2420 100644 --- a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-global-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-global-values heritage: Helm spec: diff --git a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 63c822d9e75..1bc47edd669 100644 --- a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-global-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-global-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/service.yaml index e94d4a8ff4e..0dca949981c 100644 --- a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-global-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-global-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index e47dd417c5f..f98c8b7cc6a 100644 --- a/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/keda-autoscaling-global-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: keda-autoscaling-global-values-mimir-make-minio-buckets-5.0.14 + name: keda-autoscaling-global-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: keda-autoscaling-global-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 74dd3131494..2abb958abfd 100644 --- a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: keda-autoscaling-metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-metamonitoring-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index e7de1c27847..5afeb7de1c0 100644 --- a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-metamonitoring-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-metamonitoring-values heritage: Helm spec: diff --git a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index ff8f96e271d..5134f5ad74e 100644 --- a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-metamonitoring-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: keda-autoscaling-metamonitoring-values annotations: - checksum/secrets: de8a82395dac65491c35efc0125967b2b004ce65fc0a2a1c886b0faa97c71fcc - checksum/config: 10ad5c27c9190d0529bb1f1d04cbb2d3c39a5b1e597c1566a15d2be75efcc802 + checksum/secrets: fb484fcbd8a13e9c1696a5969cca33623f513e4ba3d9fc971a34e1f4fbfdddfc + checksum/config: 7ad1064b592036b75e580084a1fa66f3178a2e9a82f3da84fad8ccec214e14a5 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 1ebf5bf3c9d..4db1ce66ec7 100644 --- a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-metamonitoring-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-metamonitoring-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 803354240cd..b229b089358 100644 --- a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-metamonitoring-values heritage: Helm spec: diff --git a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index b0cee49f8f8..4d712808ffb 100644 --- a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-metamonitoring-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/service.yaml index eb858312ba0..514d85561cd 100644 --- a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-metamonitoring-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 8738d73ff97..50056c1c0f1 100644 --- a/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/keda-autoscaling-metamonitoring-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: keda-autoscaling-metamonitoring-values-mimir-make-minio-buckets-5.0.14 + name: keda-autoscaling-metamonitoring-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: keda-autoscaling-metamonitoring-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 0200d49a75c..ccf9398e77c 100644 --- a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: keda-autoscaling-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index 60c2e90c7b5..de3e34e8345 100644 --- a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-values heritage: Helm spec: diff --git a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 7f6a1e87608..827b4636210 100644 --- a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: keda-autoscaling-values annotations: - checksum/secrets: 9320cfac2af83051779ce527e6bd973f8c624f5096262bf094e9cbd909f76d8f - checksum/config: f9d005cbbc5c7b2117ab56e60ffd4965fb496b88bc54cafd66034d02cc6a77f9 + checksum/secrets: 8a54e82fe2b9c47bf075b198a0c882b9a97997f80dc788673561d1afe7423a00 + checksum/config: 3486eeabb67a4c75d4344537469706568b51333c5b530738f7619229366687bb spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index e9c8fb027d9..ca147b822b6 100644 --- a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 11bc1f947d9..ce39d848027 100644 --- a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-values heritage: Helm spec: diff --git a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 04595ba6686..3601b5985c8 100644 --- a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/service.yaml index d1619c6f939..97987ef1570 100644 --- a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: keda-autoscaling-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: keda-autoscaling-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 418f4918bdb..ff7e0ddc23e 100644 --- a/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/keda-autoscaling-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: keda-autoscaling-values-mimir-make-minio-buckets-5.0.14 + name: keda-autoscaling-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: keda-autoscaling-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index d9cc508788a..ede258a48c9 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: metamonitoring-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index cfd73be2be8..a781de80307 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: metamonitoring-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: metamonitoring-values heritage: Helm spec: diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index cd3bfb3fbd5..4a6577f4766 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: metamonitoring-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: metamonitoring-values annotations: - checksum/secrets: fb38487b7932ff939a243eacaf1ca0c16e1799e76cd56f0ce7bdb31386268a9c - checksum/config: 7bd76d5586d064605c14e21a812db02c6f3857279202bedc8fce2eb44565b4a4 + checksum/secrets: e24157698bdd5ff3d9fb73ed3c2bb2fdc169c9690916dc0950c8e6ae61361c62 + checksum/config: ecfbd42658d285789cd470c0bde1f56d3773105e4991b46aea3ccb65367457ee spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index d7ef0610c5e..110579d0796 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: metamonitoring-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: metamonitoring-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index cb91c295e90..8f7c0626090 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: metamonitoring-values heritage: Helm spec: diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index cd0f18f3c83..bc54f546172 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: metamonitoring-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 3e1103496ad..0dd4d0edda1 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: metamonitoring-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: metamonitoring-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index b6e827753f6..6eb3fef7b08 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: metamonitoring-values-mimir-make-minio-buckets-5.0.14 + name: metamonitoring-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: metamonitoring-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 8ac81d5b093..c83d642a2d6 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-enterprise-configmap-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-configmap-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index f63723b65a4..698c47afa7f 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-configmap-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-configmap-values heritage: Helm spec: diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 60ca71047d8..3ffd59f9fb6 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-configmap-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-configmap-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-enterprise-configmap-values annotations: - checksum/secrets: 967789519b41836921914d80cddb1027c1199821c7ea053bb25dce64bc3719f9 - checksum/config: efd17deb2a661f384a83562c80bea3856469da972ac9db4bea5f13857c7b9c89 + checksum/secrets: 5d5920ea002920ae3047c9d054e8cdc0b0ea2c0d671dc8a71f17e3bcc84b2df1 + checksum/config: 020b3256212a57eb52c2d17f7a3ea3383ada94276a7f7e7fca0dd998b917cc7f spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 0cfb6d7e100..c80e773fd3c 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-configmap-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-configmap-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 9fa19e7a01d..7a7a8e4e0f2 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-configmap-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-configmap-values heritage: Helm spec: diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 0a7ff826607..e83964200f2 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-configmap-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-configmap-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 2b167d4cc86..5f070e137aa 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-configmap-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-configmap-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 7c52a6bc83e..6ef8bf3171c 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-enterprise-configmap-values-mimir-make-minio-buckets-5.0.14 + name: test-enterprise-configmap-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-enterprise-configmap-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index f35408027fd..2bc79838742 100644 --- a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-enterprise-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-k8s-1.25-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index 7a3b9c53561..87533929ece 100644 --- a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-k8s-1.25-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-k8s-1.25-values heritage: Helm spec: diff --git a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 7c2b20bb21b..6c0c1568767 100644 --- a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-k8s-1.25-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-enterprise-k8s-1.25-values annotations: - checksum/secrets: 964484ebf812e70d928a5c88cf762bb8f7f2bad560ac89a0ea3b831324434af6 - checksum/config: ff04929b2244140ecab055e5f8693219fe86116fd226724fdbf9e6dacdcc8ec7 + checksum/secrets: 584b9c170eda7f521d56fce6d46ce3f1a760c6aefc711f93e6ce925f2be639aa + checksum/config: 7bcc734a31f97b966e92e17dbef5cdf70fe3934134b82e053cd169758bc8a8c9 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 27873de0f80..fc1de90be58 100644 --- a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-k8s-1.25-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-k8s-1.25-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 87dfa8232ab..600b4045497 100644 --- a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-k8s-1.25-values heritage: Helm spec: diff --git a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index f8f851fe115..1e0a60e10f6 100644 --- a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-k8s-1.25-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 70c391daec9..7e54663b7bb 100644 --- a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-k8s-1.25-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 1653c8bddb4..10cca3f6d95 100644 --- a/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-enterprise-k8s-1.25-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-enterprise-k8s-1.25-values-mimir-make-minio-buckets-5.0.14 + name: test-enterprise-k8s-1.25-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-enterprise-k8s-1.25-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 37dcdc690f7..3d52fa5187a 100644 --- a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-enterprise-legacy-label-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-legacy-label-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index c72093a239b..2f5b5e4d0e9 100644 --- a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-legacy-label-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-legacy-label-values heritage: Helm spec: diff --git a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 2d2dff1eece..e43a728975f 100644 --- a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-legacy-label-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-legacy-label-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-enterprise-legacy-label-values annotations: - checksum/secrets: 1b8bd095e5db5e240fd4efaa94ea91455ee88ea3539e056bb1d6b55710ef1dde - checksum/config: 14247d8260d49cdfff7b0192c73c8584ddac040809273f65e8210773b0589056 + checksum/secrets: df7f135ec8c5148c96dfe9085669561aff8c6196ad96af0707f74941fa7e0f6e + checksum/config: 943613d35d83acb2ed9519a7fc3b203ff606d85b347c23e86a652b82ce0daedb spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 73d7e2873a8..205b09d20a7 100644 --- a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-legacy-label-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-legacy-label-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 2a65246b0f3..f3daf6af485 100644 --- a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-legacy-label-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-legacy-label-values heritage: Helm spec: diff --git a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 4721d61c973..c87f5504723 100644 --- a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-legacy-label-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-legacy-label-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/service.yaml index a066eb79918..6e753f677d0 100644 --- a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-legacy-label-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-legacy-label-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 8ea11f72a16..d1fd5acc604 100644 --- a/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-enterprise-legacy-label-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-enterprise-legacy-label-values-enterprise-metrics-make-minio-buckets-5.0.14 + name: test-enterprise-legacy-label-values-enterprise-metrics-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-enterprise-legacy-label-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index ccbaf506bcb..4169bb180bf 100644 --- a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index aaff76ec72f..84d0bafc4b3 100644 --- a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-values heritage: Helm spec: diff --git a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 97e94bd15b1..fcc29ba0f02 100644 --- a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-enterprise-values annotations: - checksum/secrets: 383b98ad64222dbccadf7a045b04c896dd9ea4b2840dbf90187279eb8065916c - checksum/config: 6ec5d52291c23eca704d4a5f34fce18d41324491755f2af69bbc420b50ce6827 + checksum/secrets: 430eced5b17007e939b733c6fd7d329cdf69659570302b51d4362ca3972883f4 + checksum/config: c3784a66dfdd689b799834c072acce726a0dcc08044325f4b254625c58677686 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index c2c1d63bd5d..ee57f43784a 100644 --- a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 0385bd4e271..69143839221 100644 --- a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-values heritage: Helm spec: diff --git a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 6c6c578545f..5849abcdaf3 100644 --- a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 205cb3c5aa1..679180c0fa0 100644 --- a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-enterprise-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-enterprise-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 9ef6ea7a5f2..d8081749ddb 100644 --- a/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-enterprise-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-enterprise-values-mimir-make-minio-buckets-5.0.14 + name: test-enterprise-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-enterprise-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 39002a91213..1c2d950e66d 100644 --- a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-ingress-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ingress-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index c76c7d8cfe3..0add2072cac 100644 --- a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-ingress-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ingress-values heritage: Helm spec: diff --git a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 15154650f1e..fe30aa94013 100644 --- a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-ingress-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ingress-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-ingress-values annotations: - checksum/secrets: 364807ae09f2c0d0043df9b39045d6ccc478ba8abfcabcab3fb8b61fa9c6046e - checksum/config: b3487cf30beadd61fe0bebbf7bbb3c8a95762e7c9e54e87b847471cc6fd5e241 + checksum/secrets: 3a36702d389c24c8ea22120b361d08d1e34abad4e5821d9969eacadf017d6f9a + checksum/config: aa90f4e9d1a7c47c4d4e808efeb88020842503c4ac833793ebc73723a649093c spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index fe7d31bcb1a..fcf0a6ad5ef 100644 --- a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-ingress-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ingress-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 19b2f419a78..499fb31c814 100644 --- a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-ingress-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ingress-values heritage: Helm spec: diff --git a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 2864fb0a374..c3afd887cb2 100644 --- a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-ingress-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ingress-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 075f4ea4590..be6ced59386 100644 --- a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-ingress-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ingress-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index a174d460138..73ca4ca6e88 100644 --- a/operations/helm/tests/test-ingress-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-ingress-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-ingress-values-mimir-make-minio-buckets-5.0.14 + name: test-ingress-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-ingress-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 0e5d78d3c79..ee61611d55a 100644 --- a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-oss-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-k8s-1.25-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index 2c259d52db7..5b9dbc239ce 100644 --- a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-k8s-1.25-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-k8s-1.25-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 46425256ef0..de768d92773 100644 --- a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-k8s-1.25-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-oss-k8s-1.25-values annotations: - checksum/secrets: 6b369ed2bb0856cd875e87fadd8be75a392dfc6ac67aaad874cc9ce5007c7470 - checksum/config: 96d3f205e868d000126e6dfbff5395e3d1a29badd20346eab405a5faade1524a + checksum/secrets: 48afbcc71eace1264a75c1781a88681e5eba96bd67452ba2b22820a4d008336a + checksum/config: 760be7597c91e1e5f8fc6c9eafbbe49ec367824005616cc418b8098ec50a80bd spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 96eadb06ba9..255a23bcf08 100644 --- a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-k8s-1.25-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-k8s-1.25-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 72e5e8765e0..eb012336223 100644 --- a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-k8s-1.25-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index fe8e5cf9861..1018c57a3d9 100644 --- a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-k8s-1.25-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 102c2a48634..a038de27d0b 100644 --- a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-k8s-1.25-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-k8s-1.25-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 6e86cca4e46..3725b79f0c2 100644 --- a/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-oss-k8s-1.25-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-oss-k8s-1.25-values-mimir-make-minio-buckets-5.0.14 + name: test-oss-k8s-1.25-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-oss-k8s-1.25-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index d4d85cf655f..ab7e3ddb239 100644 --- a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-oss-logical-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-logical-multizone-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index e14c1ad8815..23e31a08e55 100644 --- a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-logical-multizone-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-logical-multizone-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 6bcc408a6e0..4312b39a6de 100644 --- a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-logical-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-logical-multizone-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-oss-logical-multizone-values annotations: - checksum/secrets: a00390ce8e4dd432408dd6203507322a50bcada86e5399b3df02d6bf3ee5acf9 - checksum/config: 657a48eb902c69b83986b720ff9d101131d5b3730e04737701ac3a75cea8d6c4 + checksum/secrets: 6c2ffbccd6eea048cfc806c8bdca43ae473fa107df9d14aa24f57090ff8e514a + checksum/config: 96a8184b254edce212a7368cb7828f817019508d9f0b0356132f6a6caa20f11d spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index f3466efbacf..43c86a1f0d7 100644 --- a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-logical-multizone-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-logical-multizone-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index a899afacbee..2bc992b3a08 100644 --- a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-logical-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-logical-multizone-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index cbdd5fd3fa3..8d28a05c4ec 100644 --- a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-logical-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-logical-multizone-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/service.yaml index c55462ee07e..429bd56c0de 100644 --- a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-logical-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-logical-multizone-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 3e5db6d322f..002b42d770c 100644 --- a/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-oss-logical-multizone-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-oss-logical-multizone-values-mimir-make-minio-buckets-5.0.14 + name: test-oss-logical-multizone-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-oss-logical-multizone-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index b8db9dab315..29c766f8ed8 100644 --- a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-oss-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-multizone-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index 4751e79f090..a7ebc9c55c3 100644 --- a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-multizone-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-multizone-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 896dccc8df1..3a03eb96aa6 100644 --- a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-multizone-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-oss-multizone-values annotations: - checksum/secrets: 5ad335e35445148157c8c06259dfe701b6af31a7a37cefceea742eb16432d76a - checksum/config: 9ea25e24603a12c086de56803d1228680c31370ccebc0b929a839094ea7e19df + checksum/secrets: 132017329169d8cee546e36cb270e232cf747772803dc53a46546f9b3cc6e98d + checksum/config: aea22ec7e56b8cbe08b69d384a6f279b6c396291f748322a00121dbe89330d42 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index a198e117734..f56e3b1ac53 100644 --- a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-multizone-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-multizone-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index f7ef2864339..608d2050767 100644 --- a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-multizone-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 7d170769235..3d657c21c13 100644 --- a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-multizone-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 5557b29fc42..68bbc65cfd3 100644 --- a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-multizone-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-multizone-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 72c7f43b572..2cadc2c7739 100644 --- a/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-oss-multizone-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-oss-multizone-values-mimir-make-minio-buckets-5.0.14 + name: test-oss-multizone-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-oss-multizone-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index ca324d4571e..816978fe178 100644 --- a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-oss-topology-spread-constraints-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-topology-spread-constraints-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index a1651835bd4..c25eea0ba31 100644 --- a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-topology-spread-constraints-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-topology-spread-constraints-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 036798d9763..cd3c442c6f3 100644 --- a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-topology-spread-constraints-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-topology-spread-constraints-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-oss-topology-spread-constraints-values annotations: - checksum/secrets: 08ff5e5a53040c4cf9200dff17541f4cdc3e80e1728953afa758878956ea151c - checksum/config: 42cacda08d76f6cbb4c80157776a3b88672edbdd9c79829980ad7d43e1fecfa8 + checksum/secrets: c036403f919e8acaab400ce69701243acae9d0383639fc2663cb58181e729532 + checksum/config: 20a733b1aa091c1ac330e7a54be2de63b7c5d1d8f25bd1179006713fbd464c55 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index d49f9c27ee4..0c2a4623e10 100644 --- a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-topology-spread-constraints-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-topology-spread-constraints-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 307c48ccf3c..5f76ba00013 100644 --- a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-topology-spread-constraints-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-topology-spread-constraints-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index b422182d636..a8ca455f4cf 100644 --- a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-topology-spread-constraints-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-topology-spread-constraints-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 4144202589e..d8a0a3bf501 100644 --- a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-topology-spread-constraints-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-topology-spread-constraints-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index a6c5c3ed2ee..5d922678237 100644 --- a/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-oss-topology-spread-constraints-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-oss-topology-spread-constraints-values-mimir-make-minio-buckets-5.0.14 + name: test-oss-topology-spread-constraints-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-oss-topology-spread-constraints-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 92d881cab6b..ab3a37dcb87 100644 --- a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-oss-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index c8bd33bed94..80dd128cadf 100644 --- a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index f7d8981f6ae..d569a446100 100644 --- a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-oss-values annotations: - checksum/secrets: c0db830468076538c64d07474a7f5d3af6ee60f56e614c6168700719485cee45 - checksum/config: f916e8f37013b613a601f7ea7567a9f206a7909493e272207249200960adad83 + checksum/secrets: e61d0782ef25f3d7719a5c673fc721641c4bccd3d80af0523e00b3a237901935 + checksum/config: ca42f2be8a453d9219accf095b9d9c109b36a6b23a7e16118d458920ad7b8041 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 2ebed6dd750..5a7d50eca2f 100644 --- a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index bd48c2ce524..8832596e017 100644 --- a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-values heritage: Helm spec: diff --git a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index a82e17bb7e4..6628947646f 100644 --- a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 26b61a6d019..29efe626510 100644 --- a/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-oss-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-oss-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-oss-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-oss-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-oss-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index cd1f6622d38..f70ed7e090c 100644 --- a/operations/helm/tests/test-oss-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-oss-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-oss-values-mimir-make-minio-buckets-5.0.14 + name: test-oss-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-oss-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 90400ccdf11..9e339cb5013 100644 --- a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-requests-and-limits-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-requests-and-limits-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index 2e455017e50..052871328ec 100644 --- a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-requests-and-limits-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-requests-and-limits-values heritage: Helm spec: diff --git a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index b630df64e9a..9f268232a82 100644 --- a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-requests-and-limits-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-requests-and-limits-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-requests-and-limits-values annotations: - checksum/secrets: 6e3ae82c32886261a486ef424711edf4ce9b0fbb5b124d03327413d444f6538c - checksum/config: 01addfaa3b993cf71f25b142c22aa2c99f99cf44cb3ca9f1f0bba72bb2f56c65 + checksum/secrets: a539951d6f896787f4af980bd2cef5ad463aaab1616c10aff82f4ee0eb8a8b2d + checksum/config: 7e9c8454c47d42db8c2c7f18be09ccc8f2625fef6d029eb1a780c8927c0c7ac6 spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index f1ea0f16ccf..0ba1101c10e 100644 --- a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-requests-and-limits-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-requests-and-limits-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index f8e54c7efe1..bad3ba20d79 100644 --- a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-requests-and-limits-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-requests-and-limits-values heritage: Helm spec: diff --git a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index 23e3addbaf4..eaec7e8ed26 100644 --- a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-requests-and-limits-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-requests-and-limits-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 2cdc86c2cf6..ead0c68be32 100644 --- a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-requests-and-limits-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-requests-and-limits-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index 20074f4ace4..86702b1e4d5 100644 --- a/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-requests-and-limits-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-requests-and-limits-values-mimir-make-minio-buckets-5.0.14 + name: test-requests-and-limits-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-requests-and-limits-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 1bcd7a4ad5d..90aa59a23b4 100644 --- a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-ruler-dedicated-query-path-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ruler-dedicated-query-path-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index 33ffd212d13..07fc1cd88d6 100644 --- a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-ruler-dedicated-query-path-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ruler-dedicated-query-path-values heritage: Helm spec: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index d52ba80ad62..a607f54b4d0 100644 --- a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-ruler-dedicated-query-path-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ruler-dedicated-query-path-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-ruler-dedicated-query-path-values annotations: - checksum/secrets: c864730acd976c50ca058e41231e573051d6bf86d2b2b33dc6cb700c7a486b86 - checksum/config: ff6673ed46bcc10cd2f7415590914b57bca3e18fb10f654a021efd4ca72b864e + checksum/secrets: 698b9da177c408ed4140a408cf0bf56c64a7f40200d5a53c7ffd5f14098369b2 + checksum/config: 356c6e421642df8f71bec049161f155bf55972da1cb1069eb93bc67844cb435e spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index d2ef1d5cd0d..89232289658 100644 --- a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-ruler-dedicated-query-path-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ruler-dedicated-query-path-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 78320191f7d..ddc208eb5b5 100644 --- a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-ruler-dedicated-query-path-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ruler-dedicated-query-path-values heritage: Helm spec: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index a4f1ae37675..43b90196622 100644 --- a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-ruler-dedicated-query-path-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ruler-dedicated-query-path-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 9e8fd406e75..349110335c1 100644 --- a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-ruler-dedicated-query-path-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-ruler-dedicated-query-path-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index c138988555b..83c47a12677 100644 --- a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-ruler-dedicated-query-path-values-mimir-make-minio-buckets-5.0.14 + name: test-ruler-dedicated-query-path-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-ruler-dedicated-query-path-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: diff --git a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml index 59ea8261c05..d4c13648667 100644 --- a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml +++ b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -6,112 +6,111 @@ metadata: name: test-vault-agent-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-vault-agent-values heritage: Helm data: initialize: |- #!/bin/sh - set -e ; # Have script exit in the event of a failed command. + set -e # Have script exit in the event of a failed command. MC_CONFIG_DIR="/tmp/minio/mc/" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { - SCHEME=$1 - ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS = 0 ] - do - ATTEMPTS=`expr $ATTEMPTS + 1` ; - echo \"Failed attempts: $ATTEMPTS\" ; - if [ $ATTEMPTS -gt $LIMIT ]; then - exit 1 ; - fi ; - sleep 2 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 + SCHEME=$1 + ATTEMPTS=0 + LIMIT=29 # Allow 30 attempts + set -e # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) + SECRET=$(cat /config/rootPassword) + set +e # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" + $MC_COMMAND + STATUS=$? + until [ $STATUS = 0 ]; do + ATTEMPTS=$(expr $ATTEMPTS + 1) + echo \"Failed attempts: $ATTEMPTS\" + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 + fi + sleep 2 # 1 second intervals between attempts + $MC_COMMAND + STATUS=$? + done + set -e # reset `e` as active + return 0 } # checkBucketExists ($bucket) # Check if the bucket exists, by using the exit code of `mc ls` checkBucketExists() { - BUCKET=$1 - CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) - return $? + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1) + return $? } # createBucket ($bucket, $policy, $purge) # Ensure bucket exists, purging if asked to createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - VERSIONING=$4 - OBJECTLOCKING=$5 - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - ${MC} rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) - if ! checkBucketExists $BUCKET ; then - if [ ! -z $OBJECTLOCKING ] ; then - if [ $OBJECTLOCKING = true ] ; then - echo "Creating bucket with OBJECTLOCKING '$BUCKET'" - ${MC} mb --with-lock myminio/$BUCKET - elif [ $OBJECTLOCKING = false ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - fi - elif [ -z $OBJECTLOCKING ] ; then - echo "Creating bucket '$BUCKET'" - ${MC} mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - fi - - - # set versioning for bucket if objectlocking is disabled or not set - if [ $OBJECTLOCKING = false ] ; then - if [ ! -z $VERSIONING ] ; then - if [ $VERSIONING = true ] ; then - echo "Enabling versioning for '$BUCKET'" - ${MC} version enable myminio/$BUCKET - elif [ $VERSIONING = false ] ; then - echo "Suspending versioning for '$BUCKET'" - ${MC} version suspend myminio/$BUCKET - fi - fi - else - echo "Bucket '$BUCKET' versioning unchanged." - fi - - - # At this point, the bucket should exist, skip checking for existence - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - ${MC} anonymous set $POLICY myminio/$BUCKET + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET; then + echo "Purging bucket '$BUCKET'." + set +e # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET; then + if [ ! -z $OBJECTLOCKING ]; then + if [ $OBJECTLOCKING = true ]; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ]; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ]; then + if [ ! -z $VERSIONING ]; then + if [ $VERSIONING = true ]; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ]; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET } # Try connecting to MinIO instance diff --git a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml index fce5b7dced1..a5288b1547f 100644 --- a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml +++ b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -6,7 +6,7 @@ metadata: name: test-vault-agent-values-minio-console labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-vault-agent-values heritage: Helm spec: diff --git a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml index 795fb49f679..7b22003c9b6 100644 --- a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml +++ b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: test-vault-agent-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-vault-agent-values heritage: Helm spec: @@ -27,8 +27,8 @@ spec: app: minio release: test-vault-agent-values annotations: - checksum/secrets: 4fd1ec9dcd66b485f0952972fc6aeb2ffb035969aae524a9d14b62dc5b72b9c8 - checksum/config: 2fbf13c52e5ce9ce230a7bf7e495a4075df79c9ce7ec50ad41d81bc91376bdb1 + checksum/secrets: 6ce1ce042784730d69be24cdec5c9b62ae73f4ce55d0beae7915c13e2fd8991e + checksum/config: 6e9acf36130c3c93a8382e79860a069f5a1b61d7a6d61974a97c4fa19122040f spec: securityContext: runAsUser: 1000 @@ -39,7 +39,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio - image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + image: "quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z" imagePullPolicy: IfNotPresent command: - "/bin/sh" diff --git a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml index 64ec5579b24..009ce80506c 100644 --- a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml +++ b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -6,7 +6,7 @@ metadata: name: test-vault-agent-values-minio-post-job labels: app: minio-post-job - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-vault-agent-values heritage: Helm annotations: @@ -35,7 +35,7 @@ spec: serviceAccountName: minio-sa containers: - name: minio-make-bucket - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/initialize" ] env: @@ -54,7 +54,7 @@ spec: requests: memory: 128Mi - name: minio-make-user - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: [ "/bin/sh", "/config/add-user" ] env: diff --git a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml index 7dff3660ffc..80c7bf3872f 100644 --- a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml +++ b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -6,7 +6,7 @@ metadata: name: test-vault-agent-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-vault-agent-values heritage: Helm spec: diff --git a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml index a9218a13c45..2b456b804d5 100644 --- a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml +++ b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -6,7 +6,7 @@ metadata: name: test-vault-agent-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-vault-agent-values heritage: Helm type: Opaque diff --git a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/service.yaml index 1d577f5dd53..83e079a6fd5 100644 --- a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/service.yaml +++ b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -6,7 +6,7 @@ metadata: name: test-vault-agent-values-minio labels: app: minio - chart: minio-5.0.14 + chart: minio-5.2.0 release: test-vault-agent-values heritage: Helm monitoring: "true" diff --git a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml index ea20f526a52..2057492b0ed 100644 --- a/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml +++ b/operations/helm/tests/test-vault-agent-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -7,7 +7,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: test-vault-agent-values-mimir-make-minio-buckets-5.0.14 + name: test-vault-agent-values-mimir-make-minio-buckets-5.2.0 namespace: "citestns" labels: app: mimir-distributed-make-bucket-job @@ -31,7 +31,7 @@ spec: name: test-vault-agent-values-minio containers: - name: minio-mc - image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + image: "quay.io/minio/mc:RELEASE.2024-04-18T16-45-29Z" imagePullPolicy: IfNotPresent command: ["/bin/sh", "/config/initialize"] env: