@leverege/build-tools 2.101.2 → 2.102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/package.json +7 -7
  2. package/src/dashboard/DashboardManager.mjs +192 -17
  3. package/src/dashboard/dashboard.mjs +29 -4
  4. package/src/dashboard/json/{standard/noc-rows-12.json → devops/devops-noc.json} +801 -61
  5. package/src/dashboard/json/{standard/pvc-all-usage.json → devops/pvc-usage.json} +2 -2
  6. package/src/dashboard/json/leverege/leverege-noc.json +2364 -0
  7. package/src/dashboard/json/{standard/redis.json → leverege/leverege-rule-engine.json} +695 -646
  8. package/src/dashboard/json/leverege/leverege-services.json +4757 -0
  9. package/src/dashboard/json/recovr/recovr-locators.json +1227 -0
  10. package/src/dashboard/json/recovr/recovr-noc.json +1949 -0
  11. package/src/dashboard/json/recovr/recovr-position-srvr.json +339 -0
  12. package/src/dashboard/json/recovr/recovr-server.json +1127 -0
  13. package/src/dashboard/json/siren/siren-services.json +2066 -0
  14. package/src/dashboard/json/{standard/cloudnative-pg-20417-rev4.json → system/cloudnative-pg.json} +241 -243
  15. package/src/dashboard/json/{standard → system}/elasticsearch8.json +123 -72
  16. package/src/dashboard/json/system/stackdriver.json +1189 -0
  17. package/src/dashboard/json/{standard/traefik-op.json → system/traefik.json} +44 -56
  18. package/src/dashboard/json/{standard → system}/valkey.json +91 -86
  19. package/src/dashboard/json/{standard → tpi}/gpu-autoscaling-dashboard-ui-import.json +1 -1
  20. package/src/dashboard/json/tpi/leverege-noc.json +3624 -0
  21. package/src/helm-charts/prom-operator/helmup.plugin +1 -1
  22. package/src/helm-charts/prom-operator/prometheus-stack.yaml.ovh +15 -0
  23. package/src/helm-charts/prom-operator/rules/gke-maintenance-rules.yaml +19 -0
  24. package/src/helm-charts/prom-operator/stackdriver-exporter.yaml.ovh +2 -1
  25. package/src/helm-charts/valkey/valkey-local.yaml +1 -0
  26. package/src/helmup.sh +24 -1
  27. package/src/init-my-chart/Chartwright.mjs +1 -1
  28. package/src/init-my-chart/leaf-chart-templates/templates/extraobjects.yaml +1 -0
  29. package/src/overwhelm.mjs +5 -5
  30. package/src/service-man/config/secrets/npmrc.json +1 -0
  31. package/src/service-man/config/secrets/tsdb-dense-password.json +13 -0
  32. package/src/dashboard/json/standard/stackdriver.json +0 -624
  33. /package/src/dashboard/json/{standard → devops}/k8s-api-latency.json +0 -0
@@ -8,7 +8,7 @@ showInstalling "The Prometheus Operator (kube-prometheus-stack)"
8
8
 
9
9
  # https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
10
10
  OCI_CHART="oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack"
11
- [ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="83.7.0"
11
+ [ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="85.0.2"
12
12
  helm upgrade $NS --install prometheus-stack $OCI_CHART \
13
13
  --values prom-operator/prometheus-stack.yaml \
14
14
  --version $PROMETHEUS_STACK_CHART_VERSION $HELM_WHAT
@@ -143,9 +143,15 @@ grafana:
143
143
  sidecar:
144
144
  dashboards:
145
145
  enabled: true
146
+ folderAnnotation: grafana_folder
147
+ provider:
148
+ foldersFromFilesStructure: true
146
149
  # Credentials are injected from the grafana-google-oauth k8s secret, which is
147
150
  # managed by the ExternalSecret in helmup.plugin once ESO is deployed.
148
151
  # On first install, the secret is a placeholder created by helmup.bootstrap.
152
+ grafana.ini:
153
+ feature_toggles:
154
+ ssoSettingsApi: false
149
155
  envFromSecret: grafana-google-oauth
150
156
  env:
151
157
  GF_SERVER_ROOT_URL: https://${PROJECT_NAME}-monitoring.${HOST}.com
@@ -310,6 +316,15 @@ alertmanager:
310
316
  - namespace
311
317
  - alertname
312
318
 
319
+ # GKE node upgrade/maintenance suppresses expected churn alerts.
320
+ # PVC, disk pressure, and other infrastructure alerts are intentionally
321
+ # excluded so genuine storage/capacity problems are never silenced.
322
+ - source_matchers:
323
+ - alertname="GKEMaintenanceInProgress"
324
+ - maintenance="true"
325
+ target_matchers:
326
+ - alertname=~"KubernetesNodeNotReady|KubernetesPodNotHealthy|KubernetesPodCrashLooping|frequent_app_restarts"
327
+
313
328
  route:
314
329
  receiver: slack # default for everything
315
330
  group_by: ["alertname", "namespace"]
@@ -0,0 +1,19 @@
1
+ apiVersion: monitoring.coreos.com/v1
2
+ kind: PrometheusRule
3
+ metadata:
4
+ name: gke-maintenance-rules
5
+ namespace: prometheus
6
+
7
+ spec:
8
+ groups:
9
+ - name: GKE Maintenance
10
+ rules:
11
+ - alert: GKEMaintenanceInProgress
12
+ expr: sum(kube_node_spec_unschedulable) > 0
13
+ for: 3m
14
+ labels:
15
+ severity: info
16
+ maintenance: "true"
17
+ annotations:
18
+ summary: "GKE node maintenance in progress"
19
+ description: "{{ $value }} node(s) are currently unschedulable — GKE upgrade or cordon in progress"
@@ -19,7 +19,8 @@ stackdriver:
19
19
  kubernetes.io/container/accelerator/duty_cycle,
20
20
  kubernetes.io/container/accelerator/memory_total,
21
21
  kubernetes.io/container/accelerator/memory_used,
22
- monitoring.googleapis.com/uptime_check/check_passed,
22
+ pubsub.googleapis.com/subscription/backlog_bytes,
23
+ pubsub.googleapis.com/subscription/dead_letter_message_count,
23
24
  pubsub.googleapis.com/subscription/num_undelivered_messages,
24
25
  pubsub.googleapis.com/subscription/oldest_unacked_message_age,
25
26
  pubsub.googleapis.com/subscription/pull_ack_request_count,
@@ -85,6 +85,7 @@ sentinel:
85
85
 
86
86
  metrics:
87
87
  enabled: true
88
+ resourcesPreset: "small"
88
89
  image:
89
90
  registry: us-docker.pkg.dev
90
91
  repository: leverege-registry/bitnami-mirror/images/redis-exporter
package/src/helmup.sh CHANGED
@@ -20,6 +20,7 @@ function giveHelp() {
20
20
  `color g "--k8s-match"` Only proceed if k8s context is correctly set
21
21
  `color g "--dry-run"` Show what helm would do without applying changes
22
22
  `color g "--debug"` Enable verbose debug output
23
+ `color g "--mutate"` Forces a deployment mutation
23
24
  `color g "--help"` Show this help message
24
25
 
25
26
  Invocation Modes:
@@ -48,6 +49,9 @@ for arg in "$@"; do
48
49
  --k8s-match)
49
50
  export OVERWHELM_ARGS="--matchk8s"
50
51
  ;;
52
+ --mutate)
53
+ MUTATE_DEPLOYMENT=1
54
+ ;;
51
55
  --help|-h)
52
56
  giveHelp && exit 0
53
57
  ;;
@@ -622,6 +626,25 @@ function doHelmup() {
622
626
  local from=
623
627
  [ ! -z "$FROM_VERSIONS" ] && from="`color y \"<= from Versions.json\"`"
624
628
  printf "$doing $from\n"
629
+ if [[ $MUTATE_DEPLOYMENT -eq 1 ]];
630
+ then
631
+ cat<<MUTATION_MSG
632
+
633
+ `color y "WARNING: About to delete the $SERVICE k8s deployment object!
634
+ This will cause brief downtime while helm recreates it. The service
635
+ and any LoadBalancer/static IP will be unaffected."`
636
+
637
+ MUTATION_MSG
638
+ yesToContinue "to delete the $SERVICE deployment and proceed with upgrade"
639
+ kubectl delete deployments.apps $SERVICE
640
+ cat<<DELETE_WAIT
641
+
642
+ `color y " Waiting for $SERVICE deployment to be fully removed..."`
643
+
644
+ DELETE_WAIT
645
+ kubectl wait --for=delete deployment/$SERVICE --timeout=120s
646
+ fi
647
+
625
648
  # plugins pass HELMUP as a single quoted string - split it into args without using eval
626
649
  [[ $# -eq 1 ]] && set -- $1
627
650
  "$@" --set "helmup.culprit=$culprit" --set "helmup.deployT=$deployT"
@@ -811,7 +834,7 @@ REBOOTSTRAP
811
834
  }
812
835
 
813
836
  # ---------- helmup MAIN ----------
814
- helm repo update &>/dev/null & # see comments in the doInstall function for rationale
837
+ helm repo update leverege &>/dev/null & # see comments in the doInstall function for rationale
815
838
 
816
839
  overwhelm $OVERWHELM_ARGS
817
840
  [ $? -ne 0 ] && printf "\n\n***Aborting helmup...\n\n" && exit 1
@@ -13,7 +13,7 @@ const hbsContext = {
13
13
  hbsChartName : '',
14
14
  hbsChartVersion : '1.0.0',
15
15
  hbsChartAppVersion : 'v1.0.0',
16
- hbsArtifactRegistry : 'us-docker.pkg.dev/leverege-registry/FOOLDER/images',
16
+ hbsArtifactRegistry : 'us-docker.pkg.dev/leverege-registry/FOLDER/images',
17
17
  hbsPartOf : '',
18
18
  hbsServicePreemptible : true,
19
19
  hbsRedisEnabled : true,
@@ -0,0 +1 @@
1
+ {{ include "leverege.extraObjects" . }}
package/src/overwhelm.mjs CHANGED
@@ -250,14 +250,14 @@ const buildYaml = ( yamls, replacements ) => {
250
250
  const values = buildYaml( yams, over )
251
251
 
252
252
  // Check to see if someone is requesting a value from the yaml.
253
+ // Uses the fully merged+resolved `over` object so context-specific keys are found.
253
254
  if ( args.key ) {
254
- const section = args.section || 'default'
255
- const keys = yaml[section]
256
- debug( { keys }, '<==Replacements' )
255
+ const val = over[args.key] ?? ''
256
+ debug( { over }, '<==Replacements' )
257
257
  if ( args.export ) {
258
- log( `export ${args.key}=${keys[args.key]}` )
258
+ log( `export ${args.key}=${val}` )
259
259
  } else {
260
- log( keys[args.key] )
260
+ log( val )
261
261
  }
262
262
  if ( !args.continue ) process.exit()
263
263
  }
@@ -2,6 +2,7 @@
2
2
  "type": "managed",
3
3
  "name": "NPMRC",
4
4
  "source": "leverege-registry:DEPRECATED_NPMRC",
5
+ "k8s": { "secret": "npmrc", "key": "key" },
5
6
  "labels": {
6
7
  "env-type": "string"
7
8
  },
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "random",
3
+ "width": 48,
4
+ "immutable": true,
5
+ "labels": {
6
+ "env-type": "string"
7
+ },
8
+ "annotations": {
9
+ "description": "dense timescale db postgres password",
10
+ "owner": "platform-team",
11
+ "source": "service-man"
12
+ }
13
+ }