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

Commit

Permalink
fixed validator
Browse files Browse the repository at this point in the history
  • Loading branch information
kosta709 committed Feb 12, 2019
1 parent b1d896f commit 27fa07b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18 deletions.
11 changes: 10 additions & 1 deletion cf-onprem
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,16 @@ EOF

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

[ -z "${cf_status}" ] && SEEDJOBS="--set global.seedJobs=true" && CERTJOBS="--set global.certsJobs=true"
if [[ -z "${cf_status}" ]]; then
SEEDJOBS="--set global.seedJobs=true"
CERTJOBS="--set global.certsJobs=true"
IN_INSTALLER="true" ${DIR}/run-validator.sh
if [[ $? != 0 ]]; then
echo "Validation failed"
exit 1
fi
fi


msg "Installing/Updating Codefresh..."
helm upgrade ${RELEASE} codefresh-onprem-${CHANNEL}/codefresh \
Expand Down
18 changes: 10 additions & 8 deletions run-validator.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#

echo "Starting validator"
DIR=$(dirname $0)
RELEASE=cf-validator
CHART=${DIR}/validator
Expand All @@ -15,16 +15,18 @@ fi

source ${DIR}/scripts/helpers.sh

approveContext
if [[ -z "${IN_INSTALLER}" ]]; then
approveContext

msg "Checking helm binary on your system"
checkHelmInstalled "helm"
msg "Checking helm binary on your system"
checkHelmInstalled "helm"

msg "Checking if tiller is installed on kubernetes cluster"
checkTillerInstalled
msg "Checking if tiller is installed on kubernetes cluster"
checkTillerInstalled

msg "Checking tiller status..."
checkTillerStatus
msg "Checking tiller status..."
checkTillerStatus
fi

## Get default storage class
SC_DEFAULT_QUERY='{{ range .items }}'
Expand Down
8 changes: 5 additions & 3 deletions validator/templates/storageclasses/pvcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{{/* Fill dict persistent services */}}
{{- $persistentServices := dict -}}
{{- $persistentServiceNames := list "mongodb" "postgresql" "consul" "redis" "rabbitmq" "registry" "cronus" -}}
{{- $persistentServiceNames := list "mongodb" "postgresql" "consul" "redis" "rabbitmq" "registry" "cronus" "runner" "builder" -}}
{{- range $persistentServiceNames -}}
{{- if (index $.Values . ) -}}
{{- $_ := set $persistentServices . (index $.Values .) -}}
Expand Down Expand Up @@ -104,12 +104,14 @@ spec:
---
{{- end -}}

{{- end -}}

---
apiVersion: v1
kind: ConfigMap
metadata:
name: test-pvc-dummy-cm
labels:
app: {{ $.Release.Name }}
data:
dd: "11"
{{- end -}}
dd: "11"
10 changes: 4 additions & 6 deletions values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,17 @@ builder:
## Set time to run docker cleaner
dockerCleanerCron: 0 0 * * *
## Override builder PV initial size
varLibDockerVolume:
storageSize: 100Gi
storageClass:
storageSize: 100Gi
storageClass:
#existingPvc: cf-builder-0

runner:
nodeSelector: {}
## Set time to run docker cleaner
dockerCleanerCron: 0 0 * * *
## Override runner PV initial size
varLibDockerVolume:
storageSize: 100Gi
storageClass:
storageSize: 100Gi
storageClass:
#existingPvc: cf-runner-0


Expand Down

0 comments on commit 27fa07b

Please sign in to comment.