所以我从this tutorial安装了kube-prometheus-stack
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
kubectl create ns monitoring
helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring
kubectl get all -n monitoring然后我从git prometheus-community/helm-charts复制,修改values.yaml以满足我的需要(警报管理器之类的东西),然后运行以下命令来应用更新:
helm dependency update -n monitoring kube-prometheus-stack/ # one time
helm upgrade prometheus -n monitoring kube-prometheus-stack/现在我需要grafana来使用共享密码,我创建了一个basic-auth密钥作为入口:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: monitoring-ingress
namespace: monitoring
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
spec:
rules:
- host: monitor.blabla.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: prometheus-grafana.monitoring
port:
number: 80
tls:
- hosts:
- monitor.blabla.com
secretName: monitor.blabla.com-cert这些都很好用,但问题是,我需要更改grafana的内部配置(使其成为passwordless),正确/适当的方法是什么?

发布于 2021-04-17 01:02:46
我已经部署了Grafana的7.3.5版本,我只能通过完全删除登录屏幕来实现这一点。
在Grafana图表的values.yaml中查找grafana.ini级别。然后附加以下配置值对:
grafana.ini:
users:
viewers_can_edit: false
auth:
disable_login_form: false
disable_signout_menu: false
auth.anonymous:
enabled: true
org_role: Viewer来源:https://github.com/helm/charts/issues/10622#issuecomment-454397952
https://stackoverflow.com/questions/67127982
复制相似问题