Skip to content

Commit

Permalink
Fix helm race (#1837)
Browse files Browse the repository at this point in the history
* Fix helm install race
* Changelog
* Adjust helm test
  • Loading branch information
kdorosh authored and soloio-bulldozer[bot] committed Dec 7, 2019
1 parent fc5c370 commit 546930b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions changelog/v1.2.1/make-settings-hook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
changelog:
- type: FIX
issueLink: https://github.com/solo-io/gloo/issues/1838
description: >
The template for the settings resource needs to be a Helm pre-install hook to prevent races during install.
The hook annotation was accidentally removed with the `1.2.0` release; this change adds it back.
4 changes: 4 additions & 0 deletions install/helm/gloo/templates/18-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ metadata:
app: gloo
name: default
namespace: {{ .Release.Namespace }}
# We need this because the Gloo controllers will try to write default settings objects
# and if any of them is able to do so before this resource gets applied, installation will fail.
annotations:
"helm.sh/hook": pre-install
spec:
gloo:
xdsBindAddr: "0.0.0.0:{{ .Values.gloo.deployment.xdsPort }}"
Expand Down
10 changes: 6 additions & 4 deletions install/test/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,12 @@ spec:
apiVersion: gloo.solo.io/v1
kind: Settings
metadata:
labels:
app: gloo
name: default
namespace: ` + namespace + `
labels:
app: gloo
name: default
namespace: ` + namespace + `
annotations:
"helm.sh/hook": pre-install
spec:
discovery:
fdsMode: WHITELIST
Expand Down

0 comments on commit 546930b

Please sign in to comment.