Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit 27fa07b

Browse files
committed
fixed validator
1 parent b1d896f commit 27fa07b

File tree

4 files changed

+29
-18
lines changed

4 files changed

+29
-18
lines changed

cf-onprem

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,16 @@ EOF
185185

186186
cf_status=$(helm status $RELEASE 2>/dev/null | awk -F': ' '$1 == "STATUS" {print $2}')
187187

188-
[ -z "${cf_status}" ] && SEEDJOBS="--set global.seedJobs=true" && CERTJOBS="--set global.certsJobs=true"
188+
if [[ -z "${cf_status}" ]]; then
189+
SEEDJOBS="--set global.seedJobs=true"
190+
CERTJOBS="--set global.certsJobs=true"
191+
IN_INSTALLER="true" ${DIR}/run-validator.sh
192+
if [[ $? != 0 ]]; then
193+
echo "Validation failed"
194+
exit 1
195+
fi
196+
fi
197+
189198

190199
msg "Installing/Updating Codefresh..."
191200
helm upgrade ${RELEASE} codefresh-onprem-${CHANNEL}/codefresh \

run-validator.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
3+
echo "Starting validator"
44
DIR=$(dirname $0)
55
RELEASE=cf-validator
66
CHART=${DIR}/validator
@@ -15,16 +15,18 @@ fi
1515

1616
source ${DIR}/scripts/helpers.sh
1717

18-
approveContext
18+
if [[ -z "${IN_INSTALLER}" ]]; then
19+
approveContext
1920

20-
msg "Checking helm binary on your system"
21-
checkHelmInstalled "helm"
21+
msg "Checking helm binary on your system"
22+
checkHelmInstalled "helm"
2223

23-
msg "Checking if tiller is installed on kubernetes cluster"
24-
checkTillerInstalled
24+
msg "Checking if tiller is installed on kubernetes cluster"
25+
checkTillerInstalled
2526

26-
msg "Checking tiller status..."
27-
checkTillerStatus
27+
msg "Checking tiller status..."
28+
checkTillerStatus
29+
fi
2830

2931
## Get default storage class
3032
SC_DEFAULT_QUERY='{{ range .items }}'

validator/templates/storageclasses/pvcs.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
{{/* Fill dict persistent services */}}
77
{{- $persistentServices := dict -}}
8-
{{- $persistentServiceNames := list "mongodb" "postgresql" "consul" "redis" "rabbitmq" "registry" "cronus" -}}
8+
{{- $persistentServiceNames := list "mongodb" "postgresql" "consul" "redis" "rabbitmq" "registry" "cronus" "runner" "builder" -}}
99
{{- range $persistentServiceNames -}}
1010
{{- if (index $.Values . ) -}}
1111
{{- $_ := set $persistentServices . (index $.Values .) -}}
@@ -104,12 +104,14 @@ spec:
104104
---
105105
{{- end -}}
106106

107+
{{- end -}}
108+
109+
---
107110
apiVersion: v1
108111
kind: ConfigMap
109112
metadata:
110113
name: test-pvc-dummy-cm
111114
labels:
112115
app: {{ $.Release.Name }}
113116
data:
114-
dd: "11"
115-
{{- end -}}
117+
dd: "11"

values.yaml.tpl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,17 @@ builder:
139139
## Set time to run docker cleaner
140140
dockerCleanerCron: 0 0 * * *
141141
## Override builder PV initial size
142-
varLibDockerVolume:
143-
storageSize: 100Gi
144-
storageClass:
142+
storageSize: 100Gi
143+
storageClass:
145144
#existingPvc: cf-builder-0
146145

147146
runner:
148147
nodeSelector: {}
149148
## Set time to run docker cleaner
150149
dockerCleanerCron: 0 0 * * *
151150
## Override runner PV initial size
152-
varLibDockerVolume:
153-
storageSize: 100Gi
154-
storageClass:
151+
storageSize: 100Gi
152+
storageClass:
155153
#existingPvc: cf-runner-0
156154

157155

0 commit comments

Comments
 (0)