Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: update minio chart to use chainguard latest-dev images #31

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions chart/templates/minio-cm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: entrypoint-script
namespace: {{ .Release.Namespace }}
data:
docker-entrypoint.sh: |
#!/bin/sh
#

# If command starts with an option, prepend minio.
if [ "${1}" != "minio" ]; then
if [ -n "${1}" ]; then
set -- minio "$@"
fi
fi

docker_switch_user() {
if [ -n "${MINIO_USERNAME}" ] && [ -n "${MINIO_GROUPNAME}" ]; then
if [ -n "${MINIO_UID}" ] && [ -n "${MINIO_GID}" ]; then
chroot --userspec=${MINIO_UID}:${MINIO_GID} / "$@"
else
echo "${MINIO_USERNAME}:x:1000:1000:${MINIO_USERNAME}:/:/sbin/nologin" >>/etc/passwd
echo "${MINIO_GROUPNAME}:x:1000" >>/etc/group
chroot --userspec=${MINIO_USERNAME}:${MINIO_GROUPNAME} / "$@"
fi
else
exec "$@"
fi
}

## DEPRECATED and unsupported - switch to user if applicable.
docker_switch_user "$@"
24 changes: 24 additions & 0 deletions values/minio-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
replicas: 1
mode: standalone

image:
repository: cgr.dev/chainguard/minio
tag: latest-dev

mcImage:
repository: cgr.dev/chainguard/minio-client
tag: latest-dev

## Additional volumes to minio container
extraVolumes:
- name: entrypoint-script-volume
configMap:
name: entrypoint-script
defaultMode: 0777

## Additional volumeMounts to minio container
extraVolumeMounts:
- name: entrypoint-script-volume
mountPath: /usr/bin/docker-entrypoint.sh
subPath: docker-entrypoint.sh




# Some reasonable requests instead of the bonkers defaults
resources:
requests:
Expand Down