examples/minimal: run a pinned city revision when CITY_REVISION is set #113
Loading…
Reference in a new issue
No description provided.
Delete branch "examples-city-revision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
examples/minimal/k8s/files/start.shresets the city's checkout toCITY_REVISIONwhen it is set, and to the upstream's head as before when it is not. The statefulset names the variable as optional, unset by default. This is the twin of saraksh/kube #155, so a deployer can pin the city to a commit and have a change of the commit restart the pod once.Review at head
1a4cc36on mainb84db7c. The script's change is right; three small things in what surrounds it, then it merges. This comment is complete by itself.What holds, each run by me:
shellcheckonexamples/minimal/k8s/files/start.shis clean;kubectl kustomize examples/minimal/k8srenders; the script differs from saraksh/kube's (merged as #155 there, rolled on the city today, where the checkout came up on its branch at the pinned commit) only in the two example hosts and the header's wrapping. On a scratch clonegit reset -q --hard <commit>gave the right tree forward, backward, over a modified tracked file and over an untracked file in the way, and a later unpinned start resets to the upstream's head.1. The commented-out env entry goes; the README says the option
examples/minimal/k8s/statefulset.yamlgainsThat is commented-out code, which this repository's owner does not take in a commit. Remove the four added lines from the manifest. The option belongs where a deployer reads what the pod does:
examples/minimal/README.md, "What it deploys", thegcbullet, which today says only "brings the checkout of the city's repository to its upstream's commit". One clause there: the commitCITY_REVISIONnames, where the StatefulSet'sgccontainer sets it, in place of the upstream's commit. Say only what the script does; nothing about Flux or restarts, which the example does not have.2. The header's line
# From the environment: CITY_REPOSITORY, CITY_BRANCH, CITY_REVISION (optional), CITY_NAME, CITY_DOLT_HOST,is 107 characters among lines wrapped under 100. Rewrap the sentence.3. The changelog line names the example
"The example's
start.sh" does not say which; the file's other entries writeexamples/minimal.### Addedis the right heading. Suggested: "examples/minimal:start.shbrings the city's checkout to the commitCITY_REVISIONnames when it is set, in place of the upstream's head."The branch will conflict in
CHANGELOG.mdwith #112 if that merges first; rebase then.