Skip to content

Commit

Permalink
Merge pull request #8 from chainflip-io/chore/extra-config
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjohnburton authored Aug 23, 2023
2 parents c497cbd + 679ae31 commit 0694de8
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/ci-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,23 @@ jobs:
- name: Test charts
run: |
helm unittest ./charts/*
helm unittest ./charts/*
check_version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check Chart.yaml version
run: |
git fetch origin main:main
VERSION_PR=$(yq .version charts/node/Chart.yaml)
git checkout main
VERSION_MAIN=$(yq .version charts/node/Chart.yaml)
if [ "$VERSION_PR" == "$VERSION_MAIN" ]; then
echo "chart.yaml version has not been updated!"
exit 1
else
echo "chart.yaml version has been updated."
fi
2 changes: 1 addition & 1 deletion charts/node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ maintainers:

type: application

version: 0.1.6
version: 0.1.7

appVersion: "0.8.7"
23 changes: 23 additions & 0 deletions charts/node/templates/engine-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
fi
sleep 1
done
{{- with .Values.engine.extraInitContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: chainflip-engine
image: "{{ include "chainflip-engine.image" . }}"
Expand Down Expand Up @@ -88,6 +91,26 @@ spec:
- name: settings
mountPath: {{ .Values.common.basePath }}/config
readOnly: true
{{- with .Values.engine.extraEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.engine.extraEnvFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.engine.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.engine.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.engine.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: settings
configMap:
Expand Down
20 changes: 20 additions & 0 deletions charts/node/templates/node-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,26 @@ spec:
- name: keys
mountPath: {{ .Values.common.keys.keysPath }}
{{- end }}
{{- with .Values.node.extraEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.node.extraEnvFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.node.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.node.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.node.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if eq .Values.common.role "validator" }}
- name: keys
Expand Down
33 changes: 33 additions & 0 deletions charts/node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ node:
extraArgs:
- --name="Chainflip Node"

# -- set extra environment variables
extraEnv: []

# -- set extra environment variables from a secret
extraEnvFrom: []

# -- ports exposed by the chainflip-node
ports:
# -- chainflip-node ws port
Expand Down Expand Up @@ -129,6 +135,15 @@ node:
# -- chainflip-node service annotations
annotations: {}

# -- set node selector
nodeSelector: {}

# -- set pod affinity
affinity: {}

# -- set pod tolerations
tolerations: []

# -- chainflip-engine configuration
engine:
# -- override the default value of the engine pod
Expand All @@ -148,6 +163,12 @@ engine:
# -- chainflip-engine extra arguments
extraArgs: {}

# -- set extra environment variables
extraEnv: []

# -- set extra environment variables from a secret
extraEnvFrom: []

# -- chainflip-engine resources
resources: {}

Expand Down Expand Up @@ -237,6 +258,18 @@ engine:
# -- chainflip-engine service annotations
annotations: {}

# -- define extra init containers on the engine
extraInitContainers: []

# -- set node selector
nodeSelector: {}

# -- set pod affinity
affinity: {}

# -- set pod tolerations
tolerations: []

# -- chainflip-cli configuration
cli:
# -- enable chainflip-cli
Expand Down

0 comments on commit 0694de8

Please sign in to comment.