File tree Expand file tree Collapse file tree 3 files changed +48
-17
lines changed 
kubernetes/linera-validator Expand file tree Collapse file tree 3 files changed +48
-17
lines changed Original file line number Diff line number Diff line change 1+ environments :
2+   default :
3+     values :
4+       - writeToGrafanaCloud : {{ env "LINERA_WRITE_TO_GRAFANA_CLOUD" | default "false" }} 
5+         validatorLabel : {{ env "LINERA_VALIDATOR_LABEL" | default (printf "local-%s" (env "USER")) }} 
6+ 
7+ ---
8+ 
19repositories :
210  - name : scylla 
311    url : https://scylla-operator-charts.storage.googleapis.com/stable 
@@ -16,22 +24,15 @@ releases:
1624    needs :
1725      - scylla/scylla 
1826    values :
19-       - {{ env "LINERA_HELMFILE_VALUES_LINERA_CORE" | default "values-local.yaml" }} 
27+       {{ if .Values.writeToGrafanaCloud -}} 
28+       - grafanaCloudUsername : {{ fetchSecretValue (env "LINERA_GRAFANA_CLOUD_USERNAME_SECRET") | quote }} 
29+         grafanaCloudAPIToken : {{ fetchSecretValue (env "LINERA_GRAFANA_CLOUD_API_TOKEN_SECRET") | quote }} 
30+       {{- end }} 
31+       - writeToGrafanaCloud : {{ .Values.writeToGrafanaCloud }} 
32+       - {{ env "LINERA_HELMFILE_VALUES_LINERA_CORE" | default "values-local.yaml.gotmpl" }} 
2033    set :
2134      - name : installCRDs 
2235        value : " true" 
23-       - name : validator.serverConfig 
24-         value : {{ env "LINERA_HELMFILE_SET_SERVER_CONFIG" | default "working/server_1.json" }} 
25-       - name : validator.genesisConfig 
26-         value : {{ env "LINERA_HELMFILE_SET_GENESIS_CONFIG" | default "working/genesis.json" }} 
27-       - name : numShards 
28-         value : {{ env "LINERA_HELMFILE_SET_NUM_SHARDS" | default 10 }} 
29-       - name : lineraImage 
30-         value : {{ env "LINERA_HELMFILE_LINERA_IMAGE" | default "linera:latest" }} 
31-       - name : staticIpGcpName 
32-         value : {{ env "LINERA_HELMFILE_STATIC_IP_GCP_NAME" | default "" }} 
33-       - name : validatorDomainName 
34-         value : {{ env "LINERA_HELMFILE_VALIDATOR_DOMAIN_NAME" | default "" }} 
3536  - name : scylla 
3637    version : v1.13.0 
3738    namespace : scylla 
Original file line number Diff line number Diff line change 1+ {{- if .Values.writeToGrafanaCloud }} 
2+ apiVersion : v1 
3+ kind : Secret 
4+ metadata :
5+   name : grafana-cloud-auth-secret 
6+ type : kubernetes.io/basic-auth 
7+ stringData :
8+   username : {{ .Values.grafanaCloudUsername | quote }} 
9+   password : {{ .Values.grafanaCloudAPIToken | quote }} 
10+ {{- end }} 
Original file line number Diff line number Diff line change 11# Values for charts linera-validator for local validators.
22
33# Linera
4- lineraImage : " "   #  Is set by helmfile. 
4+ lineraImage: {{ env "LINERA_HELMFILE_LINERA_IMAGE" | default "linera:latest" }} 
55lineraImagePullPolicy: Never
66logLevel: "debug"
77proxyPort: 19100
88metricsPort: 21100
9- numShards : 10 
9+ numShards: {{ env "LINERA_HELMFILE_SET_NUM_SHARDS" | default 10 }} 
1010
1111# Loki
1212loki-stack:
@@ -40,6 +40,26 @@ kube-prometheus-stack:
4040      - grafana-piechart-panel
4141  prometheus:
4242    prometheusSpec:
43+       {{- if .Values.writeToGrafanaCloud }}
44+       scrapeInterval: 90s
45+       remoteWrite:
46+         - url: https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom/push
47+           basicAuth:
48+             username:
49+               name: grafana-cloud-auth-secret
50+               key: username
51+             password:
52+               name: grafana-cloud-auth-secret
53+               key: password
54+           writeRelabelConfigs:
55+             - sourceLabels: [__name__]
56+               regex: (apiextensions|apiserver|csi|kube|kubelet|kubernetes|node|prober|prometheus|rest|storage|volume|etcd|net|grafana|authentication|code|workqueue|cluster|go|alertmanager|authorization|namespace|scrape|up|field|registered|process|scylla).+
57+               action: drop
58+             - regex: endpoint|instance|namespace|pod|prometheus|prometheus_replica|service|name|resource|id
59+               action: labeldrop
60+       externalLabels:
61+         validator: {{ .Values.validatorLabel }}
62+       {{- end }}
4363      retention: 2d
4464      retentionSize: 1GB
4565      storageSpec:
@@ -101,5 +121,5 @@ environment: "kind"
101121
102122# Validator
103123validator:
104-   serverConfig : " "   #  Is set by helmfile. 
105-   genesisConfig : " "   #  Is set by helmfile. 
124+   serverConfig: {{ env "LINERA_HELMFILE_SET_SERVER_CONFIG" | default "working/server_1.json" }} 
125+   genesisConfig: {{ env "LINERA_HELMFILE_SET_GENESIS_CONFIG" | default "working/genesis.json" }} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments