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

MinIO Operator v7.0.0 doesn't inherit annotations from the Tenant resource to the created Pods #2393

Closed
jorijn opened this issue Feb 10, 2025 · 3 comments

Comments

@jorijn
Copy link

jorijn commented Feb 10, 2025

MinIO Operator v7 doesn't inherit annotations from the Tenant resource to the created Pods.

Expected Behavior

In v6.0.4, the operator copies the labels and annotations from the Tenant resource to the created Pods.

Current Behavior

From v7.0.0 this behavior is broken. The annotations are not added to the Pods.

Context

We use Kyverno to mutate the Pod objects before they are created, based on the presence of certain annotations.

Your Environment

  • Version used (minio-operator): v7.0.0
  • Environment name and version (e.g. kubernetes v1.17.2): v0.32.7
  • Server type and version: Talos Linux

Snippet from the Tenant

apiVersion: minio.min.io/v2
kind: Tenant
metadata:
  name: minio
  namespace: minio-tenant
  annotations:
    inject-certs: enabled
    inject-certs-path: /tmp/certs/CAs/ # https://github.com/minio/minio/blob/master/docs/tls/README.md#4-install-certificates-from-third-party-cas
@ramondeklein
Copy link
Contributor

You should be able to use .tenant.poolsMetadata.annotations to set annotations on the statefulset, pods, ...

@ramondeklein
Copy link
Contributor

See also #2318.

@jorijn
Copy link
Author

jorijn commented Feb 10, 2025

Hi @ramondeklein - thanks. I didn't know this was bugged behavior, as I noticed this somewhere in the documentation as a feature.

Should anyone find this issue, the corrected spec should look like:

apiVersion: minio.min.io/v2
kind: Tenant
metadata:
  name: minio
  namespace: minio-tenant
spec:
  # [...]
  poolsMetadata:
    annotations:
      inject-certs: enabled
      inject-certs-path: /tmp/certs/CAs/ # https://github.com/minio/minio/blob/master/docs/tls/README.md#4-install-certificates-from-third-party-cas

@jorijn jorijn closed this as completed Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants