@leverege/build-tools 2.66.2 → 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 (53) hide show
  1. package/package.json +4 -4
  2. package/src/bash-funcs +10 -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/elasticsearch8/helmup.plugin +1 -1
  7. package/src/helm-charts/emailer/values-local.yaml +6 -3
  8. package/src/helm-charts/geotile-server/values-local.yaml +6 -3
  9. package/src/helm-charts/imagine/values-local.yaml +3 -0
  10. package/src/helm-charts/message-processor/values-local.yaml +1 -1
  11. package/src/helm-charts/messenger/values-local.yaml +4 -1
  12. package/src/helm-charts/overdose/values-local.yaml +3 -0
  13. package/src/helm-charts/prom-operator/rules/elasticsearch-rules.yaml +1 -1
  14. package/src/helm-charts/prom-operator/rules/kubestate-rules.yaml +1 -1
  15. package/src/helm-charts/prom-operator/rules/prometheus-rules.yaml +1 -1
  16. package/src/helm-charts/pubsub-pulse/values-local.yaml +4 -1
  17. package/src/helm-charts/pusher/values-local.yaml +3 -0
  18. package/src/helm-charts/reason/values-local.yaml +4 -1
  19. package/src/helm-charts/redis/.nohelm +0 -0
  20. package/src/helm-charts/redis/helmup.plugin +2 -2
  21. package/src/helm-charts/resource-server/values-local.yaml +9 -4
  22. package/src/helm-charts/rule-engine/values-local.yaml +3 -0
  23. package/src/helm-charts/traefik/.nohelm +0 -0
  24. package/src/helm-charts/traefik/helmup.plugin +1 -1
  25. package/src/helm-charts/transponder-bq/values-local.yaml +4 -1
  26. package/src/helm-charts/transponder-dh/values-local.yaml +4 -1
  27. package/src/helm-charts/transponder-rt/values-local.yaml +4 -1
  28. package/src/helm-charts/transponder-tsdb/values-local.yaml +4 -1
  29. package/src/helm-charts/vin-decoder-server/values-local.yaml +3 -0
  30. package/src/helmup.sh +25 -3
  31. package/src/push-my-chart.mjs +17 -8
  32. package/src/helm-charts/prom-operator/grafana-dashboards/cloudnative-pg.json +0 -9190
  33. package/src/helm-charts/prom-operator/grafana-dashboards/redis.json +0 -1513
  34. package/src/helm-charts/prom-operator/grafana-dashboards/stackdriver.json +0 -624
  35. package/src/helm-charts/prom-operator/grafana-dashboards/traefik-op.json +0 -1386
  36. /package/src/helm-charts/{cert-manager → deprecated/cert-manager}/.nohelm +0 -0
  37. /package/src/helm-charts/{cert-manager → deprecated/cert-manager}/cert-manager-local.yaml.ovh +0 -0
  38. /package/src/helm-charts/{cert-manager → deprecated/cert-manager}/gitignore +0 -0
  39. /package/src/helm-charts/{cert-manager → deprecated/cert-manager}/helmup.plugin +0 -0
  40. /package/src/helm-charts/{grafana → deprecated/grafana}/.nohelm +0 -0
  41. /package/src/helm-charts/{grafana → deprecated/grafana}/gitignore +0 -0
  42. /package/src/helm-charts/{grafana → deprecated/grafana}/grafana-local.yaml.ovh +0 -0
  43. /package/src/helm-charts/{grafana → deprecated/grafana}/helmup.plugin +0 -0
  44. /package/src/helm-charts/{postgres → deprecated/postgres}/.nohelm +0 -0
  45. /package/src/helm-charts/{postgres → deprecated/postgres}/helmup.plugin +0 -0
  46. /package/src/helm-charts/{postgres → deprecated/postgres}/postgres-local.yaml +0 -0
  47. /package/src/helm-charts/{prometheus → deprecated/prometheus}/helmup.plugin +0 -0
  48. /package/src/helm-charts/{prometheus → deprecated/prometheus}/values-local.yaml +0 -0
  49. /package/src/helm-charts/{stackdriver-exporter → deprecated/stackdriver-exporter}/helmup.plugin +0 -0
  50. /package/src/helm-charts/{stackdriver-exporter → deprecated/stackdriver-exporter}/values-local.yaml +0 -0
  51. /package/src/helm-charts/{timescale-db → deprecated/timescale-db}/.nohelm +0 -0
  52. /package/src/helm-charts/{timescale-db → deprecated/timescale-db}/helmup.plugin +0 -0
  53. /package/src/helm-charts/{timescale-db → deprecated/timescale-db}/timescale-db-local.yaml +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.66.2",
3
+ "version": "2.66.3",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -69,10 +69,10 @@
69
69
  "deepmerge": "^4.3.1",
70
70
  "enquirer": "^2.4.1",
71
71
  "execa": "^9.5.2",
72
- "glob": "^11.0.1",
72
+ "glob": "^11.0.2",
73
73
  "handlebars": "^4.7.8",
74
- "ignore": "^7.0.3",
75
- "inquirer": "^12.5.2",
74
+ "ignore": "^7.0.4",
75
+ "inquirer": "^12.6.0",
76
76
  "js-yaml": "^4.1.0",
77
77
  "jsdoc": "^4.0.4",
78
78
  "ms": "^2.1.3",
package/src/bash-funcs CHANGED
@@ -215,3 +215,13 @@ PLUGIN_NOEXEC
215
215
  sendToSlack "$PLUGIN"
216
216
  return 0
217
217
  }
218
+
219
+ # simple enforcement of necessary tools that need to be installed
220
+ function commandChecker() {
221
+ for cmd in "$@"; do
222
+ command -v "$cmd" &> $DEVNULL
223
+ exitOnError $? "the `color g $cmd` command is required but not installed please install it and try again"
224
+ done
225
+ }
226
+
227
+ commandChecker git helm kubectl service-man
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/env node
2
+
3
+ // helm-audit.mjs
4
+ // Node.js version of helm-audit.sh to display deployed chart/image/audit info
5
+
6
+ import { shellCmd, log, debug } from './Utils.mjs'
7
+ import ora from 'ora'
8
+ import pLimit from 'p-limit'
9
+ import chalk from 'chalk'
10
+
11
+ const spinner = ora('Gathering Helm release info...').start()
12
+ const limit = pLimit(5) // limit concurrent shellCmds to avoid API overload
13
+ const OMIT_NAMESPACES = new Set(['estafette'])
14
+
15
+ async function getHelmReleases() {
16
+ const json = await shellCmd('helm list -A -o json')
17
+ return JSON.parse(json).filter(r => !OMIT_NAMESPACES.has(r.namespace))
18
+ }
19
+
20
+ async function getDeployedImageTag(ns, release) {
21
+ try {
22
+ const image = await shellCmd(`kubectl get deployment -n ${ns} -l app.kubernetes.io/instance=${release} -o jsonpath={.items[0].spec.template.spec.containers[0].image}`)
23
+ const tag = image.trim().split(':')[1]
24
+ return tag && tag !== 'not found' ? tag : ''
25
+ } catch {
26
+ return ''
27
+ }
28
+ }
29
+
30
+ async function getChartAppVersion(ns, release) {
31
+ try {
32
+ const metadata = await shellCmd(`helm get metadata ${release} -n ${ns}`)
33
+ const match = metadata.match(/^APP_VERSION:\s*(.*?)\s*$/m)
34
+ return match ? match[1].trim() : '(unknown)'
35
+ } catch {
36
+ return '(unknown)'
37
+ }
38
+ }
39
+
40
+ async function getHelmValue(ns, release, key) {
41
+ try {
42
+ const values = await shellCmd(`helm get values ${release} -n ${ns} -o json`)
43
+ const parsed = JSON.parse(values)
44
+ return parsed.helmup?.[key] || ''
45
+ } catch {
46
+ return ''
47
+ }
48
+ }
49
+
50
+ function normalizeTag(tag) {
51
+ return tag?.replace(/^v/, '').toLowerCase() || ''
52
+ }
53
+
54
+ function formatRow(name, chartVersion, appVersion, imageTag, deployT, culprit) {
55
+ const release = chalk.green(name.slice(0, 25).padEnd(32))
56
+ const chartVer = chalk.cyan(chartVersion.padEnd(18))
57
+ const appVer = chalk.cyan(appVersion.padEnd(18))
58
+ const normApp = normalizeTag(appVersion)
59
+ const normImage = normalizeTag(imageTag)
60
+
61
+ let imageFormatted = imageTag.padEnd(20)
62
+ if (normImage && normApp && normImage === normApp) {
63
+ imageFormatted = chalk.green(imageFormatted)
64
+ } else if (imageTag) {
65
+ imageFormatted = chalk.red(imageFormatted)
66
+ }
67
+
68
+ const deployInfo = deployT ? chalk.gray(`${deployT} by ${culprit || '(unknown)'}`) : ''
69
+ return ` ${release}${chartVer}${appVer}${imageFormatted}${deployInfo}`
70
+ }
71
+
72
+ async function audit() {
73
+ spinner.text = 'Fetching release metadata...'
74
+ const releases = await getHelmReleases()
75
+
76
+ // sort by namespace, then release name
77
+ releases.sort((a, b) => {
78
+ const nsCompare = a.namespace.localeCompare(b.namespace)
79
+ return nsCompare !== 0 ? nsCompare : a.name.localeCompare(b.name)
80
+ })
81
+
82
+ spinner.text = 'Gathering chart, image, and audit metadata...'
83
+
84
+ const rows = await Promise.all(releases.map(({ name, namespace, chart }) => limit(async () => {
85
+ const chartVersion = chart?.split('-').pop() || '(unknown)'
86
+ const [appVersion, imageTag, deployT, culprit] = await Promise.all([
87
+ getChartAppVersion(namespace, name),
88
+ getDeployedImageTag(namespace, name),
89
+ getHelmValue(namespace, name, 'deployT'),
90
+ getHelmValue(namespace, name, 'culprit'),
91
+ ])
92
+ return {
93
+ row: formatRow(name, chartVersion, appVersion, imageTag, deployT, culprit),
94
+ namespace
95
+ }
96
+ })))
97
+
98
+ spinner.stop()
99
+ log(`${'RELEASE'.padEnd(34)}${'CHART VERSION'.padEnd(18)}${'APP VERSION'.padEnd(18)}${'IMAGE TAG'.padEnd(20)}DEPLOY INFO`)
100
+
101
+ let lastNamespace = ''
102
+ for (const { row, namespace } of rows) {
103
+ if (namespace !== lastNamespace) {
104
+ if (lastNamespace !== '') log('')
105
+ log(chalk.bold.green(namespace))
106
+ lastNamespace = namespace
107
+ }
108
+ log(row)
109
+ }
110
+ }
111
+
112
+ audit().catch(err => {
113
+ spinner.stop()
114
+ console.error(err)
115
+ process.exit(1)
116
+ })
@@ -28,10 +28,13 @@ psqlSecurity:
28
28
  TSDB_DENSE_SECRET_NAME: "cnpg-db-tsdb-dense-postgres-pw"
29
29
  TSDB_DENSE_SECRET_KEY: "password"
30
30
 
31
+ serviceMonitor:
32
+ enabled: true
33
+
31
34
  autoscaling:
32
35
  minReplicas: 3
33
36
  maxReplicas: 12
34
37
  maxCPU: 80
35
38
 
36
39
  ingressRoute:
37
- host: OVH:<PROJECT_ID>-imagine-api.OVH:<HOST>.com
40
+ host: ${PROJECT_ID}-imagine-api.${HOST}.com
@@ -11,3 +11,6 @@ config:
11
11
 
12
12
  # CNPG override
13
13
  SQL_HOST: "cnpg-db-psql-stack-rw.cnpg-operands" # vs postgres-postgresql
14
+
15
+ serviceMonitor:
16
+ enabled: true
@@ -2,7 +2,7 @@
2
2
  #
3
3
  showInstalling "Elastic Search 8"
4
4
 
5
- [ -z "$ELASTIC_CHART_VERSION" ] && ELASTIC_CHART_VERSION="21.6.0"
5
+ [ -z "$ELASTIC_CHART_VERSION" ] && ELASTIC_CHART_VERSION="21.6.2"
6
6
 
7
7
  OCI_CHART="oci://registry-1.docker.io/bitnamicharts/elasticsearch"
8
8
 
@@ -4,6 +4,9 @@ image:
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
6
 
7
- API_UI_URL: "OVH:<PROJECT_ID>.web.app"
8
- MAIL_GUN_DOMAIN: "OVH:<MAIL_GUN_DOMAIN>"
9
- MAIL_GUN_DEFAULT_SENDER: "no-reply@OVH:<MAIL_GUN_DOMAIN>"
7
+ API_UI_URL: "${PROJECT_ID}.web.app"
8
+ MAIL_GUN_DOMAIN: "${MAIL_GUN_DOMAIN}"
9
+ MAIL_GUN_DEFAULT_SENDER: "no-reply@${MAIL_GUN_DOMAIN}"
10
+
11
+ serviceMonitor:
12
+ enabled: true
@@ -2,6 +2,9 @@ image:
2
2
  tag: # v2.3.0
3
3
 
4
4
  config:
5
- UPLOADER_TYPE: "OVH:<BUCKET_TYPE>"
6
- UPLOADER_PROJECT_ID: "OVH:<PROJECT_ID>"
7
- UPLOADER_BUCKET: "OVH:<PROJECT_ID>-geotile-server"
5
+ UPLOADER_TYPE: "${BUCKET_TYPE}"
6
+ UPLOADER_PROJECT_ID: "${PROJECT_ID}"
7
+ UPLOADER_BUCKET: "${PROJECT_ID}-geotile-server"
8
+
9
+ serviceMonitor:
10
+ enabled: true
@@ -3,3 +3,6 @@ mage:
3
3
 
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
+
7
+ serviceMonitor:
8
+ enabled: true
@@ -5,4 +5,4 @@ config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
6
 
7
7
  serviceMonitor:
8
- enabled: false
8
+ enabled: true
@@ -3,4 +3,7 @@ image:
3
3
 
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
- API_UI_URL: "OVH:<PROJECT_ID>.web.app"
6
+ API_UI_URL: "${PROJECT_ID}.web.app"
7
+
8
+ serviceMonitor:
9
+ enabled: true
@@ -17,3 +17,6 @@ autoscaling:
17
17
  minReplicas: 6
18
18
  maxReplicas: 16
19
19
  averageCPU: 75
20
+
21
+ serviceMonitor:
22
+ enabled: true
@@ -174,7 +174,7 @@ spec:
174
174
  VALUE = {{ $value }}
175
175
  LABELS = {{ $labels }}
176
176
  - alert: ElasticsearchHighIndexingLatency
177
- expr: elasticsearch_indices_indexing_index_time_seconds_total / elasticsearch_indices_indexing_index_total > 0.0005
177
+ expr: elasticsearch_indices_indexing_index_time_seconds_total / elasticsearch_indices_indexing_index_total > 0.002 # awesome was 0.0005
178
178
  for: 10m
179
179
  labels:
180
180
  severity: warning
@@ -385,7 +385,7 @@ spec:
385
385
  LABELS = {{ $labels }}
386
386
  - alert: KubernetesApiServerLatency
387
387
  expr: histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{verb!~"(?:CONNECT|WATCHLIST|WATCH|PROXY)"} [10m])) WITHOUT (subresource)) > 1
388
- for: 2m
388
+ for: 15m
389
389
  labels:
390
390
  severity: warning
391
391
  annotations:
@@ -21,7 +21,7 @@ spec:
21
21
  LABELS = {{ $labels }}
22
22
  - alert: PrometheusTargetMissing
23
23
  expr: up{"namespace"!~"kube-system"} == 0 # awesome was => up == 0
24
- for: 1m # awesome was => 0m
24
+ for: 3m # awesome was => 0m
25
25
  labels:
26
26
  severity: critical
27
27
  annotations:
@@ -5,4 +5,7 @@ image:
5
5
  config:
6
6
  pulseDelay: "1000"
7
7
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
8
- IMAGINE_API_URL: "https://OVH:<PROJECT_ID>-imagine-api.OVH:<HOST>.com"
8
+ IMAGINE_API_URL: "https://${PROJECT_ID}-imagine-api.${HOST}.com"
9
+
10
+ serviceMonitor:
11
+ enabled: true
@@ -23,3 +23,6 @@ config:
23
23
  }
24
24
  }
25
25
  }
26
+
27
+ serviceMonitor:
28
+ enabled: true
@@ -4,7 +4,7 @@ image:
4
4
  config:
5
5
  CF_TRANSPORT_CONFIG: '{
6
6
  "type": "pubsub",
7
- "projectId": "OVH:<PROJECT_NAME>" ,
7
+ "projectId": "${PROJECT_NAME}" ,
8
8
  "keyFilename": "/home/node/unused/key.json" ,
9
9
  "publisher": {
10
10
  "batching": {
@@ -12,3 +12,6 @@ config:
12
12
  }
13
13
  }
14
14
  }'
15
+
16
+ serviceMonitor:
17
+ enabled: true
File without changes
@@ -4,8 +4,8 @@ showInstalling "Redis"
4
4
 
5
5
  OCI_CHART="oci://registry-1.docker.io/bitnamicharts/redis"
6
6
 
7
- [ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="20.12.1"
7
+ [ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="20.13.0"
8
8
 
9
9
  helm upgrade --install redis $OCI_CHART \
10
- --values redis/values.yaml \
10
+ --values redis/values-local.yaml \
11
11
  --version $REDIS_CHART_VERSION $HELM_WHAT
@@ -4,14 +4,19 @@
4
4
  # - npm run sequelizeRunMigrations
5
5
  #
6
6
  image:
7
- tag: # v1.7.0
7
+ tag: # v1.14.0
8
8
 
9
9
  config:
10
10
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
11
11
 
12
- UPLOADER_PROJECT_ID: "OVH:<PROJECT_ID>"
13
- UPLOADER_BUCKET: "OVH:<PROJECT_ID>-resource-server"
14
- UPLOADER_LOCATION: "OVH:<GCE_REGION>"
12
+ UPLOADER_PROJECT_ID: "${PROJECT_ID}"
13
+ UPLOADER_BUCKET: "${PROJECT_ID}-resource-server"
14
+ UPLOADER_LOCATION: "${GCE_REGION}"
15
15
 
16
16
  # CNPG override
17
17
  SQL_HOST: "cnpg-db-psql-stack-rw.cnpg-operands" # vs postgres-postgresql
18
+ # SQL_READ_REPLICATION_CONFIG: '[ { "host": "cnpg-db-psql-stack-r.cnpg-operands" } ]'
19
+ # TRANSACTION_MAX_RETRIES: "5"
20
+
21
+ serviceMonitor:
22
+ enabled: true
@@ -6,3 +6,6 @@ config:
6
6
 
7
7
  # CNPG override
8
8
  MODELS_SEQUELIZE_HOST: "cnpg-db-psql-stack-rw.cnpg-operands" # vs postgres-postgresql
9
+
10
+ serviceMonitor:
11
+ enabled: true
File without changes
@@ -20,7 +20,7 @@ addHelmRepo traefik https://helm.traefik.io/traefik
20
20
  [ -z "$TRAEFIK_CHART_VERSION" ] && TRAEFIK_CHART_VERSION="35"
21
21
  helm upgrade --install traefik traefik/traefik \
22
22
  --namespace $TRAEFIK_NAMESPACE --create-namespace \
23
- --values traefik/values.yaml \
23
+ --values traefik/values-local.yaml \
24
24
  --version $TRAEFIK_CHART_VERSION $HELM_WHAT
25
25
 
26
26
  removeHelmRepo traefik
@@ -9,7 +9,7 @@ config:
9
9
 
10
10
  TRANSPORT_CONFIG: '{
11
11
  "type": "pubsub",
12
- "projectId": "OVH:<PROJECT_ID>",
12
+ "projectId": "${PROJECT_ID}",
13
13
  "publisher": {
14
14
  "batching": {
15
15
  "maxMilliseconds": 0,
@@ -27,3 +27,6 @@ config:
27
27
  },
28
28
  "channel": "writer-bq"
29
29
  }'
30
+
31
+ serviceMonitor:
32
+ enabled: true
@@ -19,7 +19,7 @@ config:
19
19
 
20
20
  TRANSPORT_CONFIG: '{
21
21
  "type": "pubsub",
22
- "projectId": "OVH:<PROJECT_NAME>",
22
+ "projectId": "${PROJECT_NAME}",
23
23
  "publisher": {
24
24
  "batching": {
25
25
  "maxMilliseconds": 0,
@@ -60,3 +60,6 @@ resources:
60
60
  requests:
61
61
  cpu: 250m
62
62
  memory: 600Mi
63
+
64
+ serviceMonitor:
65
+ enabled: true
@@ -10,7 +10,7 @@ config:
10
10
  ELASTICSEARCH_DATA_METADATA_ENABLED: "false"
11
11
  TRANSPORT_CONFIG: '{
12
12
  "type": "pubsub",
13
- "projectId": "OVH:<PROJECT_ID>",
13
+ "projectId": "${PROJECT_ID}",
14
14
  "publisher": {
15
15
  "batching": {
16
16
  "maxMilliseconds": 0,
@@ -28,3 +28,6 @@ config:
28
28
  },
29
29
  "channel": "writer-rt"
30
30
  }'
31
+
32
+ serviceMonitor:
33
+ enabled: true
@@ -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
@@ -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() {
@@ -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