Skip to content

Commit

Permalink
add a way for a user to add extra args to ocv
Browse files Browse the repository at this point in the history
  • Loading branch information
simisimis committed Dec 16, 2024
1 parent 3e6c042 commit 7ef602d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion on-chain-voting/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.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. Versions are not expected to
Expand Down
6 changes: 4 additions & 2 deletions on-chain-voting/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# on-chain-voting

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

A Helm chart for Kubernetes

Expand Down Expand Up @@ -63,8 +63,9 @@ helmfile status
| server.affinity | object | `{}` | Affinity |
| server.allowedOrigins | string | `"*"` | Allow Origins |
| server.archivePostgresConnectionString | string | `"postgres://mina@postgres:5432/archive"` | Archive Postgres Connection String |
| server.args | list | `[]` | The arguments to pass at runtime |
| server.deploymentAnnotations | object | `{}` | Annotations to add to deployments |
| server.extraEnvVars | object | `{}` | |
| server.extraEnvVars | object | `{}` | Extra Environment variables |
| server.image.imagePullSecrets | list | `[]` | The secrets used to pull the image |
| server.image.pullPolicy | string | `"IfNotPresent"` | The image pull policy |
| server.image.repository | string | `"673156464838.dkr.ecr.us-west-2.amazonaws.com/on-chain-voting-server"` | The image repository |
Expand All @@ -87,6 +88,7 @@ helmfile status
| serviceAccount.name | string | `""` | The name of the service account to use. |
| web.affinity | object | `{}` | Affinity |
| web.apiBaseURL | string | `""` | API base URL |
| web.args | list | `[]` | The arguments to pass at runtime |
| web.deploymentAnnotations | object | `{}` | Annotations to add to deployments |
| web.extraEnvVars | object | `{}` | Extra Environment variables |
| web.image.imagePullSecrets | list | `[]` | The secrets used to pull the image |
Expand Down
5 changes: 5 additions & 0 deletions on-chain-voting/templates/deployment-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
command: [ "/app/target/release/mina_ocv" ]
{{- if .Values.server.args }}
args:
{{- toYaml .Values.server.args | nindent 12 }}
{{- end }}
env:
{{- if .Values.server.postgresConnectionString }}
- name: DATABASE_URL
Expand Down
5 changes: 5 additions & 0 deletions on-chain-voting/templates/deployment-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
command: [ "/app/start" ]
{{- if .Values.web.args }}
args:
{{- toYaml .Values.web.args | nindent 12 }}
{{- end }}
env:
- name: API_BASE_URL
value: {{ .Values.web.apiBaseURL | default (printf "http://%s-server:8080" .Release.Name) | quote }}
Expand Down
8 changes: 7 additions & 1 deletion on-chain-voting/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ web:
# -- Next Public Release Stage
nextPublicReleaseStage: production

# -- The arguments to pass at runtime
args: []

# -- Extra Environment variables
extraEnvVars:
{}
Expand Down Expand Up @@ -199,7 +202,10 @@ server:
# -- Allow Origins
allowedOrigins: "*"

# Extra Environment variables
# -- The arguments to pass at runtime
args: []

# -- Extra Environment variables
extraEnvVars:
{}
# - name: FOO
Expand Down

0 comments on commit 7ef602d

Please sign in to comment.