@leverege/build-tools 2.33.2 → 2.34.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.33.2",
3
+ "version": "2.34.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -56,24 +56,25 @@
56
56
  "command-line-args": "^5.2.1",
57
57
  "command-line-usage": "^6.1.3",
58
58
  "deepmerge": "^4.3.1",
59
- "dotenv": "^16.1.4",
59
+ "dotenv": "^16.3.1",
60
60
  "enquirer": "^2.3.6",
61
61
  "execa": "^5.1.1",
62
+ "get-bin-path": "^10.0.0",
62
63
  "glob": "^8.1.0",
63
64
  "js-yaml": "^4.1.0",
64
65
  "npm-registry-fetch": "^13.3.1",
65
66
  "parse-gitignore": "^2.0.0",
66
67
  "read-pkg": "^8.0.0",
67
68
  "readline-sync": "^1.4.10",
68
- "semver": "^7.5.1",
69
- "simple-git": "^3.19.0",
70
- "zx": "^7.2.2"
69
+ "semver": "^7.5.4",
70
+ "simple-git": "^3.19.1",
71
+ "zx": "^7.2.3"
71
72
  },
72
73
  "devDependencies": {
73
- "@babel/cli": "^7.22.5",
74
- "@babel/core": "^7.22.5",
74
+ "@babel/cli": "^7.22.9",
75
+ "@babel/core": "^7.22.9",
75
76
  "@leverege/babel-preset-leverege-node": "^2.0.0",
76
77
  "@leverege/eslint-config-leverege": "^3.0.1",
77
- "npm": "^9.7.1"
78
+ "npm": "^9.8.0"
78
79
  }
79
80
  }
@@ -0,0 +1,150 @@
1
+ version: 2.1
2
+ jobs:
3
+ install:
4
+ docker:
5
+ - image: $CIRCLE_NODE_IMG
6
+ steps:
7
+ - checkout
8
+ - restore_cache:
9
+ keys:
10
+ - v1-npm-deps-{{ checksum "package-lock.json" }}
11
+ - v1-npm-deps-
12
+
13
+ - run:
14
+ name: Setup @leverege Token
15
+ command: echo \${NPMRC} > ~/.npmrc
16
+
17
+ - run: npm install
18
+
19
+ - save_cache:
20
+ key: v1-npm-deps-{{ checksum "package-lock.json" }}
21
+ paths:
22
+ - ./node_modules
23
+
24
+ - persist_to_workspace:
25
+ root: /home/circleci/project
26
+ paths:
27
+ - ./node_modules
28
+
29
+ security-check:
30
+ docker:
31
+ - image: $CIRCLE_NODE_IMG
32
+ steps:
33
+ - checkout
34
+ - attach_workspace:
35
+ at: ~/project
36
+ - run:
37
+ name: Check for vulnerabilities
38
+ command: npm audit --production --audit-level=moderate
39
+
40
+ license-check:
41
+ docker:
42
+ - image: $CIRCLE_NODE_IMG
43
+ steps:
44
+ - checkout
45
+ - attach_workspace:
46
+ at: ~/project
47
+ - run:
48
+ name: Check for LICENSE and README files
49
+ command: npm run pkglint
50
+
51
+ - run:
52
+ name: Check for license violations (e.g. GPL)
53
+ command: npx license-checker --production --summary --failOn GPL
54
+
55
+ lint:
56
+ docker:
57
+ - image: $CIRCLE_NODE_IMG
58
+ steps:
59
+ - checkout
60
+ - attach_workspace:
61
+ at: ~/project
62
+ - run:
63
+ name: Lint and save results
64
+ command: npm run lint-ci
65
+
66
+ - store_test_results:
67
+ path: reports
68
+
69
+ docs:
70
+ docker:
71
+ - image: $CIRCLE_NODE_IMG
72
+ steps:
73
+ - checkout
74
+ - attach_workspace:
75
+ at: ~/project
76
+ - run:
77
+ name: Generate docs
78
+ command: npx jsdoc -r src -R README.md -d docs
79
+ - store_artifacts:
80
+ path: docs
81
+ prefix: docs
82
+
83
+ coverage:
84
+ # coverage runs tests, generates coverage, and saves docs
85
+ environment:
86
+ TZ: 'America/New_York'
87
+ docker:
88
+ - image: $CIRCLE_NODE_IMG
89
+ # IF YOU NEED ANY OF THESE, UNCOMMENT TO USE
90
+ # - image: redis
91
+ # - image: circleci/mysql:5.7
92
+ # environment:
93
+ # MYSQL_USER: root
94
+ # MYSQL_ROOT_PASSWORD: root
95
+ # MYSQL_ALLOW_EMPTY_PASSWORD: true
96
+ # MYSQL_HOST: 127.0.0.1
97
+ # - image: nsqio/nsq
98
+ # command: /nsqlookupd -broadcast-address localhost:4160 -tcp-address 0.0.0.0:4160 -http-address 0.0.0.0:4161
99
+
100
+ # - image: nsqio/nsq
101
+ # command: >
102
+ # /nsqd
103
+ # -broadcast-address localhost:4150
104
+ # -tcp-address 0.0.0.0:4150
105
+ # -http-address 0.0.0.0:4151
106
+ # -lookupd-tcp-address localhost:4160
107
+
108
+ steps:
109
+ - checkout
110
+ - attach_workspace:
111
+ at: ~/project
112
+
113
+ # UNCOMMENT IF YOU NEED DECRYPTING SECRETS
114
+ # - run:
115
+ # name: Load secrets
116
+ # command: npm run decrypt
117
+
118
+ - run:
119
+ name: Run Tests and Generate Code Coverage
120
+ command: npm run coverage
121
+
122
+ - run:
123
+ name: Check if coverage meets at least 70%
124
+ command: npx c8 check-coverage --functions 70 --lines 70 --statements 70
125
+
126
+ - store_artifacts:
127
+ path: coverage
128
+ prefix: coverage
129
+
130
+ workflows:
131
+ version: 2.1
132
+ test-build-deploy:
133
+ jobs:
134
+ - install:
135
+ context: npm
136
+ - security-check:
137
+ requires:
138
+ - install
139
+ - license-check:
140
+ requires:
141
+ - install
142
+ - lint:
143
+ requires:
144
+ - install
145
+ - coverage:
146
+ requires:
147
+ - install
148
+ - docs:
149
+ requires:
150
+ - install
@@ -0,0 +1,213 @@
1
+ version: 2.1
2
+ #orbs:
3
+ # gcp-gcr: circleci/gcp-gcr@0.6.1
4
+ executors:
5
+ default:
6
+ description: >
7
+ A debian-based machine executor.
8
+ machine: true
9
+ jobs:
10
+ install:
11
+ docker:
12
+ - image: $CIRCLE_NODE_IMG
13
+ steps:
14
+ - checkout
15
+ - restore_cache:
16
+ keys:
17
+ - v1-npm-deps-{{ checksum "package-lock.json" }}
18
+ - v1-npm-deps-
19
+
20
+ - run:
21
+ name: Setup @leverege Token
22
+ command: echo \${NPMRC} > ~/.npmrc
23
+
24
+ - run: npm install
25
+
26
+ - save_cache:
27
+ key: v1-npm-deps-{{ checksum "package-lock.json" }}
28
+ paths:
29
+ - ./node_modules
30
+
31
+ - persist_to_workspace:
32
+ root: /home/circleci/project
33
+ paths:
34
+ - ./node_modules
35
+
36
+ security-check:
37
+ docker:
38
+ - image: $CIRCLE_NODE_IMG
39
+ steps:
40
+ - checkout
41
+ - attach_workspace:
42
+ at: ~/project
43
+ - run:
44
+ name: Check for vulnerabilities
45
+ command: npm audit --production --audit-level=moderate
46
+
47
+ license-check:
48
+ docker:
49
+ - image: $CIRCLE_NODE_IMG
50
+ steps:
51
+ - checkout
52
+ - attach_workspace:
53
+ at: ~/project
54
+ - run:
55
+ name: Check for LICENSE and README files
56
+ command: npm run pkglint
57
+
58
+ - run:
59
+ name: Check for license violations (e.g. GPL)
60
+ command: npx license-checker --production --summary --failOn GPL
61
+
62
+ lint:
63
+ docker:
64
+ - image: $CIRCLE_NODE_IMG
65
+ steps:
66
+ - checkout
67
+ - attach_workspace:
68
+ at: ~/project
69
+ - run:
70
+ name: Lint and save results
71
+ command: npm run lint-ci
72
+
73
+ - store_test_results:
74
+ path: reports
75
+
76
+ docs:
77
+ docker:
78
+ - image: $CIRCLE_NODE_IMG
79
+ steps:
80
+ - checkout
81
+ - attach_workspace:
82
+ at: ~/project
83
+ - run:
84
+ name: Generate docs
85
+ command: npx jsdoc -r src -R README.md -d docs
86
+ - store_artifacts:
87
+ path: docs
88
+ prefix: docs
89
+
90
+ coverage:
91
+ # coverage runs tests, generates coverage, and saves docs
92
+ environment:
93
+ TZ: 'America/New_York'
94
+ docker:
95
+ - image: $CIRCLE_NODE_IMG
96
+ # IF YOU NEED ANY OF THESE, UNCOMMENT TO USE
97
+ # - image: redis
98
+ # - image: circleci/mysql:5.7
99
+ # environment:
100
+ # MYSQL_USER: root
101
+ # MYSQL_ROOT_PASSWORD: root
102
+ # MYSQL_ALLOW_EMPTY_PASSWORD: true
103
+ # MYSQL_HOST: 127.0.0.1
104
+ # - image: nsqio/nsq
105
+ # command: /nsqlookupd -broadcast-address localhost:4160 -tcp-address 0.0.0.0:4160 -http-address 0.0.0.0:4161
106
+
107
+ # - image: nsqio/nsq
108
+ # command: >
109
+ # /nsqd
110
+ # -broadcast-address localhost:4150
111
+ # -tcp-address 0.0.0.0:4150
112
+ # -http-address 0.0.0.0:4151
113
+ # -lookupd-tcp-address localhost:4160
114
+
115
+ steps:
116
+ - checkout
117
+ - attach_workspace:
118
+ at: ~/project
119
+
120
+ # UNCOMMENT IF YOU NEED DECRYPTING SECRETS
121
+ # - run:
122
+ # name: Load secrets
123
+ # command: npm run decrypt
124
+
125
+ - run:
126
+ name: Run Tests and Generate Code Coverage
127
+ command: npm run coverage
128
+
129
+ - run:
130
+ name: Check if coverage meets at least 70%
131
+ command: npx c8 check-coverage --functions 70 --lines 70 --statements 70
132
+
133
+ - store_artifacts:
134
+ path: coverage
135
+ prefix: coverage
136
+
137
+ build:
138
+ # build should make dist image and prepare docker file
139
+ docker:
140
+ - image: $CIRCLE_NODE_IMG
141
+
142
+ steps:
143
+ - checkout
144
+ - attach_workspace:
145
+ at: ~/project
146
+
147
+ - run:
148
+ name: Setup @leverege Token
149
+ command: echo \${NPMRC} > ~/.npmrc.ro
150
+
151
+ - run:
152
+ name: Determine version number and container name
153
+ command: |
154
+ container="\`node -p \"require('./package.json').leverege.container\"\`"
155
+ if [ "\$container" == "undefined" ];
156
+ then
157
+ container=\$CIRCLE_PROJECT_REPONAME
158
+ fi
159
+ NODE_IMAGE="\`node -p \"require('./package.json').leverege.nodeimg\"\`"
160
+
161
+ echo \$(git describe --tags) > package_version
162
+ echo \${container} > container_name
163
+ echo \${NODE_IMAGE} > node_img
164
+
165
+ - run:
166
+ name: Create Dockerfile and build dist directory
167
+ command: mkdir -p docker && npm run dockerize \$(git describe --tags)
168
+
169
+ - persist_to_workspace:
170
+ root: ~/project
171
+ paths:
172
+ - docker/*
173
+ - package_version
174
+ - container_name
175
+ - node_img
176
+
177
+ workflows:
178
+ version: 2.1
179
+ test-build-deploy:
180
+ jobs:
181
+ - install:
182
+ context: npm
183
+ - security-check:
184
+ requires:
185
+ - install
186
+ - license-check:
187
+ requires:
188
+ - install
189
+ - lint:
190
+ requires:
191
+ - install
192
+ - coverage:
193
+ requires:
194
+ - install
195
+ - docs:
196
+ requires:
197
+ - install
198
+ - build:
199
+ context: npm
200
+ filters:
201
+ branches:
202
+ only:
203
+ - development
204
+ - /release-.*/
205
+ - master
206
+ requires:
207
+ - install
208
+ - security-check
209
+ - license-check
210
+ - lint
211
+ - coverage
212
+ - docs
213
+
package/src/circleate CHANGED
@@ -11,6 +11,7 @@ fi
11
11
 
12
12
  repo_type=$1
13
13
  NODE_VERSION="hydrogen"
14
+ CIRCLE_NODE_IMG="cimg/node:lts"
14
15
 
15
16
  check_circle_config(){
16
17
  if [ -d "./.circleci" ];
@@ -54,7 +55,7 @@ executors:
54
55
  jobs:
55
56
  install:
56
57
  docker:
57
- - image: circleci/node:$NODE_VERSION
58
+ - image: $CIRCLE_NODE_IMG
58
59
  steps:
59
60
  - checkout
60
61
  - restore_cache:
@@ -80,7 +81,7 @@ jobs:
80
81
 
81
82
  security-check:
82
83
  docker:
83
- - image: circleci/node:$NODE_VERSION
84
+ - image: $CIRCLE_NODE_IMG
84
85
  steps:
85
86
  - checkout
86
87
  - attach_workspace:
@@ -91,7 +92,7 @@ jobs:
91
92
 
92
93
  license-check:
93
94
  docker:
94
- - image: circleci/node:$NODE_VERSION
95
+ - image: $CIRCLE_NODE_IMG
95
96
  steps:
96
97
  - checkout
97
98
  - attach_workspace:
@@ -106,7 +107,7 @@ jobs:
106
107
 
107
108
  lint:
108
109
  docker:
109
- - image: circleci/node:$NODE_VERSION
110
+ - image: $CIRCLE_NODE_IMG
110
111
  steps:
111
112
  - checkout
112
113
  - attach_workspace:
@@ -120,7 +121,7 @@ jobs:
120
121
 
121
122
  docs:
122
123
  docker:
123
- - image: circleci/node:$NODE_VERSION
124
+ - image: $CIRCLE_NODE_IMG
124
125
  steps:
125
126
  - checkout
126
127
  - attach_workspace:
@@ -136,9 +137,11 @@ jobs:
136
137
  # coverage runs tests, generates coverage, and saves docs
137
138
  environment:
138
139
  TZ: 'America/New_York'
140
+ CACHE_CONFIG: '{"type":"inMemory"}'
139
141
  docker:
140
- - image: circleci/node:$NODE_VERSION
142
+ - image: $CIRCLE_NODE_IMG
141
143
  # IF YOU NEED ANY OF THESE, UNCOMMENT TO USE
144
+ # Only enable redis if inMemory is insufficient
142
145
  # - image: redis
143
146
  # - image: circleci/mysql:5.7
144
147
  # environment:
@@ -182,46 +185,49 @@ jobs:
182
185
  build:
183
186
  # build should make dist image and prepare docker file
184
187
  docker:
185
- - image: circleci/node:$NODE_VERSION
188
+ - image: $CIRCLE_NODE_IMG
186
189
 
187
190
  steps:
188
- - checkout
189
- - attach_workspace:
190
- at: ~/project
191
-
192
- - run:
193
- name: Setup @leverege Token
194
- command: echo \${NPMRC} > ~/.npmrc.ro
195
-
196
- - run:
197
- name: Determine version number and container name
198
- command: |
199
- container="\`node -p \"require('./package.json').leverege.container\"\`"
200
- if [ "\$container" == "undefined" ];
201
- then
202
- container=\$CIRCLE_PROJECT_REPONAME
203
- fi
204
- NODE_IMAGE="\`node -p \"require('./package.json').leverege.nodeimg\"\`"
205
-
206
- echo \$(git describe --tags) > package_version
207
- echo \${container} > container_name
208
- echo \${NODE_IMAGE} > node_img
209
-
210
191
  - run:
211
- name: Create Dockerfile and build dist directory
212
- command: mkdir -p docker && npm run dockerize \$(git describe --tags)
213
-
214
- - persist_to_workspace:
215
- root: ~/project
216
- paths:
217
- - docker/*
218
- - package_version
219
- - container_name
220
- - node_img
192
+ name: CircleCI image build process - DEPRECATED 07/01/2023
193
+ command: echo "***CircleCI image builds deprecated 07/01/2023"
194
+ # - checkout
195
+ # - attach_workspace:
196
+ # at: ~/project
197
+
198
+ # - run:
199
+ # name: Setup @leverege Token
200
+ # command: echo \${NPMRC} > ~/.npmrc.ro
201
+
202
+ # - run:
203
+ # name: Determine version number and container name
204
+ # command: |
205
+ # container="\`node -p \"require('./package.json').leverege.container\"\`"
206
+ # if [ "\$container" == "undefined" ];
207
+ # then
208
+ # container=\$CIRCLE_PROJECT_REPONAME
209
+ # fi
210
+ # NODE_IMAGE="\`node -p \"require('./package.json').leverege.nodeimg\"\`"
211
+
212
+ # echo \$(git describe --tags) > package_version
213
+ # echo \${container} > container_name
214
+ # echo \${NODE_IMAGE} > node_img
215
+
216
+ # - run:
217
+ # name: Create Dockerfile and build dist directory
218
+ # command: mkdir -p docker && npm run dockerize \$(git describe --tags)
219
+
220
+ # - persist_to_workspace:
221
+ # root: ~/project
222
+ # paths:
223
+ # - docker/*
224
+ # - package_version
225
+ # - container_name
226
+ # - node_img
221
227
 
222
228
  workflows:
223
229
  version: 2.1
224
- test-build-deploy:
230
+ circle-srv-config:
225
231
  jobs:
226
232
  - install:
227
233
  context: npm
@@ -240,21 +246,21 @@ workflows:
240
246
  - docs:
241
247
  requires:
242
248
  - install
243
- - build:
244
- context: npm
245
- filters:
246
- branches:
247
- only:
248
- - development
249
- - /release-.*/
250
- - master
251
- requires:
252
- - install
253
- - security-check
254
- - license-check
255
- - lint
256
- - coverage
257
- - docs
249
+ # - build:
250
+ # context: npm
251
+ # filters:
252
+ # branches:
253
+ # only:
254
+ # - development
255
+ # - /release-.*/
256
+ # - master
257
+ # requires:
258
+ # - install
259
+ # - security-check
260
+ # - license-check
261
+ # - lint
262
+ # - coverage
263
+ # - docs
258
264
  EOCIRCLE
259
265
  }
260
266
 
@@ -264,7 +270,7 @@ version: 2.1
264
270
  jobs:
265
271
  install:
266
272
  docker:
267
- - image: circleci/node:$NODE_VERSION
273
+ - image: $CIRCLE_NODE_IMG
268
274
  steps:
269
275
  - checkout
270
276
  - restore_cache:
@@ -290,7 +296,7 @@ jobs:
290
296
 
291
297
  security-check:
292
298
  docker:
293
- - image: circleci/node:$NODE_VERSION
299
+ - image: $CIRCLE_NODE_IMG
294
300
  steps:
295
301
  - checkout
296
302
  - attach_workspace:
@@ -301,7 +307,7 @@ jobs:
301
307
 
302
308
  license-check:
303
309
  docker:
304
- - image: circleci/node:$NODE_VERSION
310
+ - image: $CIRCLE_NODE_IMG
305
311
  steps:
306
312
  - checkout
307
313
  - attach_workspace:
@@ -316,7 +322,7 @@ jobs:
316
322
 
317
323
  lint:
318
324
  docker:
319
- - image: circleci/node:$NODE_VERSION
325
+ - image: $CIRCLE_NODE_IMG
320
326
  steps:
321
327
  - checkout
322
328
  - attach_workspace:
@@ -330,7 +336,7 @@ jobs:
330
336
 
331
337
  docs:
332
338
  docker:
333
- - image: circleci/node:$NODE_VERSION
339
+ - image: $CIRCLE_NODE_IMG
334
340
  steps:
335
341
  - checkout
336
342
  - attach_workspace:
@@ -346,9 +352,11 @@ jobs:
346
352
  # coverage runs tests, generates coverage, and saves docs
347
353
  environment:
348
354
  TZ: 'America/New_York'
355
+ CACHE_CONFIG: '{"type":"inMemory"}'
349
356
  docker:
350
- - image: circleci/node:$NODE_VERSION
357
+ - image: $CIRCLE_NODE_IMG
351
358
  # IF YOU NEED ANY OF THESE, UNCOMMENT TO USE
359
+ # Only enable redis if inMemory is insufficient
352
360
  # - image: redis
353
361
  # - image: circleci/mysql:5.7
354
362
  # environment:
@@ -391,7 +399,7 @@ jobs:
391
399
 
392
400
  workflows:
393
401
  version: 2.1
394
- test-build-deploy:
402
+ circle-lib-config:
395
403
  jobs:
396
404
  - install:
397
405
  context: npm
@@ -477,7 +485,7 @@ jobs:
477
485
 
478
486
  build:
479
487
  docker:
480
- - image: circleci/node:$NODE_VERSION
488
+ - image: $CIRCLE_NODE_IMG
481
489
  steps:
482
490
  - checkout
483
491
  - restore_cache:
@@ -511,7 +519,7 @@ jobs:
511
519
 
512
520
  deploy-dev:
513
521
  docker:
514
- - image: circleci/node:$NODE_VERSION
522
+ - image: $CIRCLE_NODE_IMG
515
523
  steps:
516
524
  - attach_workspace:
517
525
  at: ~/project
@@ -522,7 +530,7 @@ jobs:
522
530
 
523
531
  deploy-prod:
524
532
  docker:
525
- - image: circleci/node:$NODE_VERSION
533
+ - image: $CIRCLE_NODE_IMG
526
534
  steps:
527
535
  - attach_workspace:
528
536
  at: ~/project
File without changes
@@ -0,0 +1 @@
1
+ geotile-local.yaml
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+ #
3
+ showInstalling "Geotile Server"
4
+
5
+ helm upgrade --install geotile-server leverege/geotile-server \
6
+ --values geotile-server/geotile-values.yaml
@@ -197,12 +197,12 @@ serverFiles:
197
197
 
198
198
  - alert: KubernetesPodNotHealthy
199
199
  expr: kube_pod_status_phase{phase=~"Pending|Unknown|Failed"} == 1
200
- for: 10m
200
+ for: 20m
201
201
  labels:
202
202
  severity: error
203
203
  annotations:
204
204
  summary: "Kubernetes Pod not healthy"
205
- description: "Pod {{ $labels.pod }} has been in a non-ready state for longer than 10 minutes."
205
+ description: "Pod {{ $labels.pod }} has been in a non-ready state for longer than 20 minutes."
206
206
  dashboard: "Check the pod status using the Kubernetes UI"
207
207
 
208
208
  - alert: KubernetesPodCrashLooping
@@ -4,7 +4,7 @@ showInstalling "Velero Backup System"
4
4
 
5
5
  addHelmRepo vmware-tanzu https://vmware-tanzu.github.io/helm-charts
6
6
 
7
- [ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="3"
7
+ [ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="4"
8
8
  #
9
9
  # Build the bucket, region and SA email variables and use --set to mod the
10
10
  # chart values as opposed to using an OVH:<label> approach. This eliminates
@@ -27,9 +27,9 @@ helm upgrade \
27
27
  --namespace velero --create-namespace \
28
28
  --values velero/velero-local.yaml \
29
29
  --version $VELERO_CHART_VERSION $HELM_WHAT \
30
- --set configuration.backupStorageLocation.bucket="$GCE_BUCKET" \
31
- --set configuration.backupStorageLocation.config.serviceAccount="$GCE_SA_EMAIL" \
32
- --set configuration.volumeSnapshotLocation.config.snapshotLocation="$GCE_REGION"
30
+ --set configuration.backupStorageLocation[0].bucket="$GCE_BUCKET" \
31
+ --set configuration.backupStorageLocation[0].config.serviceAccount="$GCE_SA_EMAIL" \
32
+ --set configuration.volumeSnapshotLocation[0].config.snapshotLocation="$GCE_REGION"
33
33
 
34
34
  velero schedule get
35
35
  cat<<DONE_VELERO
@@ -101,13 +101,14 @@ initContainers:
101
101
  ## and additional server settings.
102
102
  ##
103
103
  configuration:
104
- # Cloud provider being used (e.g. aws, azure, gcp).
105
- provider: gcp
106
-
104
+ backupStorageLocation:
105
+ - name: default
106
+ provider: gcp
107
107
  # Parameters for the `default` VolumeSnapshotLocation. See
108
108
  # https://velero.io/docs/v1.6/api-types/volumesnapshotlocation/
109
109
  volumeSnapshotLocation:
110
- name: default
110
+ - name: default
111
+ provider: gcp
111
112
 
112
113
  # Information about the Kubernetes service account Velero uses. The SA is
113
114
  # created and bound the first time helmup deploys the service. No need to
package/src/helmup CHANGED
@@ -317,40 +317,35 @@ function installPreemptibleKiller() {
317
317
  }
318
318
 
319
319
  function installCronZombieKiller() {
320
- local BATCH_SYNTAX='batch/v1' # GKE 1.21 and beyond
321
- [ ! -z "$PRE_GKE_21" ] && BATCH_SYNTAX='batch/v1beta1'
322
320
  cat<<END_OF_ZOMBIE | kubectl apply -f -
323
321
  apiVersion: v1
324
322
  kind: ServiceAccount
325
323
  metadata:
326
324
  name: cron-zombie-sa
327
- namespace: default
328
325
  ---
329
326
  apiVersion: rbac.authorization.k8s.io/v1
330
- kind: Role
327
+ kind: ClusterRole
331
328
  metadata:
332
- name: pod-accessor-role
333
- namespace: default
329
+ name: cron-zombie-role
334
330
  rules:
335
331
  - apiGroups: [""]
336
332
  resources: ["pods"]
337
- verbs: ["get","delete","watch","list"]
333
+ verbs: ["list", "delete"]
338
334
  ---
339
335
  apiVersion: rbac.authorization.k8s.io/v1
340
- kind: RoleBinding
336
+ kind: ClusterRoleBinding
341
337
  metadata:
342
- name: pod-access
343
- namespace: default
338
+ name: cron-zombie-role-binding
339
+ roleRef:
340
+ apiGroup: rbac.authorization.k8s.io
341
+ kind: ClusterRole
342
+ name: cron-zombie-role
344
343
  subjects:
345
344
  - kind: ServiceAccount
346
345
  name: cron-zombie-sa
347
346
  namespace: default
348
- roleRef:
349
- kind: Role
350
- name: pod-accessor-role
351
- apiGroup: ""
352
347
  ---
353
- apiVersion: $BATCH_SYNTAX
348
+ apiVersion: batch/v1
354
349
  kind: CronJob
355
350
  metadata:
356
351
  namespace: default
@@ -375,22 +370,9 @@ spec:
375
370
  - "/bin/sh"
376
371
  args:
377
372
  - "-c"
378
- - "echo Zombie Hunting `date` ; kubectl get pods -n default --field-selector='status.phase==Failed' -o name | xargs kubectl delete -n default 2> /dev/null"
373
+ - "echo 'Hunting Zombies' ; kubectl get pods --all-namespaces --field-selector=status.phase=Failed -o json | kubectl delete -f - 2> /dev/null"
379
374
  status: {}
380
375
  END_OF_ZOMBIE
381
-
382
- if [[ $? -eq 1 ]];
383
- then
384
- cat<<OLDER_GKE
385
-
386
- Deployment failed is the GKE version pre 1.21? Try rerunning with PRE_GKE_21 defined:
387
-
388
- $ `color y "PRE_GKE_21=1 helmup zombie-killer"`
389
-
390
-
391
- OLDER_GKE
392
- exit 1
393
- fi
394
376
  }
395
377
 
396
378
  function installCertManagerSecret() {
@@ -455,7 +437,7 @@ function installVeleroEnvironment() {
455
437
  gcloud config set project $GCP_PROJECT_ID
456
438
 
457
439
  ## The major chart version will determine the bucket suffix
458
- [ -z "$VELERO_HELM_CHART" ] && VELERO_HELM_CHART="3"
440
+ [ -z "$VELERO_HELM_CHART" ] && VELERO_HELM_CHART="4"
459
441
 
460
442
  ## Create a bucket
461
443
  BUCKET="$GCP_PROJECT_ID-velero-$VELERO_HELM_CHART"
@@ -1,15 +0,0 @@
1
- {
2
- "eslint.alwaysShowStatus": true,
3
- "[javascript]": {
4
- "editor.codeActionsOnSave": {
5
- "source.fixAll.eslint": true,
6
- "source.organizeImports": false
7
- }
8
- },
9
- "[javascriptreact]": {
10
- "editor.codeActionsOnSave": {
11
- "source.fixAll.eslint": true,
12
- "source.organizeImports": false
13
- }
14
- },
15
- }