@leverege/build-tools 2.49.0 → 2.50.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.
Files changed (35) hide show
  1. package/leverege-build-tools-2.21.13.tgz +0 -0
  2. package/lib/server/build-tools.js +138 -0
  3. package/lib/server/firebaseDeploy.js +195 -0
  4. package/lib/server/firebaseServe.js +116 -0
  5. package/lib/server/getfbcfg.js +25 -0
  6. package/lib/server/getjson.js +70 -0
  7. package/lib/server/overwhelm.js +447 -0
  8. package/lib/server/push-my-chart.js +18 -0
  9. package/lib/server/refresh-npm-token.js +135 -0
  10. package/lib/server/tag-release.js +681 -0
  11. package/lib/server/unleash.js +50 -0
  12. package/lib/web/build-tools.js +138 -0
  13. package/lib/web/firebaseDeploy.js +195 -0
  14. package/lib/web/firebaseServe.js +116 -0
  15. package/lib/web/getfbcfg.js +25 -0
  16. package/lib/web/getjson.js +70 -0
  17. package/lib/web/overwhelm.js +447 -0
  18. package/lib/web/push-my-chart.js +18 -0
  19. package/lib/web/refresh-npm-token.js +135 -0
  20. package/lib/web/tag-release.js +681 -0
  21. package/lib/web/unleash.js +50 -0
  22. package/package.json +7 -7
  23. package/src/firebaseDeploy.mjs +16 -13
  24. package/src/firebaseServe.mjs +4 -1
  25. package/src/helm-charts/cnpg-db-pgbench/helmup.plugin +1 -1
  26. package/src/helm-charts/cnpg-db-psql-stack/{cnpg-db-psql-stack.yaml.ovh → cluster.yaml.ovh} +16 -2
  27. package/src/helm-charts/cnpg-db-psql-stack/helmup.plugin +1 -1
  28. package/src/helm-charts/cnpg-db-tsdb-basic/{cnpg-db-tsdb-basic.yaml.ovh → cluster.yaml.ovh} +24 -14
  29. package/src/helm-charts/cnpg-db-tsdb-basic/helmup.plugin +1 -1
  30. package/src/helm-charts/cnpg-db-tsdb-dense/{cnpg-db-tsdb-dense.yaml.ovh → cluster.yalm.ovh} +18 -9
  31. package/src/helm-charts/cnpg-db-tsdb-dense/helmup.plugin +1 -3
  32. package/registry-compass.yaml +0 -20
  33. package/src/chart-compass.mjs +0 -96
  34. /package/src/{cnpg-snapshot.mjs → cnpg-backup.mjs} +0 -0
  35. /package/src/helm-charts/cnpg-db-pgbench/{cnpg-db-pgbench.yaml.ovh → cluster.yaml.ovh} +0 -0
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ var _execa = _interopRequireDefault(require("execa"));
5
+ var _simpleGit = _interopRequireDefault(require("simple-git"));
6
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7
+ const git = new _simpleGit.default();
8
+ const getCurrentBranchName = async () => {
9
+ const branchInfo = await git.branch();
10
+
11
+ // first check to see if there are no branches - new repo?
12
+ if (Object.keys(branchInfo.branches).length === 0) {
13
+ return '';
14
+ }
15
+ return Object.entries(branchInfo.branches).find(([name, info]) => info.current)[0];
16
+ };
17
+ const isProtected = async () => {
18
+ const theBranch = await getCurrentBranchName();
19
+ const protectedBranches = ['main', 'master', 'development'];
20
+ const additionalProtectedBranches = [...process.argv.slice(2)];
21
+
22
+ // Check if the current branch starts with any of the additional
23
+ // protected branch name
24
+ let matchesAdditionalBranch = false;
25
+ for (let i = 0; i < additionalProtectedBranches.length; i++) {
26
+ matchesAdditionalBranch = matchesAdditionalBranch || theBranch.startsWith(additionalProtectedBranches[i]);
27
+ }
28
+ return protectedBranches.includes(theBranch) || matchesAdditionalBranch;
29
+ };
30
+ const npmRunner = async script => {
31
+ try {
32
+ const results = await (0, _execa.default)('npm', ['run', script], {
33
+ stdio: 'inherit'
34
+ });
35
+ return results;
36
+ } catch (err) {
37
+ process.exit(1);
38
+ }
39
+ return undefined;
40
+ };
41
+ (async () => {
42
+ if (await isProtected()) {
43
+ const script = ['test', 'lint'];
44
+ for (let i = 0; i < script.length; i++) {
45
+ await npmRunner(script[i]); // eslint-disable-line no-await-in-loop
46
+ }
47
+ } else {
48
+ process.exit(0);
49
+ }
50
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.49.0",
3
+ "version": "2.50.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -16,7 +16,7 @@
16
16
  "build-tools": "src/build-tools.mjs",
17
17
  "chart-to-registry": "src/chart-to-registry.mjs",
18
18
  "circleate": "src/circleate.sh",
19
- "cnpg-snapshot": "src/cnpg-snapshot.mjs",
19
+ "cnpg-backup": "src/cnpg-backup.mjs",
20
20
  "decrypt-secrets": "src/decrypt-secrets.sh",
21
21
  "dirty-git": "src/dirty-git.sh",
22
22
  "dockreate": "src/dockreate.sh",
@@ -54,7 +54,7 @@
54
54
  "author": "Leverege Devs",
55
55
  "license": "SEE LICENSE IN LICENSE.md",
56
56
  "dependencies": {
57
- "@google-cloud/artifact-registry": "^3.2.0",
57
+ "@google-cloud/artifact-registry": "^3.3.0",
58
58
  "ansi-colors": "^4.1.3",
59
59
  "chalk": "^5.3.0",
60
60
  "command-line-args": "^5.2.1",
@@ -64,20 +64,20 @@
64
64
  "execa": "^8.0.1",
65
65
  "glob": "^10.3.12",
66
66
  "handlebars": "^4.7.8",
67
- "inquirer": "^9.2.16",
67
+ "inquirer": "^9.2.18",
68
68
  "js-yaml": "^4.1.0",
69
69
  "ms": "^2.1.3",
70
- "npm-registry-fetch": "^16.1.0",
70
+ "npm-registry-fetch": "^16.2.1",
71
71
  "package-up": "^5.0.0",
72
72
  "parse-gitignore": "^2.0.0",
73
73
  "read-pkg": "^9.0.1",
74
74
  "readline-sync": "^1.4.10",
75
75
  "semver": "^7.6.0",
76
76
  "simple-git": "^3.24.0",
77
- "zx": "^7.2.3"
77
+ "zx": "^8.0.1"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@leverege/eslint-config-leverege": "^4.2.0",
81
- "npm": "^10.5.0"
81
+ "npm": "^10.5.2"
82
82
  }
83
83
  }
@@ -3,7 +3,6 @@
3
3
  // https://github.com/google/zx
4
4
  /* eslint-disable max-len */
5
5
  import pkg from 'enquirer'
6
- import colors from 'ansi-colors'
7
6
  import { $, fs, argv, path, chalk } from 'zx'
8
7
 
9
8
  const { prompt } = pkg
@@ -97,8 +96,8 @@ if ( INTERACTIVE_MODE ) {
97
96
  name : 'targetEnv',
98
97
  message : 'To which environment would you like to deploy?',
99
98
  choices : Object.values( targets ).map( ( t ) => {
100
- const productionLabel = t.production ? colors.bold.red( '--PRODUCTION--' ) : ''
101
- return { message : `${colors.bold.cyan( 'Site: ' )}${t.siteId.padEnd( maxSiteIdLength )} ${colors.bold.green( 'Project: ' )}${t.projectId} ${productionLabel}`, value : t.alias }
99
+ const productionLabel = t.production ? chalk.bold.red( '--PRODUCTION--' ) : ''
100
+ return { message : `${chalk.bold.cyan( 'Site: ' )}${t.siteId.padEnd( maxSiteIdLength )} ${chalk.bold.green( 'Project: ' )}${t.projectId} ${productionLabel}`, value : t.alias }
102
101
  } )
103
102
  } ] )
104
103
 
@@ -108,7 +107,7 @@ if ( INTERACTIVE_MODE ) {
108
107
  const { confirmProductionDeploy } = await prompt( [ {
109
108
  type : 'confirm',
110
109
  name : 'confirmProductionDeploy',
111
- message : `${colors.bold.red( 'WARNING: ' )} This is a ${colors.bold.yellow( 'PRODUCTION' )} environment. Are you sure you want to deploy here?`
110
+ message : `${chalk.bold.red( 'WARNING: ' )} This is a ${chalk.bold.yellow( 'PRODUCTION' )} environment. Are you sure you want to deploy here?`
112
111
  } ] )
113
112
  if ( !confirmProductionDeploy ) {
114
113
  console.log( 'Cancelling deployment...' )
@@ -169,14 +168,14 @@ if ( aliasFileExists ) {
169
168
  exec.push( fs.readFile( path.join( process.cwd(), SECRETS_DIR, `${TARGET.siteId}.env` ), { encoding : 'utf-8' } ) )
170
169
  }
171
170
 
172
- console.log( `\n\n\n${colors.bold.green( '====== Deployment Summary ======' )}` )
173
- console.log( `${colors.blue( 'Firebase project:' )} ${TARGET.projectId} ${TARGET.production ? colors.yellow( '--PRODUCTION--' ) : ''}` )
174
- console.log( `${colors.blue( 'Site ID:' )} ${TARGET.siteId}` )
175
- console.log( `${colors.blue( 'Channel Name:' )} ${CHANNEL?.name ?? colors.italic.gray( '(none)' )}` )
176
- console.log( `${colors.blue( 'Channel Expiration date:' )} ${CHANNEL?.name ? CHANNEL.expiration ?? colors.italic.gray( '(none)' ) : colors.italic.gray( '(n/a)' )}` )
177
- console.log( `${colors.blue( 'Shared .env file:' )} ${sharedFileExists ? `${SECRETS_DIR}/shared.env` : colors.italic.gray( '(none)' )}` )
178
- console.log( `${colors.blue( 'Additional .env overrides:' )} ${aliasFileExists ? `${SECRETS_DIR}/${TARGET.alias}.env` : `${SECRETS_DIR}/${TARGET.siteId}.env`}` )
179
- console.log( `${colors.bold.green( '===============================' )}` )
171
+ console.log( `\n\n\n${chalk.bold.green( '====== Deployment Summary ======' )}` )
172
+ console.log( `${chalk.blue( 'Firebase project:' )} ${TARGET.projectId} ${TARGET.production ? chalk.yellow( '--PRODUCTION--' ) : ''}` )
173
+ console.log( `${chalk.blue( 'Site ID:' )} ${TARGET.siteId}` )
174
+ console.log( `${chalk.blue( 'Channel Name:' )} ${CHANNEL?.name ?? chalk.italic.gray( '(none)' )}` )
175
+ console.log( `${chalk.blue( 'Channel Expiration date:' )} ${CHANNEL?.name ? CHANNEL.expiration ?? chalk.italic.gray( '(none)' ) : chalk.italic.gray( '(n/a)' )}` )
176
+ console.log( `${chalk.blue( 'Shared .env file:' )} ${sharedFileExists ? `${SECRETS_DIR}/shared.env` : chalk.italic.gray( '(none)' )}` )
177
+ console.log( `${chalk.blue( 'Additional .env overrides:' )} ${aliasFileExists ? `${SECRETS_DIR}/${TARGET.alias}.env` : `${SECRETS_DIR}/${TARGET.siteId}.env`}` )
178
+ console.log( `${chalk.bold.green( '===============================' )}` )
180
179
 
181
180
  if ( INTERACTIVE_MODE ) {
182
181
  const { confirmSelections } = await prompt( [ {
@@ -192,12 +191,15 @@ if ( INTERACTIVE_MODE ) {
192
191
  }
193
192
  const envFileContent = ( await Promise.all( exec ) ).join( '\n' )
194
193
 
194
+ const ac = new AbortController()
195
+
195
196
  EXIT_EVENTS
196
197
  .forEach( ( event ) => {
197
198
  process.on( event, () => {
198
199
  if ( !exited ) {
199
200
  exited = true
200
201
  fs.removeSync( path.join( process.cwd(), '.env.temp' ) )
202
+ ac.abort()
201
203
  }
202
204
  } )
203
205
  } )
@@ -210,7 +212,8 @@ try {
210
212
  const deployType = CHANNEL ? `hosting:channel:deploy ${CHANNEL.name} ${CHANNEL.expiration ? `--expires ${CHANNEL.expiration}` : ''}`.split( ' ' ) : 'deploy'
211
213
  const hostingPrefix = CHANNEL ? '' : 'hosting:'
212
214
 
213
- await $`npm run clean && DOTENV_CONFIG_PATH=${path.join( process.cwd(), '.env.temp' )} DEPLOYMENT_TARGET=${TARGET.siteId} npm run build && firebase use ${TARGET.projectId} && firebase ${deployType} --only ${hostingPrefix}${TARGET.siteId}`
215
+ await $( { ac } )`npm run clean && DOTENV_CONFIG_PATH=${path.join( process.cwd(), '.env.temp' )} DEPLOYMENT_TARGET=${TARGET.siteId} npm run build && firebase use ${TARGET.projectId} && firebase ${deployType} --only ${hostingPrefix}${TARGET.siteId}`
216
+ .pipe( process.stdout )
214
217
  } catch ( err ) {
215
218
  console.error( err )
216
219
  }
@@ -126,12 +126,15 @@ if ( aliasFileExists ) {
126
126
 
127
127
  const envFileContent = ( await Promise.all( exec ) ).join( '\n' )
128
128
 
129
+ const ac = new AbortController()
130
+
129
131
  EXIT_EVENTS
130
132
  .forEach( ( event ) => {
131
133
  process.on( event, () => {
132
134
  if ( !exited ) {
133
135
  exited = true
134
136
  fs.removeSync( path.join( process.cwd(), '.env.temp' ) )
137
+ ac.abort()
135
138
  }
136
139
  } )
137
140
  } )
@@ -139,7 +142,7 @@ EXIT_EVENTS
139
142
  await fs.writeFile( path.join( process.cwd(), '.env.temp' ), envFileContent )
140
143
 
141
144
  try {
142
- await $`DOTENV_CONFIG_PATH=${path.join( process.cwd(), '.env.temp' )} DEPLOYMENT_TARGET=${TARGET.siteId} npm run serve --colors`
145
+ await $( { ac } )`DOTENV_CONFIG_PATH=${path.join( process.cwd(), '.env.temp' )} DEPLOYMENT_TARGET=${TARGET.siteId} npm run serve --colors`.pipe( process.stdout )
143
146
  } catch ( err ) {
144
147
  console.error( err )
145
148
  }
@@ -1,3 +1,3 @@
1
1
  #!/bin/bash
2
2
  #
3
- kubectl apply -f cnpg-db-pgbench/cnpg-db-pgbench.yaml $K8S_WHAT
3
+ kubectl apply -f cnpg-db-pgbench/cluster.yaml $K8S_WHAT
@@ -10,7 +10,7 @@ spec:
10
10
  # logLevel: debug
11
11
 
12
12
  description: "Leverege Stack PostgreSQL DB"
13
- imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.1-cnpg-tsdb2-beta.10
13
+ imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.2-cnpg-tsdb2-beta.4
14
14
  bootstrap:
15
15
  initdb:
16
16
  database: imagine
@@ -35,10 +35,10 @@ spec:
35
35
  # to the default ones to make the cluster work
36
36
  postgresql:
37
37
  parameters:
38
+ max_connections: "123"
38
39
  # max_worker_processes: "60"
39
40
  # max_worker_processes: "8"
40
41
  # max_parallel_workers: "8"
41
- max_connections: "500"
42
42
  # shared_buffers: 2GB
43
43
  # effective_cache_size: 6GB
44
44
  # maintenance_work_mem: 1GB
@@ -90,3 +90,17 @@ spec:
90
90
  method: volumeSnapshot
91
91
  backupOwnerReference: self
92
92
  immediate: true
93
+ ---
94
+ apiVersion: postgresql.cnpg.io/v1
95
+ kind: ScheduledBackup
96
+ metadata:
97
+ name: cnpg-db-psql-stack-volsnap
98
+ namespace: cnpg-operands
99
+ spec:
100
+ # https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
101
+ schedule: "0 0 */4 * * *"
102
+ cluster:
103
+ name: cnpg-db-psql-stack
104
+ method: volumeSnapshot
105
+ backupOwnerReference: self
106
+ immediate: true
@@ -1,3 +1,3 @@
1
1
  #!/bin/bash
2
2
 
3
- kubectl apply -f cnpg-db-psql-stack/cnpg-db-psql-stack.yaml $K8S_WHAT
3
+ kubectl apply -f cnpg-db-psql-stack/cluster.yaml $K8S_WHAT
@@ -9,8 +9,11 @@ spec:
9
9
  instances: 1
10
10
  logLevel: info # warning debug
11
11
 
12
+ monitoring:
13
+ enablePodMonitor: false # set true once monitoring is setup
14
+
12
15
  description: "Leverege Plain Timescale DB"
13
- imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.1-cnpg-tsdb2-beta.6
16
+ imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.2-cnpg-tsdb2-beta.4
14
17
  bootstrap:
15
18
  initdb:
16
19
  postInitTemplateSQL:
@@ -26,8 +29,16 @@ spec:
26
29
  name: cnpg-db-tsdb-basic-postgres-pw # postgres db pw
27
30
 
28
31
  affinity:
29
- # enablePodAntiAffinity: true
30
- # topologyKey: failure-domain.beta.kubernetes.io/zone
32
+ enablePodAntiAffinity: true
33
+ topologyKey: failure-domain.beta.kubernetes.io/zone
34
+ nodeAffinity:
35
+ requiredDuringSchedulingIgnoredDuringExecution:
36
+ nodeSelectorTerms:
37
+ - matchExpressions:
38
+ - key: target-env
39
+ operator: In
40
+ values:
41
+ - database
31
42
  tolerations:
32
43
  - key: "database"
33
44
  operator: "Equal"
@@ -41,19 +52,19 @@ spec:
41
52
  - timescaledb
42
53
  - jsquery
43
54
  parameters:
55
+ max_connections: "123"
44
56
  # max_worker_processes: "60"
45
- max_worker_processes: "8"
46
- max_parallel_workers: "8"
47
- shared_buffers: 2GB
48
- effective_cache_size: 6GB
49
- maintenance_work_mem: 1GB
50
- work_mem: 20MB
57
+ # max_worker_processes: "8"
58
+ # max_parallel_workers: "8"
59
+ # shared_buffers: 2GB
60
+ # effective_cache_size: 6GB
61
+ # maintenance_work_mem: 1GB
62
+ # work_mem: 20MB
51
63
  pg_hba:
52
64
  # To access through TCP/IP you will need to get username
53
65
  # and password from the secret cluster-example-custom-app
54
66
  - host all all all md5
55
67
 
56
-
57
68
  # Example of rolling update strategy:
58
69
  # - unsupervised: automated update of the primary once all
59
70
  # replicas have been upgraded (default)
@@ -66,10 +77,9 @@ spec:
66
77
  annotations:
67
78
  iam.gke.io/gcp-service-account: cnpg-operands-sa@OVH:<PROJECT_ID>.iam.gserviceaccount.com
68
79
 
69
- # Require 50Gi of space per instance using ssd storage class
70
80
  storage:
71
81
  storageClass: premium-rwo
72
- size: 50Gi
82
+ size: 76Gi
73
83
 
74
84
  backup:
75
85
  volumeSnapshot:
@@ -88,11 +98,11 @@ spec:
88
98
  apiVersion: postgresql.cnpg.io/v1
89
99
  kind: ScheduledBackup
90
100
  metadata:
91
- name: cnpg-db-tsdb-basic-backup
101
+ name: cnpg-db-tsdb-basic-volsnap
92
102
  namespace: cnpg-operands
93
103
  spec:
94
104
  # https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
95
- schedule: "0 0 * * * *"
105
+ schedule: "0 0 */8 * * *"
96
106
  cluster:
97
107
  name: cnpg-db-tsdb-basic
98
108
  method: volumeSnapshot
@@ -1,3 +1,3 @@
1
1
  #!/bin/bash
2
2
  #
3
- kubectl apply -f cnpg-db-tsdb-basic/cnpg-db-tsdb-basic.yaml $K8S_WHAT
3
+ kubectl apply -f cnpg-db-tsdb-basic/cluster.yaml $K8S_WHAT
@@ -7,10 +7,13 @@ metadata:
7
7
  namespace: cnpg-operands
8
8
  spec:
9
9
  instances: 1
10
- logLevel: debug
10
+ logLevel: info # warning debug
11
+
12
+ monitoring:
13
+ enablePodMonitor: false # set true once monitoring is setup
11
14
 
12
15
  description: "Leverege Dense Timescale DB"
13
- imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.1-cnpg-tsdb2-beta.6
16
+ imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.2-cnpg-tsdb2-beta.4
14
17
  bootstrap:
15
18
  initdb:
16
19
  postInitTemplateSQL:
@@ -26,8 +29,16 @@ spec:
26
29
  name: cnpg-db-tsdb-dense-postgres-pw # postgres db pw
27
30
 
28
31
  affinity:
29
- # enablePodAntiAffinity: true
30
- # topologyKey: failure-domain.beta.kubernetes.io/zone
32
+ enablePodAntiAffinity: true
33
+ topologyKey: failure-domain.beta.kubernetes.io/zone
34
+ nodeAffinity:
35
+ requiredDuringSchedulingIgnoredDuringExecution:
36
+ nodeSelectorTerms:
37
+ - matchExpressions:
38
+ - key: target-env
39
+ operator: In
40
+ values:
41
+ - database
31
42
  tolerations:
32
43
  - key: "database"
33
44
  operator: "Equal"
@@ -53,7 +64,6 @@ spec:
53
64
  # and password from the secret cluster-example-custom-app
54
65
  - host all all all md5
55
66
 
56
-
57
67
  # Example of rolling update strategy:
58
68
  # - unsupervised: automated update of the primary once all
59
69
  # replicas have been upgraded (default)
@@ -66,10 +76,9 @@ spec:
66
76
  annotations:
67
77
  iam.gke.io/gcp-service-account: cnpg-operands-sa@OVH:<PROJECT_ID>.iam.gserviceaccount.com
68
78
 
69
- # Require 50Gi of space per instance using ssd storage class
70
79
  storage:
71
80
  storageClass: premium-rwo
72
- size: 50Gi
81
+ size: 77Gi
73
82
 
74
83
  backup:
75
84
  volumeSnapshot:
@@ -88,11 +97,11 @@ spec:
88
97
  apiVersion: postgresql.cnpg.io/v1
89
98
  kind: ScheduledBackup
90
99
  metadata:
91
- name: cnpg-db-tsdb-dense-backup
100
+ name: cnpg-db-tsdb-dense-volsnap
92
101
  namespace: cnpg-operands
93
102
  spec:
94
103
  # https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
95
- schedule: "0 0 * * * *"
104
+ schedule: "0 0 */8 * * *"
96
105
  cluster:
97
106
  name: cnpg-db-tsdb-dense
98
107
  method: volumeSnapshot
@@ -1,5 +1,3 @@
1
1
  #!/bin/bash
2
2
  #
3
- #bindWorkloadIdentity cnpg-operands-sa cnpg-operands cnpg-db-tsdb-dense
4
-
5
- kubectl apply -f cnpg-db-tsdb-dense/cnpg-db-tsdb-dense.yaml $K8S_WHAT
3
+ kubectl apply -f cnpg-db-tsdb-dense/cluster.yaml $K8S_WHAT
@@ -1,20 +0,0 @@
1
- registry:
2
- - root: us-docker.pkg.dev
3
- - repositories:
4
- - name: stack
5
- charts:
6
- - api-server
7
- - authz-server
8
- - emailer
9
- - message-processor
10
- - name: leverege
11
- charts:
12
- - pubsub-pulse
13
- - pusher
14
- - overdose
15
- - name: cox-health
16
- charts:
17
- - actions-server
18
- - analytics-server
19
- - centrak-healthz
20
- - centrak-ingestor
@@ -1,96 +0,0 @@
1
- #!/usr/bin/env node
2
- /*
3
- * chart-to-registry will...
4
- */
5
- import fs from 'node:fs'
6
-
7
- import chalk from 'chalk'
8
- import commandLineArgs from 'command-line-args'
9
- import commandLineUsage from 'command-line-usage'
10
- import { lt as semverLt } from 'semver'
11
- import YAML from 'js-yaml'
12
-
13
- import {
14
- condir,
15
- debug,
16
- errorExit,
17
- log,
18
- warning,
19
- getGitRootDirectory,
20
- parsePackageJson,
21
- parseHelmChart,
22
- shellCmd } from './Utils.mjs'
23
-
24
- const commandLineOptions = [ // Use commandLineOptions to tie into the Usage statements
25
- /* eslint-disable max-len */
26
- {
27
- name : 'location',
28
- type : String,
29
- description : '{green the location of the artifact registry the chart will be pushed to (default us-docker.pkg.dev)}',
30
- },
31
- {
32
- name : 'project',
33
- type : String,
34
- description : '{green the name of the google project containing the npmrc and slack config secrets (default leverege-registry)}',
35
- },
36
- {
37
- name : 'repository',
38
- type : String,
39
- description : '{green the target repository to receive the pushed chart}',
40
- },
41
- {
42
- name : 'dry-run',
43
- type : Boolean,
44
- description : '{yellow perform everything except the actual chart push}',
45
- },
46
- {
47
- name : 'help',
48
- type : Boolean,
49
- description : '{green display this help screen}',
50
- },
51
- /* eslint-enable max-len */
52
- ]
53
-
54
- const sections = [
55
- {
56
- header : 'Leverege Helm Chart Compass (for helmup)',
57
- content : `{green This tool helps helmup navigate the helm charts stored in the
58
- artifact-registries.}`
59
- },
60
- { header : 'Options',
61
- optionList : commandLineOptions,
62
- },
63
- ]
64
-
65
- const args = commandLineArgs( commandLineOptions, { camelCase : true, partial : true } )
66
- const usage = commandLineUsage( sections )
67
-
68
- if ( args.help ) {
69
- log( usage )
70
- process.exit( 0 )
71
- }
72
-
73
- /* eslint-disable no-underscore-dangle */
74
- if ( args._unknown ) {
75
- log( usage )
76
- log( `\nUnrecognized argument [${chalk.bold.red( args._unknown )}]\n` )
77
- process.exit( 1 )
78
- }
79
- /* eslint-enable no-underscore-dangle */
80
-
81
- const minNodejsVersion = '18.0.0'
82
- if ( semverLt( process.version, minNodejsVersion ) ) {
83
- errorExit( `\n***ERROR: must be running at least node ${minNodejsVersion}\n` )
84
- }
85
-
86
- // First of all, fail if we are not in a git repository
87
- let gitRoot
88
- try {
89
- gitRoot = await getGitRootDirectory()
90
- } catch ( error ) {
91
- errorExit( chalk.red.bold( error ), { errorCode : 5 } )
92
- }
93
-
94
- const chartCompass = YAML.load( fs.readFileSync( './registry-compass.yaml', 'utf8' ) )
95
-
96
- condir( { chartCompass }, '<==Navigation' )
File without changes