spinnaker / kleat

A lightweight tool for managing Spinnaker configuration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kleat missing default Kubernetes account in Deck's "settings.json"

KeisukeYamashita opened this issue · comments

What

When kleat generates Deck's setting.js, it is missing Kubernetes default configuration.

Which version

  • kleat: 0.4.0
  • Spinnaker: 1.20.8

How to reproduce

$ kleat generate <any_halconfig>
(see `settings.json`)

kleat will generate a file like this.

window.spinnakerSettings = JSON.parse('{"gateUrl":"https://spinnaker-api.something.domain.com","authEnabled":true,"authEndpoint":"https://spinnaker-api.something.domain.com/auth/user","bakeryDetailUrl":"https://spinnaker-api.something.domain.com/bakery/logs/{{context.region}}/{{context.status.resourceId}}","canary":{"defaultJudge":"NetflixACAJudge-v1.0","featureDisabled":false,"showAllConfigs":true,"templatesEnabled":true},"notifications":{"slack":{"enabled":false,"botName":"spinnakerbot","token":"${SLACK_TOKEN}"}},"providers":{"kubernetes":{}},"defaultTimeZone":"America/Los_Angeles","feature":{"pipelineTemplates":true,"chaosMonkey":false,"fiatEnabled":true,"managedPipelineTemplatesV2UI":true}}');

Here, the provider.kubernetes is {}. But it should be provider.kubernetes: {default:{}} to define the default property which the deck requires. If I apply the manifests generated by kleat, it will run into error in the deck.

image

Workaround

I'm currently configuring this manually is settings-local.json.

$ echo "window.spinnakerSettings.providers.kubernetes = { defaults: {} }" >> settings.json

@KeisukeYamashita thanks for taking the time to open this issue! What version of Spinnaker are you trying to deploy? We're currently recommending 1.21+ since before that, many defaults were supplied by Halyard rather than the microservices themselves, so Kleat will not work as expected (we've documented that here, but should definitely highlight this more.). I think in this case, only the legacy Kubernetes (v1) provider required these provider defaults, and was only supported through 1.20. Let me know if I'm missing something, though!

@maggieneterval Thanks for your kind reply! We were trying to deploy the 1.20.8 stable release. Sorry, I've missed that kleat recommends 1.21+.

I think in this case, only the legacy Kubernetes (v1) provider required these provider defaults, and was only supported through 1.20.

Yeah, exactly... Thank you for taking your time to reply this. I will close this issue & PR.