Skip to content

minio console [bug] ensure non empty $HOME in deployments #1337

Allan Roger Reid edited this page Jan 25, 2023 · 1 revision

Status: Open

Pull Request

None

Issues

https://github.com/minio/operator/issues/1337

Steps: Add console endpoint

1a. Follow steps in https://github.com/allanrogerr/operator/wiki/%5Bbug%5D-ensure-non-empty-$HOME-in-deployments-%231337 to reproduce issue

b. Clone

git clone https://github.com/allanrogerr/console.git

c. Download swagger using instruction for "Static library" on:

https://github.com/go-swagger/go-swagger/blob/master/docs/install.md 

d. Install any missing dependencies e.g.

sudo apt-get install jq

e. Make swagger

cd console
make swagger-gen

f. Create image an push to docker repo

docker tag docker.io/minio/console:add-tenant-runtimeclass-dev allanrogerreid/console:add-tenant-runtimeclass-dev
docker push allanrogerreid/console:add-tenant-runtimeclass-dev

g. Clone and push operator. This has runtimeClassName enabled for tenants

git clone https://github.com/allanrogerr/operator.git
docker tag docker.io/minio/operator:head allanrogerreid/operator:add-tenant-runtimeclass-dev
docker push allanrogerreid/operator:add-tenant-runtimeclass-dev

h. In operator resources/base/console-ui.yaml, add reference to new image

i. In testing/deploy-tenant.sh edit out references to "kind"

j. Create tenant with sample curl command (extracted and modified from a previous command using the UI) Note the runtimeClassName

curl 'http://192.168.64.28:9090/api/v1/tenants' -X POST -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'Content-Type: application/json' -H 'Origin: http://192.168.64.28:9090' -H 'Connection: keep-alive' -H 'Referer: http://192.168.64.28:9090/tenants/add' -H 'Cookie: token=ADfZ7Rtk3Pn1aZKuXu+pwLsV13dpwlwJSUnhQmZdOfjefmXuhSJHeVwgju9fuf7PZhYmBE2CsggvgykJ5hKpfICbBgHzDPPuD7oe2SUAiHX5wtujSauNCO5P9R12qfed5KgDRVR+HDkL7snTMQjZ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XizeaIBpzcGBNTxS7AGAy3sj9+XOUs1nEd7wsZqY4kFdVwg67ZSfsL33cj5XFguRuspeXXJ2z7HL99nA10ZPH6EZRA54VxHNcLNvMYz20gRSKgTKhorKTMiDQONfA==' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data-raw '{"name":"test","namespace":"name","access_key":"","secret_key":"","access_keys":[],"secret_keys":[],"enable_tls":false,"enable_console":true,"enable_prometheus":true,"service_name":"","image":"","expose_minio":true,"expose_console":true,"pools":[{"name":"pool-0","servers":4,"volumes_per_server":1,"volume_configuration":{"size":4294967296,"storage_class_name":"local-path"},"securityContext":null,"affinity":{"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchExpressions":[{"key":"v1.min.io/tenant","operator":"In","values":["test"]},{"key":"v1.min.io/pool","operator":"In","values":["pool-0"]}]},"topologyKey":"kubernetes.io/hostname"}]}},"runtimeClassName": "crun","tolerations":[]}],"erasureCodingParity":4,"logSearchConfiguration":{"storageClass":"","storageSize":5,"image":"","postgres_image":"","postgres_init_image":"","securityContext":{"runAsUser":"1000","runAsGroup":"1000","fsGroup":"1000","fsGroupChangePolicy":"Always","runAsNonRoot":true},"postgres_securityContext":{"runAsUser":"999","runAsGroup":"999","fsGroup":"999","fsGroupChangePolicy":"Always","runAsNonRoot":true}},"prometheusConfiguration":{"storageClass":"","storageSize":5,"image":"","sidecar_image":"","init_image":"","securityContext":{"runAsUser":"1000","runAsGroup":"1000","fsGroup":"1000","fsGroupChangePolicy":"Always","runAsNonRoot":true}},"tls":{},"environmentVariables":[],"idp":{"keys":[{"access_key":"CmvQ7PnKtMdJXkPq","secret_key":"gTyOYgTSozI1mvcFlK30y6rPdUHOQQJu"}]}}'

k. Observe the tenant online and with pods using crun image image

l. Observe the same from runc and and empty runtimeClassName

Clone this wiki locally