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

Issues Setting Prometheus Integration Environment Variables in MinIO Kubernetes helm chart #2358

Closed
SyntaxJuggler opened this issue Nov 17, 2024 · 3 comments

Comments

@SyntaxJuggler
Copy link

NOTE

If this case is urgent, please subscribe to Subnet so that our 24/7 support team may help you faster.

General Summary

I am experiencing an issue where I am unable to set specific environment variables necessary for Prometheus integration within the MinIO management panel despite following the configuration guidelines.

Expected Behavior

I expect to set MINIO_PROMETHEUS_URL and MINIO_PROMETHEUS_JOB_ID environment variables to display Prometheus metrics on the MinIO control panel.

Current Behavior

Despite setting the environment variables in a Kubernetes Secret and through Helm chart values as described in the documentation, they are not being recognized or applied within the MinIO deployment. When checking the environment variables using kubectl exec and viewing the /tmp/minio/config.env, the specified variables are not present or contain incorrect values.

Possible Solution

Not obligatory, but suggest a fix/reason for the bug, or ideas how to implement the addition or change.

Steps to Reproduce (for bugs)

  1. Set up the Kubernetes Secret with the following values:
    apiVersion: v1
    kind: Secret
    type: Opaque
    metadata:
      name: minio-config-secret
    stringData:
      config.env: |
        export MINIO_PROMETHEUS_URL='http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090'
        export MINIO_PROMETHEUS_JOB_ID="minio-job"
    
  2. Deploy MinIO using Helm with the following value set for existingSecret: true.
  3. Check the environment variables using kubectl exec <pod-name> -- env
  4. Check the file /tmp/minio/config.env.

Context

I am trying to integrate Prometheus with MinIO to monitor performance metrics directly from the MinIO console but am unable to do so due to this issue.

Regression

No

Your Environment

  • Version used (minio --version):
  • Server setup and configuration:
  • Operating System and version (uname -a):
@harshavardhana harshavardhana transferred this issue from minio/minio Nov 19, 2024
@allanrogerr
Copy link
Contributor

What operator and minio version are you using?
What documentation are you referring to?

@allanrogerr
Copy link
Contributor

This was discussed in #1795
Please remove any quotes from your env. vars.

Try the following example
Edit your tenant values yaml to be similar to:

tenant:
  configuration:
    name: my-existing-secret
  configSecret:
    existingSecret: true
helm install --namespace tenant1 --create-namespace tenant1

kubectl -n tenant1 delete secret/my-existing-secret
cat <<EOF > my-existing-secret.yaml
apiVersion: v1
kind: Secret
type: Opaque
metadata:
  namespace: tenant1
  name: my-existing-secret
stringData:
  config.env: |-
    export MINIO_ROOT_USER=ROOTUSERNAME
    export MINIO_ROOT_PASSWORD=ROOTUSERPASSWORD
    export MINIO_PROMETHEUS_URL=<your domain>
    export MINIO_PROMETHEUS_JOB_ID=minio-job
EOF
kubectl create -f my-existing-secret.yaml

Let me know if this helps.

@cesnietor
Copy link
Contributor

please feel free to reopen if the issue persists after trying the suggested solution.

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

3 participants