@leverege/build-tools 2.6.6 → 2.6.7

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.6.6",
3
+ "version": "2.6.7",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/dockreate CHANGED
@@ -52,6 +52,7 @@ create_Dockerfile() {
52
52
  local regvers="${1}"
53
53
  local nodeimg="${2:-fermium-alpine}"
54
54
  local apkadds="${3}"
55
+
55
56
  echo "Creating the Dockerfile for node ${nodeimg}"
56
57
  cat<<DOCKERBLD > Dockerfile
57
58
  # Version ${regvers} @ `date`
@@ -73,11 +74,11 @@ ENV GRPC_VERBOSITY ERROR
73
74
 
74
75
  # Install packages to install private repos with ssh keys
75
76
  COPY ./.npmrc /usr/src/app/.npmrc
76
- RUN apk --no-cache add curl git openssh-client && \
77
+ RUN apk --no-cache add openssh-client && \
77
78
  apk --update add --no-cache --virtual build-dep g++ gcc libgcc \\
78
79
  libstdc++ linux-headers make python ${apkadds} && \
79
80
  npm install -g npm@7 && \
80
- npm ci --only-production --ignore-scripts --silent && \
81
+ npm ci --only-production --ignore-scripts ${npmlogging} && \
81
82
  rm -f /usr/src/app/.npmrc /root/.ssh/*
82
83
 
83
84
  # --------------------------------------------------------------
@@ -88,9 +89,11 @@ FROM node:${nodeimg}
88
89
 
89
90
  # Install tini for PID 1 and replace shell with bash so we can source files
90
91
  RUN apk update && \
91
- apk add --no-cache tini bash vim ${apkadds} && \
92
+ apk add --no-cache bash curl tini vim ${apkadds} && \
93
+ npm install -g npm@7 && \
92
94
  rm /bin/sh && ln -s /bin/bash /bin/sh && \
93
- mkdir -p /usr/src/app /tmp/levlog
95
+ mkdir -p /usr/src/app /tmp/levlog && \
96
+ chown node:node /usr/src/app
94
97
  DOCKERBLD
95
98
 
96
99
  if [ -f "${pluginFile}" ];
@@ -196,6 +199,9 @@ apkadds=$(strip_undefined "`node -p \"require('../package.json').leverege.apkadd
196
199
  runuser=$(strip_undefined "`node -p \"require('../package.json').leverege.runuser\"`")
197
200
  [ -z "${runuser}" ] && runuser='node'
198
201
 
202
+ npmlogging='--silent' # allow for verbose npm logs
203
+ [ "$VERBOSE_DOCKREATE_NPM" == "yes" ] && npmlogging='--ddd'
204
+
199
205
  echo "Updating dependencies and workspace..." && npm install
200
206
 
201
207
  container="`node -p \"require('../package.json').leverege.container\"`"
@@ -287,6 +293,7 @@ cat<<IMGINFO
287
293
  Project: $(colorize 'green' "$project")
288
294
  Container: $(colorize 'green' "$container")
289
295
  NodeImage: $(colorize 'green' "$nodeimg")
296
+ NPM Logs: $(colorize 'green' "$npmlogging")
290
297
  AddedPkgs: $(colorize 'green' "$apkadds")
291
298
  PluggedIn: ${pluggedIn}
292
299
  Version: $(colorize 'green' "$version") $tagstat
package/src/helmup CHANGED
@@ -31,6 +31,7 @@ SYSTEM=(
31
31
  postgres
32
32
  timescale-db
33
33
  monitoring
34
+ preemptible-killer
34
35
  reloader
35
36
  traefik
36
37
  velero
@@ -236,6 +237,14 @@ function getManagedSecret() {
236
237
  echo $SECRET
237
238
  }
238
239
 
240
+ # https://github.com/estafette/estafette-gke-preemptible-killer
241
+ function installPreemptibleKiller() {
242
+ helm repo add estafette https://helm.estafette.io &>/dev/null
243
+ helm upgrade --install estafette-gke-preemptible-killer \
244
+ estafette/estafette-gke-preemptible-killer --namespace estafette
245
+
246
+ }
247
+
239
248
  function installTraefik() {
240
249
  createNamespaceIfNeeded traefik
241
250
 
@@ -498,6 +507,10 @@ function doInstall() {
498
507
  helm upgrade --install postgres bitnami/postgresql -f postgres/postgres-values.yaml --version 8.9.6
499
508
  ;;
500
509
 
510
+ "preemptible-killer")
511
+ installPreemptibleKiller # the gke preemptible node spreader outer
512
+ ;;
513
+
501
514
  "redis")
502
515
  # https://github.com/helm/charts/tree/master/stable/redis
503
516
  [ -z "$REDIS_HELM_CHART" ] && REDIS_HELM_CHART="v9.1.5"