-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add genereric command/params for bridge-relay #326
Conversation
e928eab
to
1292636
Compare
@@ -33,6 +33,20 @@ spec: | |||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | |||
imagePullPolicy: {{ .Values.image.pullPolicy }} | |||
args: | |||
{{- if .Values.command }} |
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.
Kubernetes has separate field for command
, if we set command in args it will confuse users.
spec:
containers:
- name: command-demo-container
command: ["printenv"]
args: ["HOSTNAME", "KUBERNETES_PORT"]
currently the default value for command
is ENTRYPOINT ["/home/user/bridge-entrypoint.sh"]
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'm not sure how to call it. But we have multiple commands within the relayer binary. Maybe we can call it subcommand
?
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.
Maybe let's use a list instead of strings/maps.
I see at least 2 use cases not covered by this PR:
- What will we do if we have 2 or 3 subcommands?
- How do we pass the list of valid bash parameters:
--lane 00000001 \
--lane 00000002 \
--dry-run
I assume it would be like this:
.Values.params:
lane: '00000001'
lane: '00000002'
dry-run: ''
but this would result in invalid YAML (key lane
present twice) and render output:
--lane=00000002 \
--dry-run=
I propose having a single .Values.args: [ ]
.
For example, for code like this:
subcommand1 \
subcommand2 \
subcommand3 \
--lane 00000001 \
--lane 00000002 \
--dry-run
we would have values:
.Values.args:
- subcommand1
- subcommand2
- subcommand3
- "--lane 00000001"
- "--lane 00000002"
- "--dry-run"
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.
OK let's go with your solution of only one "params" variable.
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 implemented the single var solution. Also removed the previous way to set flags so this is a breaking change.
we already have |
Yes but with these variables it makes it more clear what needs to be set... |
1292636
to
514484b
Compare
Breaking change, revamp how the bridge relayer configuration is set.