Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made it possible to keep statefulsets off preemptible nodes #1842

Merged
merged 2 commits into from Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 }}