fix(controller): parse etcdOptions consistently and normalize '--flag value' #574
/test pull-etcd-operator-test
LGTM
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: <a href="https://github.com/etcd-io/etcd-operator/pull/574#" title="Author self-approved">ahrtr</a>, <a href="https://github.com/etcd-io/etcd-operator/pull/574#pullrequestreview-6067174933" title="Approved">silentred</a>
The full list of commands accepted by this bot can be found here.
The pull request process is described here
<details >
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
</details>
<!-- META={"approvers":[]} -->
Sorry I missed this. I thought []string{"--quota-backend-bytes", "4096"} is a valid case, why this should be unrecognised?
fixed, now we accept the following four formats:
"--flag=value"
"--flag value"
"--flag" "value"
--flag // for bool flagThanks. LGTM.
The commit history seems not right. Should I choose "Squash and merge"? Sorry for the mistake.
The commit history seems not right. Should I choose "Squash and merge"?
There is no standard. Either way works.
My personal rules:
rebase and merge
create a merge commit; otherwise, use rebase and merge for super simple change, otherwise still use create a merge commit
silentred
ahrtr
For each item in the EtcdOptions, we accept the following four formats:
"--flag=value""--flag value""--flag" "value"--flag// for bool flagIf users provide
"--flag value", etcd will reject it since it read it as a single flag with space inside, so we need to normalize it into"--flag=value".This PR is finished with the help of claude code. I made some manual change, and also reviewed the change.
cc @Abhayrkhot @silentred