@leverege/build-tools 2.26.3 → 2.26.5
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 +1 -1
- package/src/helmup +24 -3
- package/src/system-charts/elastic-cluster.hup +23 -0
- package/src/system-charts/elasticsearch-local.yaml +24 -0
- package/src/system-charts/grafana-local.yaml.ovh +54 -0
- package/src/system-charts/prometheus-local.yaml +1 -1
- package/src/system-charts/velero.hup +1 -1
- package/src/system-charts/grafana-local.yaml +0 -29
package/package.json
CHANGED
package/src/helmup
CHANGED
|
@@ -79,7 +79,7 @@ WORKLOAD_ID
|
|
|
79
79
|
|
|
80
80
|
# Verify the Kubernetes SA and create it if necessary
|
|
81
81
|
printf "\nChecking for the $NAMESPACE/$SVC_ACCT k8s SA\n"
|
|
82
|
-
kubectl get sa -n $NAMESPACE $SVC_ACCT
|
|
82
|
+
kubectl get sa -n $NAMESPACE $SVC_ACCT &>/dev/null
|
|
83
83
|
if [[ $? -eq 1 ]];
|
|
84
84
|
then
|
|
85
85
|
printf "Creating the k8s $SVC_ACCT SA in $NAMESPACE\n"
|
|
@@ -111,6 +111,8 @@ function createNamespaceIfNeeded() {
|
|
|
111
111
|
function bootstrapLocalSetup() {
|
|
112
112
|
SERVICE="$1"
|
|
113
113
|
[ -z "$1" ] && errorExit "bootstrapLocalSetup function requires a service name"
|
|
114
|
+
ifPluggedIn $SERVICE && return # if it's already plugged in then go
|
|
115
|
+
|
|
114
116
|
TOOLS_SRC="$(build-tools --reporoot)/src"
|
|
115
117
|
SYSTEM_FILES="$(build-tools --reporoot)/src/system-charts"
|
|
116
118
|
|
|
@@ -119,7 +121,26 @@ function bootstrapLocalSetup() {
|
|
|
119
121
|
SYSTEM_HUP="$SYSTEM_FILES/$SERVICE.hup"
|
|
120
122
|
[ ! -f "$SYSTEM_HUP" ] && errorExit "Missing $SERVICE helmup script => $(color y $SYSTEM_HUP)"
|
|
121
123
|
|
|
122
|
-
[ ! -d "$SERVICE" ]
|
|
124
|
+
if [ ! -d "$SERVICE" ];
|
|
125
|
+
then
|
|
126
|
+
mkdir $SERVICE
|
|
127
|
+
else
|
|
128
|
+
# If the service dir already exists but the helmup.plugin file is missing
|
|
129
|
+
# then this is most likely a legacy setup - for example, an older setup for
|
|
130
|
+
# elasticsearch that only had an es-values.yaml file. Note that we cannot
|
|
131
|
+
# get to this logic if the helmup.plugin file exists so no need to check
|
|
132
|
+
# for it again - just error.
|
|
133
|
+
cat<<MISSING_HELMUP_PLUGIN
|
|
134
|
+
|
|
135
|
+
$RED_ERROR Legacy setup detected for service `color y "$SERVICE"`
|
|
136
|
+
|
|
137
|
+
This looks like a legacy setup of the $SERVICE service. In order to
|
|
138
|
+
proceed, the existing $SERVICE subdirectory should be moved out of
|
|
139
|
+
way before attempting to rerun helmup for this service.
|
|
140
|
+
|
|
141
|
+
MISSING_HELMUP_PLUGIN
|
|
142
|
+
errorExit "Installaion of `color y $SERVICE` failed - exiting"
|
|
143
|
+
fi
|
|
123
144
|
|
|
124
145
|
if [ "$2" == "set-values-local" ];
|
|
125
146
|
then
|
|
@@ -199,7 +220,7 @@ function installMonitoringEnvironment() {
|
|
|
199
220
|
## Installing ES exporter
|
|
200
221
|
helm upgrade --install elasticsearch-exporter prometheus-community/prometheus-elasticsearch-exporter \
|
|
201
222
|
--namespace monitoring \
|
|
202
|
-
--version
|
|
223
|
+
--version 5 \
|
|
203
224
|
-f - <<ELASTIC_EXPORTER_CHART_MOD
|
|
204
225
|
service:
|
|
205
226
|
annotations:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# Do not move to 7.17+ until the memory explosion problem is resolved
|
|
4
|
+
#
|
|
5
|
+
ES_VERSION="7.16"
|
|
6
|
+
|
|
7
|
+
showInstalling "Elastic Search Cluster v${ES_VERSION}"
|
|
8
|
+
|
|
9
|
+
addHelmRepo elastic https://helm.elastic.co
|
|
10
|
+
|
|
11
|
+
deployES() {
|
|
12
|
+
ES_TYPE="elasticsearch-${1}"
|
|
13
|
+
printf "\n Deploying ES cluster component: `color y "$ES_TYPE"`\n"
|
|
14
|
+
helm upgrade --install $ES_TYPE elastic/elasticsearch \
|
|
15
|
+
--version $ES_VERSION \
|
|
16
|
+
--values elastic-cluster/$ES_TYPE.yaml
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
deployES "master"
|
|
20
|
+
deployES "client"
|
|
21
|
+
deployES "data"
|
|
22
|
+
|
|
23
|
+
removeHelmRepo elastic
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# Foundation Chart: https://artifacthub.io/packages/helm/elastic/elasticsearch
|
|
2
|
+
#
|
|
3
|
+
# esJavaOpts: "" # example: "-Xmx1g -Xms1g"
|
|
4
|
+
#
|
|
5
|
+
# resources:
|
|
6
|
+
# requests:
|
|
7
|
+
# cpu: "1000m"
|
|
8
|
+
# memory: "2Gi"
|
|
9
|
+
# limits:
|
|
10
|
+
# cpu: "1000m"
|
|
11
|
+
# memory: "2Gi"
|
|
12
|
+
|
|
1
13
|
tolerations:
|
|
2
14
|
- key: "database"
|
|
3
15
|
operator: "Equal"
|
|
@@ -12,3 +24,15 @@ nodeAffinity:
|
|
|
12
24
|
operator: In
|
|
13
25
|
values:
|
|
14
26
|
- database
|
|
27
|
+
|
|
28
|
+
# RecovR Prd Settings - very beefy on an n2-standard-8
|
|
29
|
+
#
|
|
30
|
+
# esJavaOpts: "-Xmx8g -Xms8g"
|
|
31
|
+
#
|
|
32
|
+
# resources:
|
|
33
|
+
# requests:
|
|
34
|
+
# cpu: "6250m"
|
|
35
|
+
# memory: "16Gi"
|
|
36
|
+
# limits:
|
|
37
|
+
# cpu: "6750m"
|
|
38
|
+
# memory: "20Gi"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
service:
|
|
2
|
+
type: "NodePort"
|
|
3
|
+
port: "9000"
|
|
4
|
+
|
|
5
|
+
datasources:
|
|
6
|
+
datasources.yaml:
|
|
7
|
+
apiVersion: 1
|
|
8
|
+
datasources:
|
|
9
|
+
- name: kubernetes
|
|
10
|
+
type: prometheus
|
|
11
|
+
url: http://prometheus-server.monitoring.svc.cluster.local
|
|
12
|
+
isDefault: true
|
|
13
|
+
|
|
14
|
+
persistence:
|
|
15
|
+
enabled: true
|
|
16
|
+
storageClassName: ssd
|
|
17
|
+
|
|
18
|
+
plugins:
|
|
19
|
+
- grafana-piechart-panel
|
|
20
|
+
- agenty-flowcharting-panel
|
|
21
|
+
|
|
22
|
+
deploymentStrategy:
|
|
23
|
+
type: Recreate
|
|
24
|
+
|
|
25
|
+
affinity:
|
|
26
|
+
nodeAffinity:
|
|
27
|
+
requiredDuringSchedulingIgnoredDuringExecution:
|
|
28
|
+
nodeSelectorTerms:
|
|
29
|
+
- matchExpressions:
|
|
30
|
+
- key: target-env
|
|
31
|
+
operator: In
|
|
32
|
+
values:
|
|
33
|
+
- database
|
|
34
|
+
tolerations:
|
|
35
|
+
- key: "database"
|
|
36
|
+
operator: "Equal"
|
|
37
|
+
value: "true"
|
|
38
|
+
effect: "NoSchedule"
|
|
39
|
+
|
|
40
|
+
extraObjects:
|
|
41
|
+
- apiVersion: traefik.containo.us/v1alpha1
|
|
42
|
+
kind: IngressRoute
|
|
43
|
+
metadata:
|
|
44
|
+
name: grafana
|
|
45
|
+
namespace: monitoring
|
|
46
|
+
spec:
|
|
47
|
+
entryPoints:
|
|
48
|
+
- websecure
|
|
49
|
+
routes:
|
|
50
|
+
- match: Host(`OVH:<PROJECT_ID>-monitoring.OVH:<HOST>.com`)
|
|
51
|
+
kind: Rule
|
|
52
|
+
services:
|
|
53
|
+
- name: grafana
|
|
54
|
+
port: 9000
|
|
@@ -202,7 +202,7 @@ serverFiles:
|
|
|
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
|
|
205
|
+
description: "Pod {{ $labels.pod }} has been in a non-ready state for longer than 10 minutes."
|
|
206
206
|
dashboard: "Check the pod status using the Kubernetes UI"
|
|
207
207
|
|
|
208
208
|
- alert: KubernetesPodCrashLooping
|
|
@@ -36,7 +36,7 @@ cat<<DONE_VELERO
|
|
|
36
36
|
|
|
37
37
|
Velero docs => `color g 'open https://velero.io/docs'`
|
|
38
38
|
|
|
39
|
-
Wait at least 1 minute before kicking off the following backups:
|
|
39
|
+
`color y 'Wait at least 1 minute before kicking off the following backups:'`
|
|
40
40
|
|
|
41
41
|
`color g 'velero backup create --from-schedule velero-full'`
|
|
42
42
|
`color g 'velero backup create --from-schedule velero-psql'`
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
service:
|
|
2
|
-
type: "NodePort"
|
|
3
|
-
port: "9000"
|
|
4
|
-
|
|
5
|
-
persistence:
|
|
6
|
-
enabled: true
|
|
7
|
-
storageClassName: ssd
|
|
8
|
-
|
|
9
|
-
plugins:
|
|
10
|
-
- grafana-piechart-panel
|
|
11
|
-
- agenty-flowcharting-panel
|
|
12
|
-
|
|
13
|
-
deploymentStrategy:
|
|
14
|
-
type: Recreate
|
|
15
|
-
|
|
16
|
-
affinity:
|
|
17
|
-
nodeAffinity:
|
|
18
|
-
requiredDuringSchedulingIgnoredDuringExecution:
|
|
19
|
-
nodeSelectorTerms:
|
|
20
|
-
- matchExpressions:
|
|
21
|
-
- key: target-env
|
|
22
|
-
operator: In
|
|
23
|
-
values:
|
|
24
|
-
- database
|
|
25
|
-
tolerations:
|
|
26
|
-
- key: "database"
|
|
27
|
-
operator: "Equal"
|
|
28
|
-
value: "true"
|
|
29
|
-
effect: "NoSchedule"
|