@leverege/build-tools 2.16.0 → 2.16.2

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.
@@ -110,6 +110,14 @@ if (!fs.existsSync('overwhelm.yaml')) {
110
110
 
111
111
  const yaml = YAML.load(fs.readFileSync('overwhelm.yaml', 'utf-8'));
112
112
  const over = yaml.default;
113
+
114
+ if (process.env.OVERWHELM_DEBUG) {
115
+ console.log({
116
+ over,
117
+ yaml
118
+ }, '<==Contents of the over and yaml structs');
119
+ }
120
+
113
121
  let cfgs = yaml[context]; // If we just need to check context return 0 if cfgs exists, else error.
114
122
 
115
123
  if (args.checkctx) {
@@ -347,7 +355,6 @@ if (over.PROJECT_NAME === 'minikube') {
347
355
  process.exit(0);
348
356
  }
349
357
 
350
- console.log(over, `XXXXX=>[${clusterName}]`);
351
358
  const projectId = over.PROJECT_ID;
352
359
  let zone = over['GCE_REGION'] + (over['GCE_ZONE'] ? `-${over['GCE_ZONE']}` : '');
353
360
 
Binary file
@@ -110,6 +110,14 @@ if (!fs.existsSync('overwhelm.yaml')) {
110
110
 
111
111
  const yaml = YAML.load(fs.readFileSync('overwhelm.yaml', 'utf-8'));
112
112
  const over = yaml.default;
113
+
114
+ if (process.env.OVERWHELM_DEBUG) {
115
+ console.log({
116
+ over,
117
+ yaml
118
+ }, '<==Contents of the over and yaml structs');
119
+ }
120
+
113
121
  let cfgs = yaml[context]; // If we just need to check context return 0 if cfgs exists, else error.
114
122
 
115
123
  if (args.checkctx) {
@@ -347,7 +355,6 @@ if (over.PROJECT_NAME === 'minikube') {
347
355
  process.exit(0);
348
356
  }
349
357
 
350
- console.log(over, `XXXXX=>[${clusterName}]`);
351
358
  const projectId = over.PROJECT_ID;
352
359
  let zone = over['GCE_REGION'] + (over['GCE_ZONE'] ? `-${over['GCE_ZONE']}` : '');
353
360
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.16.0",
3
+ "version": "2.16.2",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -54,14 +54,12 @@
54
54
  "command-line-args": "^5.2.1",
55
55
  "command-line-usage": "^6.1.3",
56
56
  "deepmerge": "^4.2.2",
57
- "dotenv": "^16.0.1",
58
57
  "execa": "^5.1.1",
59
58
  "figlet": "^1.5.2",
60
59
  "glob": "^7.2.3",
61
60
  "inquirer": "^8.2.4",
62
61
  "js-yaml": "^4.1.0",
63
62
  "ncp": "^2.0.0",
64
- "npm-check-updates": "^13.1.2",
65
63
  "npm-registry-fetch": "^11.0.0",
66
64
  "open": "^8.4.0",
67
65
  "ora": "^5.4.1",
@@ -71,11 +69,11 @@
71
69
  "simple-git": "^3.10.0"
72
70
  },
73
71
  "devDependencies": {
74
- "@babel/cli": "^7.17.10",
75
- "@babel/core": "^7.18.5",
76
- "@babel/node": "^7.18.5",
72
+ "@babel/cli": "^7.18.6",
73
+ "@babel/core": "^7.18.6",
74
+ "@babel/node": "^7.18.6",
77
75
  "@leverege/babel-preset-leverege-node": "^2.0.0",
78
76
  "@leverege/eslint-config-leverege": "^3.0.1",
79
- "npm": "^8.13.1"
77
+ "npm": "^8.13.2"
80
78
  }
81
79
  }
package/src/bash-funcs CHANGED
@@ -95,8 +95,6 @@ INSTALLING
95
95
  }
96
96
 
97
97
  function addHelmRepo() {
98
- [ ! -z "$HELM_REPO_SKIP" ] && return
99
-
100
98
  local chart=$1
101
99
  local url=$2
102
100
 
@@ -109,6 +107,6 @@ REPOADD
109
107
  }
110
108
 
111
109
  function removeHelmRepo(){
112
- [ ! -z "$HELM_REPO_SKIP" ] && return
110
+ [ ! -z "$SKIP_RM_HELM_REPO" ] && return
113
111
  helm repo remove $1 &>/dev/null
114
112
  }
package/src/helmup CHANGED
@@ -140,13 +140,13 @@ function createNamespaceIfNeeded(){
140
140
  function installPrometheus() {
141
141
  # Add the community helm repositories
142
142
  addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
143
-
143
+ [ -z "$PROMETHEUS_HELM_CHART" ] && PROMETHEUS_HELM_CHART="13"
144
144
  helm upgrade --install prometheus prometheus-community/prometheus \
145
145
  --namespace monitoring \
146
146
  --values prometheus/values.yaml \
147
- --version 13
147
+ --version $PROMETHEUS_HELM_CHART
148
148
 
149
- # removeHelmRepo prometheus-community
149
+ removeHelmRepo prometheus-community
150
150
  }
151
151
 
152
152
  function installRedis() {
@@ -208,6 +208,17 @@ replica:
208
208
  values:
209
209
  - database
210
210
  REDIS_CHART_MODS
211
+ if [[ $? -ne 0 ]];
212
+ then
213
+ clearlyWarn noclear
214
+ cat<<OLDER_REDIS
215
+ The redis upgrade failed which may mean that the versions are different
216
+ enough that k8s cannot gracefully upgrade from one version to the next.
217
+ Try removing the existing deployment and redeploying redis:
218
+
219
+ $ `color r "helmdn redis && sleep 5 && helmup redis"`
220
+ OLDER_REDIS
221
+ fi
211
222
  printf "\n\nTo start a specific version => `color g 'REDIS_HELM_CHART="13.0.1" helmup redis'`\n\n"
212
223
  removeHelmRepo bitnami
213
224
  }
@@ -378,7 +389,7 @@ function getManagedSecret() {
378
389
 
379
390
  # https://github.com/estafette/estafette-gke-preemptible-killer
380
391
  function installPreemptibleKiller() {
381
- showInstalling "Preemptible Node Killing Adjusticator"
392
+ showInstalling "Preemptible Node Killing Coordinator"
382
393
  NAMESPACE="estafette"
383
394
  PROJECT_ID="$(getProjectIdFromK8sContext)"
384
395
  SVC_ACCT="preemptible-killer"
@@ -715,7 +726,7 @@ function installVelero() {
715
726
  ## Helpful debugging link => https://github.com/vmware-tanzu/helm-charts/issues/351
716
727
  addHelmRepo vmware-tanzu https://vmware-tanzu.github.io/helm-charts
717
728
  helm upgrade --install velero vmware-tanzu/velero \
718
- --version 2.29 \
729
+ --version 2 \
719
730
  --namespace velero \
720
731
  --set credentials.useSecret="false" \
721
732
  --set configuration.provider="gcp" \
package/src/overwhelm.js CHANGED
@@ -64,6 +64,10 @@ if ( !fs.existsSync( 'overwhelm.yaml' ) ) {
64
64
  //
65
65
  const yaml = YAML.load( fs.readFileSync( 'overwhelm.yaml', 'utf-8' ) )
66
66
  const over = yaml.default
67
+ if ( process.env.OVERWHELM_DEBUG ) {
68
+ console.log( { over, yaml }, '<==Contents of the over and yaml structs' )
69
+ }
70
+
67
71
  let cfgs = yaml[context]
68
72
 
69
73
  // If we just need to check context return 0 if cfgs exists, else error.
@@ -289,7 +293,6 @@ const clusterName = over.CLUSTER_NAME
289
293
  if ( over.PROJECT_NAME === 'minikube' ) {
290
294
  process.exit(0)
291
295
  }
292
- console.log( over, `XXXXX=>[${clusterName}]` )
293
296
  const projectId = over.PROJECT_ID
294
297
  let zone = over['GCE_REGION'] + ( over['GCE_ZONE'] ? `-${over['GCE_ZONE']}` : '' )
295
298