diff --git a/grafana/prod/alert-svc.yaml b/grafana/prod/alert-svc.yaml new file mode 100644 index 0000000..39a7edc --- /dev/null +++ b/grafana/prod/alert-svc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: grafana-alerting + namespace: guardian +spec: + type: ClusterIP + clusterIP: 'None' + ports: + - port: 9094 + selector: + app.kubernetes.io/instance: grafana + app.kubernetes.io/name: grafana diff --git a/grafana/prod/values.yaml b/grafana/prod/values.yaml index db30bf0..4d558c9 100644 --- a/grafana/prod/values.yaml +++ b/grafana/prod/values.yaml @@ -1,10 +1,11 @@ resources: limits: - cpu: 300m - memory: 300Mi + cpu: 500m + memory: 512Mi requests: cpu: 100m - memory: 128Mi + memory: 256Mi +replicas: 3 nodeSelector: rss3.io/usage: internal tolerations: @@ -14,8 +15,8 @@ tolerations: effect: "NoSchedule" persistence: type: pvc - enabled: true - storageClassName: alicloud-disk-essd + enabled: false + storageClassName: alicloud-disk-ssd size: 20Gi admin: existingSecret: "grafana-secrets" @@ -29,6 +30,11 @@ grafana.ini: domain: grafana.nsl.xyz root_url: "https://%(domain)s" serve_from_sub_path: false + database: + type: postgres + host: pgm-7go76ijtdor158l6195200.pg.rds.aliyuncs.com + user: grafana + name: grafana auth.generic_oauth: enabled: true name: Natural Selection Labs @@ -42,6 +48,12 @@ grafana.ini: api_url: https://account.nsl.xyz/auth/realms/google/protocol/openid-connect/userinfo signout_redirect_url: https://account.nsl.xyz/auth/realms/google/protocol/openid-connect/logout?redirect_uri=https%3A%2F%2grafana.nsl.xyz%2Flogin role_attribute_path: contains(roles[*], 'admin') && 'Admin' || contains(roles[*], 'editor') && 'Editor' || 'Viewer' + unified_alerting: + enabled: true + ha_listen_address: "${POD_IP}:9094" + ha_peers: "grafana-alerting.guardian:9094" + ha_advertise_address: "${POD_IP}:9094" + ha_peer_timeout: 15s # auth.google: # enabled: true # auto_login: false