@leverege/build-tools 2.66.1 → 2.66.3

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 (71) hide show
  1. package/package.json +5 -5
  2. package/src/bash-funcs +11 -0
  3. package/src/helm-audit.mjs +116 -0
  4. package/src/helm-charts/api-server/values-local.yaml +4 -1
  5. package/src/helm-charts/authz-server/values-local.yaml +3 -0
  6. package/src/helm-charts/cnpg-db-pgbench/cluster.yaml.ovh +2 -0
  7. package/src/helm-charts/cnpg-db-tsdb-basic/cluster.yaml.ovh +3 -1
  8. package/src/helm-charts/cnpg-db-tsdb-dense/cluster.yaml.ovh +2 -0
  9. package/src/helm-charts/elasticsearch8/helmup.plugin +1 -1
  10. package/src/helm-charts/emailer/values-local.yaml +6 -3
  11. package/src/helm-charts/geotile-server/values-local.yaml +6 -3
  12. package/src/helm-charts/imagine/values-local.yaml +3 -0
  13. package/src/helm-charts/message-processor/values-local.yaml +1 -1
  14. package/src/helm-charts/messenger/values-local.yaml +4 -1
  15. package/src/helm-charts/overdose/values-local.yaml +3 -0
  16. package/src/helm-charts/prom-operator/prometheus-stack.yaml.ovh +1 -1
  17. package/src/helm-charts/prom-operator/rules/cadvisor-rules.yaml +3 -3
  18. package/src/helm-charts/prom-operator/rules/cnpg-rules.yaml +3 -2
  19. package/src/helm-charts/prom-operator/rules/elasticsearch-rules.yaml +2 -2
  20. package/src/helm-charts/prom-operator/rules/gcp-rules.yaml +2 -2
  21. package/src/helm-charts/prom-operator/rules/kubestate-rules.yaml +2 -2
  22. package/src/helm-charts/prom-operator/rules/po-k8s-selective.yaml +23 -0
  23. package/src/helm-charts/prom-operator/rules/prometheus-rules.yaml +2 -2
  24. package/src/helm-charts/prom-operator/rules/redis-rules.yaml +1 -1
  25. package/src/helm-charts/prom-operator/rules/traefik-rules.yaml +2 -2
  26. package/src/helm-charts/prom-operator/update-rules.sh +32 -0
  27. package/src/helm-charts/pubsub-pulse/values-local.yaml +4 -1
  28. package/src/helm-charts/pusher/values-local.yaml +3 -0
  29. package/src/helm-charts/reason/values-local.yaml +4 -1
  30. package/src/helm-charts/redis/.nohelm +0 -0
  31. package/src/helm-charts/redis/helmup.plugin +2 -2
  32. package/src/helm-charts/resource-server/values-local.yaml +9 -4
  33. package/src/helm-charts/rule-engine/values-local.yaml +3 -0
  34. package/src/helm-charts/traefik/.nohelm +0 -0
  35. package/src/helm-charts/traefik/helmup.plugin +1 -1
  36. package/src/helm-charts/transponder-bq/values-local.yaml +4 -1
  37. package/src/helm-charts/transponder-dh/values-local.yaml +4 -1
  38. package/src/helm-charts/transponder-rt/values-local.yaml +4 -1
  39. package/src/helm-charts/transponder-tsdb/values-local.yaml +4 -1
  40. package/src/helm-charts/velero/helmup.plugin +1 -1
  41. package/src/helm-charts/vin-decoder-server/values-local.yaml +3 -0
  42. package/src/helmup.sh +26 -4
  43. package/src/push-my-chart.mjs +17 -8
  44. package/src/awesome-fetch.mjs +0 -44
  45. package/src/helm-charts/prom-operator/apply-rules +0 -15
  46. package/src/helm-charts/prom-operator/gitignore +0 -2
  47. package/src/helm-charts/prom-operator/grafana-dashboards/cloudnative-pg.json +0 -9190
  48. package/src/helm-charts/prom-operator/grafana-dashboards/redis.json +0 -1513
  49. package/src/helm-charts/prom-operator/grafana-dashboards/stackdriver.json +0 -624
  50. package/src/helm-charts/prom-operator/grafana-dashboards/traefik-op.json +0 -1386
  51. package/src/helm-charts/prom-operator/rules/awesome-base/etcd-exporter.yaml +0 -153
  52. package/src/helm-charts/prom-operator/rules/etcd-rulte.yaml +0 -153
  53. /package/src/helm-charts/{cert-manager → deprecated/cert-manager}/.nohelm +0 -0
  54. /package/src/helm-charts/{cert-manager → deprecated/cert-manager}/cert-manager-local.yaml.ovh +0 -0
  55. /package/src/helm-charts/{cert-manager → deprecated/cert-manager}/gitignore +0 -0
  56. /package/src/helm-charts/{cert-manager → deprecated/cert-manager}/helmup.plugin +0 -0
  57. /package/src/helm-charts/{grafana → deprecated/grafana}/.nohelm +0 -0
  58. /package/src/helm-charts/{grafana → deprecated/grafana}/gitignore +0 -0
  59. /package/src/helm-charts/{grafana → deprecated/grafana}/grafana-local.yaml.ovh +0 -0
  60. /package/src/helm-charts/{grafana → deprecated/grafana}/helmup.plugin +0 -0
  61. /package/src/helm-charts/{postgres → deprecated/postgres}/.nohelm +0 -0
  62. /package/src/helm-charts/{postgres → deprecated/postgres}/helmup.plugin +0 -0
  63. /package/src/helm-charts/{postgres → deprecated/postgres}/postgres-local.yaml +0 -0
  64. /package/src/helm-charts/{prometheus → deprecated/prometheus}/helmup.plugin +0 -0
  65. /package/src/helm-charts/{prometheus → deprecated/prometheus}/values-local.yaml +0 -0
  66. /package/src/helm-charts/{stackdriver-exporter → deprecated/stackdriver-exporter}/helmup.plugin +0 -0
  67. /package/src/helm-charts/{stackdriver-exporter → deprecated/stackdriver-exporter}/values-local.yaml +0 -0
  68. /package/src/helm-charts/{timescale-db → deprecated/timescale-db}/.nohelm +0 -0
  69. /package/src/helm-charts/{timescale-db → deprecated/timescale-db}/helmup.plugin +0 -0
  70. /package/src/helm-charts/{timescale-db → deprecated/timescale-db}/timescale-db-local.yaml +0 -0
  71. /package/src/helm-charts/prom-operator/rules/{postgres-rules.yaml → postgres-rules.yaml.disabled} +0 -0
@@ -21,7 +21,7 @@ config:
21
21
 
22
22
  TRANSPORT_CONFIG: '{
23
23
  "type": "pubsub",
24
- "projectId": "OVH:<PROJECT_ID>",
24
+ "projectId": "${PROJECT_ID}",
25
25
  "publisher": {
26
26
  "batching": {
27
27
  "maxMilliseconds": 0,
@@ -39,3 +39,6 @@ config:
39
39
  },
40
40
  "channel": "writer-tsdb"
41
41
  }'
42
+
43
+ serviceMonitor:
44
+ enabled: true
@@ -4,7 +4,7 @@ showInstalling "Velero Backup System"
4
4
 
5
5
  addHelmRepo vmware-tanzu https://vmware-tanzu.github.io/helm-charts
6
6
 
7
- [ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="8"
7
+ [ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="9"
8
8
  #
9
9
  # Build the bucket, region and SA email variables and use --set to mod the
10
10
  # chart values as opposed to using an OVH:<label> approach. This eliminates
@@ -5,3 +5,6 @@ config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
6
  PROJECT_ID: "set-in-values-local"
7
7
  SYSTEM_ID: "set-in-values-local"
8
+
9
+ serviceMonitor:
10
+ enabled: true
package/src/helmup.sh CHANGED
@@ -113,7 +113,7 @@ CATNAMI
113
113
  # bindWorkloadIdentity api-server
114
114
  #
115
115
  # but in the case of services like transponder which has various flavors but
116
- # only the single trandponder services account we woul do:
116
+ # only the single transponder service account we would do:
117
117
  # bindWorkloadIdentity transponder default tranponder-rt
118
118
  #
119
119
  function bindWorkloadIdentity() {
@@ -791,7 +791,7 @@ function installVeleroEnvironment() {
791
791
  gcloud config set project $GCP_PROJECT_ID
792
792
 
793
793
  ## The major chart version will determine the bucket suffix
794
- [ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="8"
794
+ [ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="9"
795
795
 
796
796
  ## Create a bucket
797
797
  BUCKET="$GCP_PROJECT_ID-velero-$VELERO_CHART_VERSION"
@@ -933,13 +933,32 @@ UPGRADES_DONE
933
933
  sleep 3
934
934
  }
935
935
 
936
+ # TODO: DRY this by coalescing with checkUpgradeNotes
937
+ function displayBanner() {
938
+ BANNER="helmup-banner.txt"
939
+
940
+ [ ! -f "$BANNER" ] && return
941
+ BANNER_TXT=`cat $BANNER`
942
+
943
+ cat<<HELMUP_BANNER
944
+
945
+ `color g "--- From $BANNER ----------------------------------------------------"`
946
+
947
+ $BANNER_TXT
948
+
949
+ `color g "-------------------------------------------------------------------------------"`
950
+ HELMUP_BANNER
951
+ }
952
+
936
953
  function doHelmup() {
954
+ local culprit="--set helmup.culprit=\"$(gcloud config get account)\""
955
+ local deployT="--set helmup.deployT=\"$(date -u +'%Y-%m-%dT%H:%M:%SZ')\""
937
956
  local helmup="$@"
938
957
  local doing="Helming => `color g \"$helmup\"`"
939
958
  local from=
940
959
  [ ! -z "$FROM_VERSIONS" ] && from="`color y \"<= from Versions.json\"`"
941
960
  printf "$doing $from\n"
942
- eval $helmup
961
+ eval "$helmup $culprit $deployT"
943
962
  case "$INVOKED_AS" in
944
963
  "helmup"|"helmdn")
945
964
  sendToSlack "$helmup"
@@ -1049,7 +1068,7 @@ CATBACKUP
1049
1068
  installDefaultConfigs
1050
1069
  ;;
1051
1070
 
1052
- db-curator-dh)
1071
+ "db-curator-dh")
1053
1072
  # db-curator-dh is a variant of db-curator with diff controlled in values-local.yaml
1054
1073
  HELMUP="helm upgrade --install $SERVICE leverege/db-curator --values $SERVICE/values.yaml $CHARTVER $HELM_WHAT"
1055
1074
  doHelmup "$HELMUP"
@@ -1252,4 +1271,7 @@ GCP_PROJECT_ID="$(getProjectIdFromK8sContext)"
1252
1271
  GCE_REGION=`overwhelm -k GCE_REGION`
1253
1272
 
1254
1273
  doInstall $@
1274
+
1275
+ displayBanner
1276
+
1255
1277
  cd - &> $DEVNULL
@@ -46,20 +46,29 @@ const pushItGood = async () => {
46
46
  const version = await shellCmd( 'helm version --short' )
47
47
  const pusher = ( semverLt( version, '3.7.0' ) ? 'push' : 'cm-push' )
48
48
 
49
+ let museumStatus = 0
49
50
  try {
50
51
  log( chalk.green( 'Pushing chart to the Chartmuseum\n' ) )
51
52
  const museum = await shellCmd( `helm ${pusher} helm leverege` )
52
53
  debug( { museum }, '<==output from helm push' )
53
- if ( args.noRegistry ) {
54
- log( `${chalk.bold.yellow( '\nskipping the chart push to the artifact registry' )}` )
55
- } else {
56
- log( chalk.green( 'Pushing chart to the Artifact Registry\n' ) )
57
- const registry = await shellCmd( 'chart-to-registry' )
58
- debug( { registry }, '<==chart-to-registry' )
59
- }
60
54
  } catch ( ex ) {
61
55
  log( ex.stderr )
62
- process.exit( 1 )
56
+ museumStatus = 1
57
+ }
58
+
59
+ if ( args.noRegistry ) {
60
+ log( `${chalk.bold.yellow( '\nskipping the chart push to the artifact registry' )}` )
61
+ process.exit( museumStatus )
62
+ }
63
+
64
+ try {
65
+ log( chalk.green( 'Pushing chart to the Artifact Registry\n' ) )
66
+ const registry = await shellCmd( 'chart-to-registry' )
67
+ debug( { registry }, '<==chart-to-registry' )
68
+ process.exit( museumStatus )
69
+ } catch ( ex ) {
70
+ log( ex.stderr )
71
+ process.exit( museumStatus + 1 )
63
72
  }
64
73
  }
65
74
 
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from 'node:fs'
4
- import yaml from 'js-yaml'
5
-
6
- const SOURCE_URL = 'https://raw.githubusercontent.com/samber/awesome-prometheus-alerts/master/dist/rules/kubernetes/kubestate-exporter.yml'
7
- const OUTPUT_FILE = 'converted-alerts.yaml'
8
-
9
- async function fetchAndConvert() {
10
- /* eslint-disable no-console */
11
- try {
12
- console.log( `Fetching YAML from ${SOURCE_URL}...` )
13
- const response = await fetch( SOURCE_URL )
14
- if ( !response.ok ) throw new Error( `Failed to fetch: ${response.statusText}` )
15
-
16
- const rawYaml = await response.text()
17
- const parsedYaml = yaml.load( rawYaml )
18
- if ( !parsedYaml.groups ) throw new Error( 'Invalid YAML structure, missing "groups"' )
19
-
20
- // Reformat into PrometheusRule CRD format
21
- const prometheusRule = {
22
- apiVersion : 'monitoring.coreos.com/v1',
23
- kind : 'PrometheusRule',
24
- metadata : {
25
- name : 'node-alerts', // Adjust based on the source
26
- },
27
- spec : {
28
- groups : parsedYaml.groups.map( group => ( {
29
- name : `${group.name}-rules`,
30
- rules : group.rules,
31
- } ) ),
32
- },
33
- }
34
-
35
- // Convert back to YAML with proper formatting
36
- const formattedYaml = yaml.dump( prometheusRule, { noRefs : true, indent : 0 } )
37
- fs.writeFileSync( OUTPUT_FILE, formattedYaml, 'utf8' )
38
- console.log( `Converted YAML written to ${OUTPUT_FILE}` )
39
- } catch ( error ) {
40
- console.error( 'Error processing YAML:', error.message )
41
- }
42
- }
43
-
44
- fetchAndConvert()
@@ -1,15 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # Load the standard helper functions
4
- . `build-tools --bashfun`
5
-
6
- overwhelm
7
-
8
- RULES_DIR="prom-operator/rules"
9
-
10
- [ ! -d "$RULES_DIR" ] && errorExit "Missing rules directory [$RULES_DIR]"
11
-
12
- for ruleset in $RULES_DIR/*.yaml; do
13
- printf " Applying rules => `color g $ruleset`\n"
14
- kubectl apply -n prometheus -f $ruleset
15
- done
@@ -1,2 +0,0 @@
1
- prometheus-stack.yaml
2
- stackdriver-exporter.yaml