@leverege/build-tools 2.88.2 → 2.89.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.88.2",
3
+ "version": "2.89.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -76,13 +76,13 @@
76
76
  "glob": "^11.0.3",
77
77
  "handlebars": "^4.7.8",
78
78
  "ignore": "^7.0.5",
79
- "inquirer": "^12.9.6",
79
+ "inquirer": "^12.10.0",
80
80
  "js-yaml": "^4.1.0",
81
81
  "jsdoc": "^4.0.5",
82
82
  "ms": "^2.1.3",
83
83
  "npm-registry-fetch": "^19.0.0",
84
84
  "ora": "^9.0.0",
85
- "p-limit": "^7.1.1",
85
+ "p-limit": "^7.2.0",
86
86
  "package-up": "^5.0.0",
87
87
  "readline-sync": "^1.4.10",
88
88
  "semver": "^7.7.3",
@@ -90,10 +90,10 @@
90
90
  "simple-git": "^3.28.0",
91
91
  "sloc": "^0.3.2",
92
92
  "toml": "^3.0.0",
93
- "zx": "^8.8.4"
93
+ "zx": "^8.8.5"
94
94
  },
95
95
  "devDependencies": {
96
- "@leverege/eslint-config-leverege": "^5.1.0",
96
+ "@leverege/eslint-config-leverege": "^5.1.1",
97
97
  "npm": "^11.6.2"
98
98
  }
99
99
  }
@@ -102,7 +102,8 @@ RUN set -xe; \\
102
102
  apt-get update; \\
103
103
  apt-get install -y --no-install-recommends \\
104
104
  "postgresql-\${PG_MAJOR}-jsquery" \\
105
- "postgresql-\${PG_MAJOR}-repack"; \\
105
+ "postgresql-\${PG_MAJOR}-repack" \\
106
+ "postgresql-\${PG_MAJOR}-squeeze"; \\
106
107
  ln -s /usr/lib/postgresql/\${PG_MAJOR}/bin/pg_repack /usr/local/bin/pg_repack || true; \\
107
108
  rm -fr /tmp/*; \\
108
109
  rm -rf /var/lib/apt/lists/*;
@@ -106,12 +106,12 @@ debug( {
106
106
  registryRepository,
107
107
  ociPushEndpoint }, '<==Parsed package and chart' )
108
108
 
109
- // gcloud auth print-access-token | helm registry login -u oauth2accesstoken \
109
+ // gcloud auth application-default print-access-token | helm registry login -u oauth2accesstoken \
110
110
  // -p ${password} https://us-docker.pkg.dev
111
111
  //
112
112
  // Get the current access token and use it to login to the registry with helm.
113
113
  try {
114
- const accessToken = await shellCmd( 'gcloud auth print-access-token' )
114
+ const accessToken = await shellCmd( 'gcloud auth application-default print-access-token' )
115
115
  // -p is frowned upon but using a pipe | is problematic with shellCmd (execa)
116
116
  const registryLoginCommand = `helm registry login -u oauth2accesstoken -p ${accessToken}`
117
117
 
@@ -4,11 +4,12 @@
4
4
 
5
5
  import fs from 'node:fs/promises'
6
6
  import path from 'node:path'
7
- import ora from 'ora'
8
7
 
8
+ import ora from 'ora'
9
9
  import { program } from 'commander'
10
10
  import chalk from 'chalk'
11
11
  import YAML from 'js-yaml'
12
+
12
13
  import {
13
14
  // condir,
14
15
  debug,
@@ -88,6 +89,7 @@ const writeApplyScript = async ( dir ) => {
88
89
  #
89
90
  # Apply VolumeSnapshot resources prior to deploying the CNPG cluster
90
91
  #
92
+ overwhelm
91
93
  kubectl apply -f ${dir}/volumesnapshotclass.yaml
92
94
  kubectl apply -f ${dir}/volumesnapshotcontent.yaml
93
95
  kubectl apply -f ${dir}/volumesnapshot.yaml
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import path from 'node:path'
3
+
3
4
  import { $, fs, chalk, argv } from 'zx'
4
5
 
5
6
  import { log } from './Utils.mjs'
@@ -6,6 +6,7 @@
6
6
  // the BitnamiImageRegistry gsheet to show progess on the migration effort.
7
7
  //
8
8
  import fs from 'node:fs'
9
+
9
10
  import chalk from 'chalk'
10
11
  import semver from 'semver'
11
12
 
@@ -3,6 +3,7 @@
3
3
  * DEPRECATED - DO NOT MODIFY
4
4
  */
5
5
  import fs from 'node:fs'
6
+
6
7
  import toml from 'toml'
7
8
  import chalk from 'chalk'
8
9
 
@@ -14,7 +15,6 @@ import {
14
15
  parseHelmChart,
15
16
  proceed,
16
17
  shellCmd } from './Utils.mjs'
17
-
18
18
  import Docker from './DockerPy.mjs'
19
19
 
20
20
  // refresh-npm-token does not throw so no need to try, but it emits in debug
@@ -18,7 +18,6 @@ import {
18
18
  shellCmd,
19
19
  warning,
20
20
  } from './Utils.mjs'
21
-
22
21
  import docker from './Docker.mjs'
23
22
 
24
23
  const minimumBuildToolsVersion = '2.68.0'
@@ -2,6 +2,7 @@
2
2
 
3
3
  import fs from 'node:fs'
4
4
  import path from 'node:path'
5
+
5
6
  import yaml from 'js-yaml'
6
7
  import { Command } from 'commander'
7
8
  import chalk from 'chalk'
package/src/getjson.mjs CHANGED
@@ -19,6 +19,7 @@
19
19
  * Get a command line switch parser.
20
20
  */
21
21
  import fs from 'node:fs'
22
+
22
23
  import cliArgs from 'command-line-args'
23
24
  import cliHelp from 'command-line-usage'
24
25
 
@@ -6,6 +6,7 @@
6
6
  import ora from 'ora'
7
7
  import pLimit from 'p-limit'
8
8
  import chalk from 'chalk'
9
+
9
10
  import { shellCmd, log, errorExit } from './Utils.mjs'
10
11
 
11
12
  const spinner = ora( 'Gathering Helm release info...' ).start()
@@ -76,7 +76,7 @@ spec:
76
76
  time() - kube_pod_start_time > 60
77
77
  )
78
78
  ) > 0.3
79
- for: 5m
79
+ for: 10m # awesome was 5m
80
80
  labels:
81
81
  severity: warning
82
82
  namespace: '{{ $labels.namespace }}'
@@ -165,7 +165,7 @@ spec:
165
165
  LABELS = {{ $labels }}
166
166
  - alert: KubernetesHpaScaleInability
167
167
  expr: (kube_horizontalpodautoscaler_spec_max_replicas - kube_horizontalpodautoscaler_status_desired_replicas) * on (horizontalpodautoscaler,namespace) (kube_horizontalpodautoscaler_status_condition{condition="ScalingLimited", status="true"} == 1) == 0
168
- for: 5m # awesome was => 2m
168
+ for: 15m # awesome was => 2m
169
169
  labels:
170
170
  severity: warning
171
171
  annotations:
@@ -295,7 +295,7 @@ spec:
295
295
  LABELS = {{ $labels }}
296
296
  - alert: KubernetesDaemonsetRolloutStuck
297
297
  expr: kube_daemonset_status_number_ready / kube_daemonset_status_desired_number_scheduled * 100 < 100 or kube_daemonset_status_desired_number_scheduled - kube_daemonset_status_current_number_scheduled > 0
298
- for: 10m
298
+ for: 15m # awesome was 10m
299
299
  labels:
300
300
  severity: warning
301
301
  annotations:
@@ -349,7 +349,24 @@ spec:
349
349
  VALUE = {{ $value }}
350
350
  LABELS = {{ $labels }}
351
351
  - alert: KubernetesApiClientErrors
352
- expr: (sum(rate(rest_client_requests_total{code=~"(4|5).."}[1m])) by (instance, job) / sum(rate(rest_client_requests_total[1m])) by (instance, job)) * 100 > 1
352
+ # awesome expr: (sum(rate(rest_client_requests_total{code=~"(4|5).."}[1m])) by (instance, job) / sum(rate(rest_client_requests_total[1m])) by (instance, job)) * 100 > 1
353
+ expr: |
354
+ (
355
+ (
356
+ sum by (instance, job) (
357
+ rate(
358
+ rest_client_requests_total{
359
+ code=~"(4|5)..",
360
+ code!~"403|404|409"
361
+ }[5m]
362
+ )
363
+ )
364
+ /
365
+ sum by (instance, job) (
366
+ rate(rest_client_requests_total[5m])
367
+ )
368
+ ) * 100
369
+ ) > 1
353
370
  for: 5m
354
371
  labels:
355
372
  severity: critical
@@ -130,10 +130,10 @@ spec:
130
130
  VALUE = {{ $value }}
131
131
  LABELS = {{ $labels }}
132
132
  - alert: PrometheusRuleEvaluationFailures
133
- expr: increase(prometheus_rule_evaluation_failures_total[5m]) > 0 # awesome was 3m
134
- for: 5m # awesome was 0m
133
+ expr: increase(prometheus_rule_evaluation_failures_total[5m]) > 5
134
+ for: 10m # awesome was 0m
135
135
  labels:
136
- severity: critical
136
+ severity: warning # awesome was critical
137
137
  annotations:
138
138
  summary: Prometheus rule evaluation failures (instance {{ $labels.instance }})
139
139
  description: |-
@@ -9,7 +9,7 @@ spec:
9
9
  - name: Velero
10
10
  rules:
11
11
  - alert: VeleroBackupFailure
12
- expr: (time() - velero_backup_last_successful_timestamp{schedule_version=~"2.[0]"} > 108000) and (velero_backup_success_total{schedule!=""} != 0)
12
+ expr: (time() - velero_backup_last_successful_timestamp > 108000) and (velero_backup_success_total{schedule!=""} != 0)
13
13
  for: 5m
14
14
  labels:
15
15
  severity: warning
package/src/helmup.sh CHANGED
@@ -12,7 +12,7 @@ REGISTRY_DOMAIN="us-docker.pkg.dev"
12
12
  # open container initiative (oci) => https://opencontainers.org/
13
13
  ARTIFACT_REGISTRY="oci://$REGISTRY_DOMAIN/leverege-registry"
14
14
  # login to the registry in the background
15
- gcloud auth print-access-token | helm registry login \
15
+ gcloud auth application-default print-access-token | helm registry login \
16
16
  -u oauth2accesstoken --password-stdin $REGISTRY_DOMAIN &> $DEVNULL
17
17
 
18
18
  # make sure we have a current npmrc file
@@ -3,7 +3,6 @@
3
3
  import path from 'node:path'
4
4
 
5
5
  import { debug, getGitDiff, } from './Utils.mjs'
6
-
7
6
  import Config from './hook-and-release/index.mjs'
8
7
 
9
8
  const harConfig = await Config.create()
package/src/k8x.sh CHANGED
@@ -63,6 +63,10 @@ K8X_HELP
63
63
  FZFQ="--query=redis" && cmd='redis-cli'
64
64
  ;;
65
65
 
66
+ "valkey"|"valkey-cli")
67
+ FZFQ="--query=valkey" && cmd='valkey-cli'
68
+ ;;
69
+
66
70
  *)
67
71
  FZFQ="--query=$cmd" && cmd='bash'
68
72
  ;;
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { Command } from 'commander'
4
+
4
5
  import { shellCmd, log, warning, errorExit } from './Utils.mjs'
5
6
 
6
7
  const program = new Command()
@@ -11,7 +11,7 @@ exit 1
11
11
 
12
12
  function leveregeBuildToolsRefreshPyIdx() {
13
13
  # Execute gcloud command to get the token
14
- local TOKEN=$(gcloud auth print-access-token)
14
+ local TOKEN=$(gcloud auth application-default print-access-token)
15
15
 
16
16
  # Write to pip.conf
17
17
  local PIP_CONFIG_DIR="$HOME/.config/pip"