@leverege/build-tools 2.113.3 → 2.113.5-pedro.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.113.3",
3
+ "version": "2.113.5-pedro.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
package/src/bash-funcs CHANGED
@@ -120,6 +120,18 @@ function getManagedSecret() {
120
120
  echo "$SECRET"
121
121
  }
122
122
 
123
+ # Fail fast when gcloud cannot mint tokens. Downstream tools capture gcloud
124
+ # output, so reauthentication cannot prompt there; surfacing it here lets
125
+ # gcloud reauth interactively on the TTY when policy allows. stdout goes to a
126
+ # literal /dev/null (NOT $DEVNULL, which is /dev/stderr in debug mode) so the
127
+ # access tokens are never printed.
128
+ function errorIfStaleGcloudAuth() {
129
+ gcloud auth print-access-token > /dev/null
130
+ exitOnError $? "GCP credentials expired. Please run: `color g 'gcloud auth login'`"
131
+ gcloud auth application-default print-access-token > /dev/null
132
+ exitOnError $? "GCP application-default credentials expired. Please run: `color g 'gcloud auth application-default login'`"
133
+ }
134
+
123
135
  function getProjectIdFromK8sContext() {
124
136
  local currContext=`kubectl config current-context`
125
137
 
@@ -1,7 +1,7 @@
1
1
  version: 2.1
2
2
 
3
3
  orbs:
4
- leverege: leverege/circle-nodejs-ci@2.2.1
4
+ leverege: leverege/circle-nodejs-ci@2.2.2
5
5
 
6
6
  workflows:
7
7
  build-and-verify:
@@ -18,7 +18,7 @@ import {
18
18
  warning,
19
19
  } from '../Utils.mjs'
20
20
 
21
- const ORB_VERSION = '2.2.1' // Keep this in sync with the versions in circle-npm.yml and circle-yarn.yml
21
+ const ORB_VERSION = '2.2.2' // Keep this in sync with the versions in circle-npm.yml and circle-yarn.yml
22
22
  const CIRCLE_DIR = '.circleci'
23
23
  const CIRCLE_YML = `${CIRCLE_DIR}/config.yml`
24
24
  const CIRCLE_NPM_TEMPLATE = path.join( BUILD_TOOLS_ROOT, 'circle-orb-it', 'circle-npm.yml' )
@@ -1,7 +1,7 @@
1
1
  version: 2.1
2
2
 
3
3
  orbs:
4
- leverege: leverege/circle-nodejs-ci@2.2.1
4
+ leverege: leverege/circle-nodejs-ci@2.2.2
5
5
 
6
6
  workflows:
7
7
  build-and-verify:
@@ -69,63 +69,67 @@ x-esSchduling: &esScheduling
69
69
  value: "true"
70
70
  effect: "NoSchedule"
71
71
 
72
- # coord nodes needed a heapSize and memory boost
72
+ # Always set explicit heapSize for all node types. Bitnami defaults to 128m
73
+ # which is too small for any real workload and will cause circuit breaker trips
74
+ # under load. Scale these up per-cluster based on node pool size and workload.
75
+ # Rule of thumb: memory limit >= 2x heapSize to cover off-heap overhead (metaspace,
76
+ # code cache, thread stacks). Setting limit == heapSize will pin the container at 100%.
77
+ #
73
78
  coordinating:
74
79
  <<: *esScheduling
75
80
  replicaCount: 3
76
- heapSize: 384m
81
+ heapSize: 512m
77
82
  resources:
78
83
  limits:
79
84
  cpu: 750m
80
- memory: 2Gi
85
+ memory: 1Gi
81
86
  ephemeral-storage: 2Gi
82
87
  requests:
83
- cpu: 500m
84
- memory: 512Mi
88
+ cpu: 250m
89
+ memory: 768Mi
85
90
  ephemeral-storage: 50Mi
86
91
 
87
92
  data:
88
93
  <<: *esScheduling
89
94
  replicaCount: 3
95
+ heapSize: 1024m
90
96
  resources:
91
97
  limits:
92
98
  cpu: 750m
93
99
  ephemeral-storage: 2Gi
94
- memory: 8Gi # def was 1536Mi
100
+ memory: 2Gi
95
101
  requests:
96
102
  cpu: 500m
97
103
  ephemeral-storage: 50Mi
98
- memory: 4Gi
104
+ memory: 1536Mi
99
105
  persistence:
100
106
  enabled: true
101
- size: 64Gi
107
+ size: 20Gi # scale up based on expected data volume
102
108
 
103
109
  ingest:
104
110
  <<: *esScheduling
105
111
  replicaCount: 3
106
- #resourcesPreset: "medium"
112
+ heapSize: 256m
107
113
  resources:
108
114
  limits:
109
115
  cpu: 750m
110
- ephemeral-storage: 4Gi
111
- memory: 1536Mi
116
+ ephemeral-storage: 2Gi
117
+ memory: 512Mi
112
118
  requests:
113
- cpu: 500m
114
- ephemeral-storage: 100Mi
115
- memory: 1024Mi
116
- # no default resources specified
119
+ cpu: 250m
120
+ ephemeral-storage: 50Mi
121
+ memory: 384Mi
117
122
 
118
123
  master:
119
124
  <<: *esScheduling
120
125
  replicaCount: 3
121
- # resources: # example from the bitnami chart
122
- # ## Example:
123
- # ## limits:
124
- # ## cpu: 500m
125
- # ## memory: 1Gi
126
- # limits: {}
127
- # ## Examples:
128
- # ## requests:
129
- # ## cpu: 250m
130
- # ## memory: 256Mi
131
- # requests: {}
126
+ heapSize: 256m
127
+ resources:
128
+ limits:
129
+ cpu: 500m
130
+ ephemeral-storage: 2Gi
131
+ memory: 768Mi
132
+ requests:
133
+ cpu: 250m
134
+ ephemeral-storage: 50Mi
135
+ memory: 512Mi
package/src/helmup.sh CHANGED
@@ -85,6 +85,9 @@ BAD_IDEA
85
85
  exit 1
86
86
  fi
87
87
 
88
+ # stop here rather than half way through a deploy if the creds cannot mint tokens
89
+ errorIfStaleGcloudAuth
90
+
88
91
  # artifact-registry => https://console.cloud.google.com/artifacts?project=leverege-registry
89
92
  REGISTRY_DOMAIN="us-docker.pkg.dev"
90
93
  # open container initiative (oci) => https://opencontainers.org/
@@ -95,6 +98,7 @@ gcloud auth application-default print-access-token | helm registry login \
95
98
 
96
99
  # make sure we have a current npmrc file
97
100
  refresh-npm-token
101
+ exitOnError $? "refresh-npm-token failed - the rc files were not refreshed"
98
102
 
99
103
  # removed geotile-server from standard platform 3/20/22 - low usage
100
104
  PLATFORM=(
@@ -2,6 +2,7 @@
2
2
  "description": "Leverege read / write access to Storage Objects",
3
3
  "includedPermissions": [
4
4
  "storage.buckets.create",
5
+ "storage.buckets.delete",
5
6
  "storage.buckets.get",
6
7
  "storage.buckets.getIamPolicy",
7
8
  "storage.buckets.list",