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

updates to kubernetes deployment #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM debian:stretch
ENV COORD_PATH /coord
RUN apt update && apt install -y python3
ADD coord /usr/local/bin/coord
ADD spore /usr/local/bin/spore
EXPOSE 5292
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