1

I've been using helm install spinnaker stable/spinnaker -f spinnaker-config.yaml --timeout 1200s --version 2.0.0-rc9 Which is the latest helm chart for Spinnaker. Using this on a freshly created K8s cluster on GKE. Just installed Helm so I have the latest.

Result is that it created a Job named spinnaker-install-using-hal and the pod for this job keeps restarting... Container logs show:

/opt/halyard/scripts/config.sh: line 10: syntax error near unexpected token `newline'

I've actually found this file is mounted from a ConfigMap named *-spinnaker-halyard-config.

The ConfigMap value for config.sh is set to:

# Spinnaker version
$HAL_COMMAND config version edit --version 1.19.4


# Storage



$HAL_COMMAND config storage gcs edit --project XXXXXXXXXX --json-path /opt/gcs/key.json --bucket <GCS-BUCKET-NAME>
$HAL_COMMAND config storage edit --type gcs



# Docker Registry
$HAL_COMMAND config provider docker-registry enable

if $HAL_COMMAND config provider docker-registry account get dockerhub; then
  PROVIDER_COMMAND='edit'
else
  PROVIDER_COMMAND='add'
fi

$HAL_COMMAND config provider docker-registry account $PROVIDER_COMMAND dockerhub --address index.docker.io \
   \
  --repositories library/alpine,library/ubuntu,library/centos,library/nginx

$HAL_COMMAND config provider kubernetes enable

if $HAL_COMMAND config provider kubernetes account get default; then
  PROVIDER_COMMAND='edit'
else
  PROVIDER_COMMAND='add'
fi

$HAL_COMMAND config provider kubernetes account $PROVIDER_COMMAND default --docker-registries dockerhub \
            --context default --service-account true \
             \
             \
             \
             \
            --omit-namespaces=kube-system,kube-public \
             \
             \
            --provider-version v2
$HAL_COMMAND config deploy edit --account-name default --type distributed \
                       --location default
# Use Deck to route to Gate
$HAL_COMMAND config security api edit --no-validate --override-base-url /gate
$HAL_COMMAND config features edit --artifacts true

In line #9 it has the value <GCS-BUCKET-NAME> instead of the real bucket name. This probably caused the script to fail.

Still not sure what causes that to not be populated.

srfrnk
  • 2,459
  • 1
  • 17
  • 32

1 Answers1

2

Found the problem... maybe someone finds it helpful...

I was using the following guide https://medium.com/velotio-perspectives/know-everything-about-spinnaker-how-to-deploy-using-kubernetes-engine-57090881c78f

Which is a great guide but i guess not too updated...

Anyway it says you should configure

storageBucket: $BUCKET 
gcs:   
  enabled: true 
  project: $PROJECT   
  jsonKey: '$SA_JSON' 

Which is incorrect... it should be as follows:

gcs:   
  enabled: true
  bucket: $BUCKET
  project: $PROJECT
  jsonKey: '$SA_JSON'

This solved it.

srfrnk
  • 2,459
  • 1
  • 17
  • 32
  • the official chart moves fast. i recommend using the values.yaml in the repo as your guide and then locking subsequent development by specifying the chart version you're working with to prevent future instability. – Camilo Santana Jul 15 '20 at 20:03
  • Thanks @CamiloSantana - perhaps you could suggest that to the author of the guide, might help the next person. – srfrnk Jul 17 '20 at 06:49