Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
updates to kubernetes deployment
Browse files Browse the repository at this point in the history
create init container in coord to generate jobs
tune worker resource requests
general bug fixes
update app version
  • Loading branch information
ognots committed May 11, 2020
1 parent 95b77c5 commit e09d54e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 20 deletions.
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.1.0
appVersion: 0.1.5
26 changes: 24 additions & 2 deletions chart/templates/statefulset-coord.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Release.Name }}-generate-configs"
data:
generate-configs.sh: |
#!/bin/bash
JOB_DIR="/coord/jobs"
if [ "$(ls -A $JOB_DIR)" ]; then
echo "jobs already generated"
else
filecoin-jobgen -i /build/examples/filecoin/jobgen/metajob-large.json -o $JOB_DIR
fi
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand All @@ -19,6 +33,11 @@ spec:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
volumes:
- name: generate-configs
configMap:
name: {{ .Release.Name }}-generate-configs
defaultMode: 0777
{{- if .Values.securityContext.runAsNonRoot }}
securityContext:
# The image runs as uid 1000 by default, and needs to be able to write to
Expand All @@ -36,10 +55,13 @@ spec:
{{- if .Values.coord.generateConfigs.enabled }}
- name: generate-configs
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
command: ["echo"]
command: ["/script/generate-configs.sh"]
volumeMounts:
- name: {{ .Release.Name }}-coord-vol
mountPath: /coord
- name: generate-configs
mountPath: /script/generate-configs.sh
subPath: generate-configs.sh
{{- end }}
containers:
- name: {{ .Chart.Name }}
Expand Down Expand Up @@ -73,7 +95,7 @@ spec:
{{ toYaml .Values.coord.affinity | indent 8 }}
tolerations:
{{ toYaml .Values.coord.tolerations | indent 8 }}
{{- if .Values.coord.persistence.coord.enabled }}
{{- if .Values.coord.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: {{ .Release.Name }}-coord-vol
Expand Down
35 changes: 18 additions & 17 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

image:
repository: ognots/fungi
pullPolicy: Always #IfNotPresent
#repository: ognots/filecoin-cad-cad
pullPolicy: IfNotPresent #Always

secretName: fungi-credentials
secretKey: secret

coord:
replicaCount: 1
generateConfigs:
enabled: false
enabled: true
service:
external:
type: LoadBalancer
Expand All @@ -34,28 +35,28 @@ coord:
- ReadWriteOnce
nodeSelector: {}
tolerations: []
#tolerations:
# - key: "worker"
# operator: "Equal"
# value: "false"
# effect: "NoSchedule"
# - key: "worker"
# operator: "Equal"
# value: "false"
# effect: "NoExecute"
affinity: {}
resources: #{}
requests:
cpu: 1000m
memory: 4Gi
limits:
cpu: 3000m
memory: 12Gi
resources: {}

spore:
replicaCount: 1
taskCount: 1
replicaCount: 8
taskCount: 4
nodeSelector: {}
tolerations: []
affinity: {}
resources: #{}
resources:
requests:
cpu: 1000m
memory: 4Gi
limits:
cpu: 3000m
memory: 12Gi
cpu: 4000m
memory: 20Gi

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit e09d54e

Please sign in to comment.