@leverege/build-tools 2.5.13 → 2.5.14

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.5.13",
3
+ "version": "2.5.14",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -62,7 +62,7 @@
62
62
  "inquirer": "^7.3.3",
63
63
  "js-yaml": "^3.14.0",
64
64
  "ncp": "^2.0.0",
65
- "npm-check-updates": "^10.2.2",
65
+ "npm-check-updates": "^10.2.3",
66
66
  "npm-registry-fetch": "^9.0.0",
67
67
  "open": "^7.3.0",
68
68
  "ora": "^5.1.0",
package/src/helmup CHANGED
@@ -5,6 +5,7 @@
5
5
  #
6
6
  # printf "\n***** RUNNING LOCALLY *****\n" && sleep 2
7
7
  PLATFORM=(
8
+ authz-server
8
9
  api-server
9
10
  db-curator
10
11
  emailer
@@ -22,6 +23,7 @@ SYSTEM=(
22
23
  elastic
23
24
  redis
24
25
  postgres
26
+ timescale-db
25
27
  velero
26
28
  reloader
27
29
  monitoring
package/src/k8cycle ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ const { Client } = require( 'kubernetes-client' )
3
+ const client = new Client( { version : '1.13' } )
4
+
5
+ const condir = ( log, thing ) => {
6
+ console.dir( { log, thing }, { depth : 8, colors : true } ) // eslint-disable-line
7
+ }
8
+ const getSecrets = async () => {
9
+ const p = await client.api.v1.secrets.get()
10
+ const secrets = []
11
+ p.body.items.forEach( ( item ) => {
12
+ console.log( item.metadata.name )
13
+ secrets.push( item.metadata.name, item.data )
14
+ } )
15
+ return secrets
16
+ }
17
+
18
+ const getSecret = async ( name, ns = 'default' ) => {
19
+ //const p = await client.api.v1.namespaces.default.secrets.big-query.get()
20
+ const p = await client.api.v1.namespaces(ns).secrets(name).get()
21
+ console.dir( p, { depth : 8, colors : true } )
22
+ //console.log( p.body.data, '<=SRSLY?' )
23
+ let buff = Buffer.from( p.body.data.key, 'base64' )
24
+ console.log( `Name=>${name} Secret=>'${buff.toString( 'ascii' ).trim()}'` )
25
+ }
26
+ const getReplicas = async ( type, ns = 'default' ) => {
27
+ const replicas = await client.apis.apps.v1.namespaces( ns )[type].get()
28
+ return replicas.body.items.map( ( item, idx ) => {
29
+ return { type, ns, name : item.metadata.name }
30
+ } )
31
+ }
32
+
33
+ const getDeploymentsAndStatefulsets = async ( name, ns = 'default' ) => {
34
+ return [
35
+ ...await getReplicas( 'deployments' ),
36
+ ...await getReplicas( 'statefulsets' ),
37
+ ]
38
+ }
39
+
40
+ let depsets
41
+ async function main () {
42
+ console.log( '--- NOT READY FOR PRIME TIME ---' )
43
+ depsets = await getDeploymentsAndStatefulsets()
44
+ }