@leverege/build-tools 2.87.1 → 2.88.0

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.87.1",
3
+ "version": "2.88.0",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -93,6 +93,6 @@
93
93
  },
94
94
  "devDependencies": {
95
95
  "@leverege/eslint-config-leverege": "^5.1.0",
96
- "npm": "^11.6.1"
96
+ "npm": "^11.6.2"
97
97
  }
98
98
  }
@@ -89,6 +89,7 @@ kubeScheduler:
89
89
  enabled: false
90
90
 
91
91
  prometheus:
92
+ externalAccess: ${PROMETHEUS_EXTERN}
92
93
  prometheusSpec:
93
94
  # image:
94
95
  # tag: "v3.0.0"
@@ -110,6 +111,50 @@ prometheus:
110
111
  requests:
111
112
  storage: 50Gi # Adjust size as needed
112
113
 
114
+ # External access to prometheus may be enabled by creating an htpasswd secret
115
+ # by running this example command:
116
+ # htpasswd -c prometheus.htpass <login name>
117
+ #
118
+ # The resultant secret can then be mounted as a k8s secret using:
119
+ # kubectl create secret generic prometheus-ext-passwd \
120
+ # --namespace prometheus \
121
+ # --from-file prometheus.htpass
122
+ #
123
+ # And then adding this line to overwhelm.yaml:
124
+ # PROMETHEUS_EXTERN : "true"
125
+ #
126
+ extraManifests:
127
+ - |
128
+ {{- if eq (toString .Values.prometheus.externalAccess) "true" }}
129
+ apiVersion: traefik.io/v1alpha1
130
+ kind: Middleware
131
+ metadata:
132
+ name: basic-auth
133
+ namespace: prometheus
134
+ spec:
135
+ basicAuth:
136
+ removeHeader: true
137
+ secret: prometheus-ext-passwd
138
+ ---
139
+ apiVersion: traefik.io/v1alpha1
140
+ kind: IngressRoute
141
+ metadata:
142
+ name: prometheus-ext-route
143
+ namespace: prometheus
144
+ spec:
145
+ entryPoints:
146
+ - websecure
147
+ routes:
148
+ - kind: Rule
149
+ match: Host(`${PROJECT_ID}-prometheus.${HOST}.com`)
150
+ middlewares:
151
+ - name: basic-auth
152
+ services:
153
+ - name: prometheus-operated # prometheus-stack-kube-prom-prometheus
154
+ namespace: prometheus
155
+ port: http-web
156
+ {{- end }}
157
+
113
158
  grafana:
114
159
  enabled: true
115
160
  service:
package/src/overwhelm.mjs CHANGED
@@ -305,9 +305,8 @@ const validValuesLocalConfig = ( vlf ) => {
305
305
 
306
306
  // .nohelm = skips generation of values.yaml but allows helmup to run
307
307
  ahoy.forEach( ( dir ) => {
308
- if ( !fs.existsSync( `${dir}/.nohelm` ) ) {
308
+ if ( !fs.existsSync( `${dir}/.nohelm` ) && !dir.match( /^\..*/ ) ) {
309
309
  // debug( { dir }, 'Generating values' ) // eslint-disable-line no-unused-expressions
310
-
311
310
  let valuesOut = [] // An accumulator for all of the output values.
312
311
 
313
312
  // Add support for localized values for things like keel (or whatever)
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+ #
3
+ # just a simple wrapper round gsutil docker lifter
4
+ #
5
+ SOURCE_MODEL="${1}"
6
+ DESTINATION_MODEL="${2}"
7
+ BUCKET="gs://leverege-registry-ml-models/"
8
+ DEST_URI="${BUCKET}${DESTINATION_MODEL}"
9
+ URL="https://console.cloud.google.com/storage/browser/leverege-registry-ml-models/${DESTINATION_MODEL}"
10
+
11
+ # Check if any objects exist within the destination prefix using a wildcard
12
+ # Redirecting all output (stdout and stderr) to /dev/null to suppress error messages
13
+ gsutil -q ls "${DEST_URI}/*" > /dev/null 2>&1
14
+
15
+ if [ $? -eq 0 ]; then
16
+ echo "Model already exists and contains objects."
17
+ else
18
+ # Objects not found, proceed with upload
19
+ echo "Uploading model to ${DEST_URI}"
20
+ gsutil cp -r ${SOURCE_MODEL} ${DEST_URI}
21
+ open ${URL}
22
+ fi