-
Notifications
You must be signed in to change notification settings - Fork 387
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 checksum of windows config files as annotations #5545
Conversation
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 fine with this change. Do you think there is anything preventing us from using Helm to generate the Windows YAML manifests (like we do for Linux)? Is it too complicated because of the different configurations that we have?
Thanks for the suggestion, I can try to do this after #5440 as it will bring some changes in manifest, so i think we can wait for it. |
hack/update-checksum-windows.sh
Outdated
WINDOWS_DIR="${YAMLS_DIR}"/windows | ||
WINDOWS_YAMLS="${YAMLS_DIR}/antrea-windows.yml ${YAMLS_DIR}/antrea-windows-containerd.yml ${YAMLS_DIR}/antrea-windows-containerd-with-ovs.yml" | ||
|
||
checksum_windows_config=$(cat ${WINDOWS_DIR}/base/conf/antrea-agent.conf ${WINDOWS_DIR}/base/conf/antrea-cni.conflist | sha256sum | cut -d " " -f 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.
can check if files exists before calculating checksum, some files might get removed/renamed etc in future, similar for others for error handling etc
if [ -f "${WINDOWS_DIR}/base/conf/antrea-agent.conf" ] && [ -f "${WINDOWS_DIR}/base/conf/antrea-cni.conflist" ]; then
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.
the script should definitely fail if a file is missing though, it should not silently ignore the missing file
d1616e6
to
4037f8d
Compare
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.
LGTM, one nit.
#5564 is created to explore using helm for generating windows manifests after completion of #5440 |
4037f8d
to
bd75f1d
Compare
When the ConfigMap is generated with suffix by kustomize, it will generate a manifest with new ConfigMap like 'antrea-windows-config-***'. When a new manifest is applied, it will leave stale ConfigMaps. To avoid stale ConfigMaps, here we add checksum of windows configuration files as annotations. Signed-off-by: Kumar Atish <[email protected]>
bd75f1d
to
9dc879c
Compare
/test-windows-all |
/test-windows-all |
/test-windows-e2e |
/test-windows-containerd-e2e |
/test-windows-containerd-e2e |
/test-windows-containerd-conformance |
@antoninbas could you please help to merge this PR ? Thanks. |
When the ConfigMap is generated with suffix by kustomize, it will generate a manifest with new ConfigMap like 'antrea-windows-config-***'. When a new manifest is applied, it will leave stale ConfigMaps. To avoid stale ConfigMaps, here we add checksum of windows configuration files as annotations.