簡體   English   中英

使用 istioctl 更改 IstioControlPlane 中的 grafana.ini

[英]Change grafana.ini in IstioControlPlane using istioctl

我在 Azure Kubernetes 集群(AKS)中運行 grafana(kiali、prometheus 和跟蹤)。 AKS 集群位於應用程序網關入口 Controller (AGIC) 后面,grafana pod 在 https://{domain}/grafana/ 之類的子路徑中運行。 我能夠通過 AGIC 位的入口訪問 grafana 服務,grafana pod 一直在 https://{domain}/ 而不是 https://{domain}/grafana/ 中搜索資源。 因此,我想更改 grafana.ini 中的屬性 root_url 以解決問題。 我怎么能做到這一點?

我正在使用以下命令在 AKS 中安裝 istio 1.6:

istioctl manifest apply -f istio.aks.yaml

我的 IstioControlPlane 如下所示:

 apiVersion: install.istio.io/v1alpha2 kind: IstioControlPlane spec: # Use the default profile as the base # More details at: https://istio.io/docs/setup/additional-setup/config-profiles/ profile: default components: pilot: k8s: resources: requests: cpu: 10m # override from default 500m memory: 40Mi #... default 2048Mi values: global: # Ensure that the Istio pods are only scheduled to run on Linux nodes defaultNodeSelector: beta.kubernetes.io/os: linux # Enable mutual TLS for the control plane controlPlaneSecurityEnabled: true mtls: # Require all service to service communication to have mtls enabled: false grafana: # Enable Grafana deployment for analytics and monitoring dashboards enabled: true security: # Enable authentication for Grafana enabled: false kiali: # Enable the Kiali deployment for a service mesh observability dashboard enabled: true resources: requests: cpu: 2m # override from default 500m tracing: # Enable the Jaeger deployment for tracing enabled: true jaeger: resources: requests: cpu: 2m # override from default 500m gateways: istio-ingressgateway: enabled: false prometheus: enabled: true resources: requests: cpu: 2m # override from default 500m

https://{domain}.com/grafana/ 的 grafana web 頁面返回下圖中的錯誤:

在此處輸入圖像描述

由於您使用 ItsioControlPlane CRD 部署 Grafana,因此您應該能夠通過更新以下 ENV 變量來更新清單。

    grafana:
      env:
        GF_SERVER_ROOT_URL: '%(protocol)s://%(domain)s:/grafana'

這將允許您更改其 ROOT URL 並使其在 Azure AppGW 后面正確服務

這是可用的,因為所有 itsio HelmChart 配置都映射到 CRD

https://istio.io/latest/blog/2019/introducing-istio-operator/#migration-from-helm

您還可以在 IstioControlPlane 自定義資源中設置 Helm 配置值。 有關詳細信息,請參閱使用 Helm 自定義 Istio 設置。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM