Closed celalsahin closed 3 years ago
@celalsahin Hi, this seems to be an issue with the current CRD you are using, can you please share the output of kubectl get crd tenants.minio.min.io -o yaml
command? It seems that the version of Operator you are currently using has a CRD that expects an object to be passed in the v1.TenantSpec.ExternalCertSecret
field but you are passing an array
Hi,
Just that you know how I got to this point/minio operator version - I just installed it via kubectl krew & I have 3.0.29, at least according to krew
[csahin@qp08c ~]$ kubectl krew info minio
NAME: minio
INDEX: default
URI: https://github.com/minio/operator/releases/download/v3.0.29/kubectl-minio_linux_amd64.zip
SHA256: efa9d6d91f2f746758ca700c070bf0e6ae390337a843a1e39c578ff2ead51653
VERSION: v3.0.29
HOMEPAGE: https://github.com/minio/operator/tree/master/kubectl-minio
DESCRIPTION:
The kubectl-minio plugin wraps the MinIO Operator and provides a simplified
interface to create and manage MinIO tenant clusters.
CAVEATS:
\
| * For resources that are not in default namespace, currently you must
| specify -n/--namespace explicitly (the current namespace setting is not
| yet used).
/
[csahin@qp08c ~]$
Here is the output for your question attached crd.log , as it is quite long.
Regards Celal
Please use latest minio operator release 4.0.6
and let us know how it goes
Expected Behavior
Creating a minio tenant following descriptions at https://github.com/minio/operator/blob/v3.0.29/docs/examples.md#minio-tenant-with-tls-via-customer-provided-certificates should result in a successfully created tenant, with customer provided certificates.
Current Behavior
Creating a minio tenant following descriptions at https://github.com/minio/operator/blob/v3.0.29/docs/examples.md#minio-tenant-with-tls-via-customer-provided-certificates results in error:
Also even using the provided example file at https://github.com/minio/operator/blob/v3.0.29/examples/tenant-with-custom-cert-encryption-disabled.yaml results in a very similar error (same error basically with the variables from example.yaml)
Possible Solution
Steps to Reproduce (for bugs)
openssl req -new -newkey rsa:2048 -sha256 -days 3650 -nodes -x509 -subj "/C=DE/ST=Bayern/L=Muenchen/O=Siemens AG/OU=SI/CN=minio.minios3.svc.cluster.local/emailAddress=celal.sahin@siemens.com" -keyout minio.minios3.svc.cluster.local.key -out minio.minios3.svc.cluster.local.crt
openssl req -new -newkey rsa:2048 -sha256 -days 3650 -nodes -x509 -subj "/C=DE/ST=Bayern/L=Muenchen/O=Siemens AG/OU=SI/CN=*.minios3.minios3.svc.cluster.local/emailAddress=celal.sahin@siemens.com" -keyout _wildcard.minios3.minios3.svc.cluster.local.key -out _wildcard.minios3.minios3.svc.cluster.local.crt
openssl req -new -newkey rsa:2048 -sha256 -days 3650 -nodes -x509 -subj "/C=DE/ST=Bayern/L=Muenchen/O=Siemens AG/OU=SI/CN=*.minios3-hl.minios3.svc.cluster.local/emailAddress=celal.sahin@siemens.com" -keyout _wildcard.minios3-hl.minios3.svc.cluster.local.key -out _wildcard.minios3-hl.minios3.svc.cluster.local.crt
oc create secret tls console-tls-cert --key="minios3-console.minios3.svc.cluster.local.key" --cert="minios3-console.minios3.svc.cluster.local.crt" oc create secret tls minio-buckets-cert --key="_wildcard.minios3.minios3.svc.cluster.local.key" --cert="_wildcard.minios3.minios3.svc.cluster.local.crt" oc create secret tls minio-hl-cert --key="_wildcard.minios3-hl.minios3.svc.cluster.local.key" --cert="_wildcard.minios3-hl.minios3.svc.cluster.local.crt" oc create secret tls minio-tls-cert --key="minio.minios3.svc.cluster.local.key" --cert="minio.minios3.svc.cluster.local.crt"
[csahin@qp08c minio]$ oc create -f tenant.yaml tenant.minio.min.io/minios3 created secret/minios3-creds-secret created secret/minios3-console-secret created [csahin@qp08c minio]$ kubectl minio tenant info --name minios3 --namespace minios3 Error: v1.Tenant.Spec: v1.TenantSpec.ExternalCertSecret: readObjectStart: expect { or n, but found [, error found in #10 byte of ...|tSecret":[{"name":"m|..., bigger context ...|me":"minios3-creds-secret"},"externalCertSecret":[{"name":"minio-tls-cert","type":"kubernetes.io/tls|... [csahin@qp08c minio]$