-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add application image for snapshots #83
feat: add application image for snapshots #83
Conversation
df0522c
to
a2b22fd
Compare
@@ -22,7 +26,7 @@ validator: | |||
CARTESI_FEATURE_DISABLE_MACHINE_HASH_CHECK: "true" | |||
CARTESI_SNAPSHOT_DIR: "/usr/share/cartesi/snapshot" | |||
initContainers: | |||
- image: "docker.io/cartesi/dapp:echo-python-0.16.0-server" | |||
- image: "{{ .Values.validator.application.image.repository }}:{{ .Values.validator.application.image.tag }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should reuse the helper method at https://github.com/cartesi/helm-charts/blob/main/charts/rollups-node/templates/_helpers.tpl#L107-L121
or create a wrapper like https://github.com/cartesi/helm-charts/blob/main/charts/rollups-node/templates/_helpers.tpl#L137-L142
so we could use {{ include "application.image" . }}
at the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we could use
{{ include "application.image" . }}
at the end
the include function should typically be used within template files rather than directly within the YAML structure of values.yaml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, we can use this approach to make it simpler :
validator:
application:
image: cartesi/dapp:echo-python-0.16.0-server
And then fetch the value:
validator:
initContainers:
- image: "{{ .Values.validator.application.image }}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OR we can remove the - image
section from initcontainer
of values.yaml to the deployment template.
I'll send a fixup for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0ddace3
to
4341e53
Compare
@@ -33,6 +33,7 @@ spec: | |||
initContainers: | |||
{{- if .Values.validator.initContainers }} | |||
{{- include "tplvalues.render" ( dict "value" .Values.validator.initContainers "context" $ ) | nindent 8 }} | |||
image: {{ include "application.image" . }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this gonna work?
initContainers
is a list, we don't know how many initContainer
the user is gonna define.
For ex. we may have an initContainer
for the snapshot and another to create the database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we can define if else.
if the name was snapshot then add this image.
What do U think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't force a naming, the user could provide a snapshot any other way without even using an initContainer
, for ex.
The approach in this #83 (comment) is the easy path for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ready then ...
90946dc
to
973f4bd
Compare
charts/rollups-node/values.yaml.tpl
Outdated
@@ -8,7 +8,7 @@ global: | |||
# -- Global Docker image registry | |||
registry: docker.io | |||
# -- Global Docker Image tag | |||
tag: 1.3.0 | |||
tag: 1.3.0-rc.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in a DELETE commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no 1.3.0 yet. That's why we keep using a 1.3.0-rc.1
ina DELETE:
commit so the CI passes, until we have a final 1.3.0 release an then we remove this commit and move on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I did not know :)
charts/rollups-node/README.md
Outdated
@@ -2,7 +2,7 @@ | |||
|
|||
# Package for Cartesi Rollups Nodes | |||
|
|||
![Version: 1.3.0-0](https://img.shields.io/badge/Version-1.3.0--0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) | |||
![Version: 1.3.0-rc.1](https://img.shields.io/badge/Version-1.3.0--rc.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the DELETE commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will show the current PR action status. So, In My Idea, Every PR should have it's own README based on the charts and versions. So, when we merge this PR, we should regenerate the README based on final PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
charts/rollups-node/README.md
Outdated
| extraDeploy | list | `[]` | Array of extra objects to deploy with the release | | ||
| fullnameOverride | string | `""` | String to fully override name | | ||
| global.image.registry | string | `"docker.io"` | Global Docker image registry | | ||
| global.image.tag | string | `"1.3.0"` | Global Docker Image tag | | ||
| global.image.tag | string | `"1.3.0-rc.1"` | Global Docker Image tag | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the DELETE commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1b38734
to
f98c749
Compare
14ed708
into
feature/adapt-to-rollups-node-1.3.0
No description provided.