Skip to content

Commit

Permalink
Merge pull request #1842 from magda-io/make-dev-statefulsets-sit-on-n…
Browse files Browse the repository at this point in the history
…on-preemptible-node

Made it possible to keep statefulsets off preemptible nodes
  • Loading branch information
t83714 committed Nov 8, 2018
2 parents 0c8a55f + ad758c9 commit b27b2c7
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -33,6 +33,7 @@
- Make jurisdiction field available from registry api
- Fixed an issue of scss-compiler not updated all variables
- Added more configurable scss variables
- Updated helm config to allow for statefulsets to be kept off GKE preemptible nodes.
- Switched `<a>` element in `HeaderNav` to be `<Link>` from `react-router-dom` to maintain router history

## 0.0.49
Expand Down
3 changes: 2 additions & 1 deletion deploy/helm/magda-dev.yml
Expand Up @@ -70,15 +70,16 @@ combined-db:
fileName: TerriaJS-5e042b649f8a.json
data:
storage: 250Gi
antiPreemptibleAffinity: 100

elasticsearch:
data:
heapSize: 500m
pluginsInstall: "repository-gcs"
backup:
googleApplicationCreds:
secretName: storage-account-credentials
fileName: db-service-account-private-key.json
antiPreemptibleAffinity: 99

indexer:
readSnapshots: false
Expand Down
Expand Up @@ -15,6 +15,8 @@ spec:
service: authorization-db
spec:
terminationGracePeriodSeconds: 60
affinity:
{{ include "magda.antiPreemptibleAffinity" . }}
containers:
- name: authorization-db
resources:
Expand Down
Expand Up @@ -15,6 +15,8 @@ spec:
service: combined-db
spec:
terminationGracePeriodSeconds: 10
affinity:
{{ include "magda.antiPreemptibleAffinity" . }}
containers:
- name: combined-db
resources:
Expand Down
Expand Up @@ -15,6 +15,8 @@ spec:
service: content-db
spec:
terminationGracePeriodSeconds: 60
affinity:
{{ include "magda.antiPreemptibleAffinity" . }}
containers:
- name: content-db
resources:
Expand Down
Expand Up @@ -20,6 +20,7 @@ spec:
spec:
terminationGracePeriodSeconds: 10
affinity:
{{ include "magda.antiPreemptibleAffinity" . }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
Expand Down
Expand Up @@ -15,6 +15,8 @@ spec:
service: registry-db
spec:
terminationGracePeriodSeconds: 10
affinity:
{{ include "magda.antiPreemptibleAffinity" . }}
containers:
- name: registry-db
resources:
Expand Down
Expand Up @@ -15,6 +15,8 @@ spec:
service: session-db
spec:
terminationGracePeriodSeconds: 60
affinity:
{{ include "magda.antiPreemptibleAffinity" . }}
containers:
- name: session-db
resources:
Expand Down
13 changes: 13 additions & 0 deletions deploy/helm/magda/templates/_helpers.tpl
Expand Up @@ -215,4 +215,17 @@ spec:
items:
- key: "{{ .jobConfig.id }}.json"
path: "connector.json"
{{- end }}


{{- define "magda.antiPreemptibleAffinity" }}
{{- if .Values.antiPreemptibleAffinity }}
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: cloud.google.com/gke-preemptible
operator: DoesNotExist
weight: {{ .Values.antiPreemptibleAffinity }}
{{- end }}
{{- end }}

0 comments on commit b27b2c7

Please sign in to comment.