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

How to add volumeMount for alertmanager and prometheus container #2164

Closed
shangjin92 opened this issue Nov 26, 2018 · 2 comments
Closed

How to add volumeMount for alertmanager and prometheus container #2164

shangjin92 opened this issue Nov 26, 2018 · 2 comments

Comments

@shangjin92
Copy link

What did you do?
I want to add volumeMount for alertmanager and prometheus container to change timezone. Because the UTC timezone is not friendly to me. While I edit alertmanager statefulset like this.

kubectl edit StatefulSet alertmanager-prometheus-operator-alertmanager -n monitor
volumeMounts:
- name: host-time
   mountPath: /etc/localtime
   readOnly: true

volumes:
- name: host-time
        hostPath:
          path: /etc/localtime

But it reported 'error: statefulsets.apps "alertmanager-prometheus-operator-alertmanager" is invalid'. Is there any way to add volumeMount to slove this error?

What did you expect to see?
I want to add volumeMount to alertmanager and prometheus container, to change timezone from UTC to GMT.

Environment

  • Prometheus Operator version:
    v0.25.0

  • Kubernetes version information:
    v1.11.2

@brancz
Copy link
Contributor

brancz commented Nov 26, 2018

I see now, sorry the two issues are related, host path volumes are dangerous though, I would prefer any other way really than that. The problem however is not really that we don't allow it, but Prometheus and Alertmanager fundamentally don't support timezone specific behavior, so even if you had the hostpath volume it would change nothing.

@shangjin92
Copy link
Author

I see now, sorry the two issues are related, host path volumes are dangerous though, I would prefer any other way really than that. The problem however is not really that we don't allow it, but Prometheus and Alertmanager fundamentally don't support timezone specific behavior, so even if you had the hostpath volume it would change nothing.

All right, I get it. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants