Closed rsjostrand-hpe closed 2 years ago
SonarCloud Quality Gate failed.
0 Bugs
0 Vulnerabilities
0 Security Hotspots
2 Code Smells
No Coverage information
19.4% Duplication
Declined in favor of: https://github.com/Cray-HPE/loftsman/pull/43
What type of PR is this?
Bug fix.
What this PR does / why we need it:
The
loftsman.io/previous-data
annotation that is added to the ship result configmaps in the loftsman namespaces has a size limit fo 256KB. When the size of a manifest and loftsman log from a previous run have a combined size of 256KB or more, then loftsman will fail to (re)deploy a manifest with the same name.In this PR the
loftsman.io/previous-data
annotation is has been removed, and loftsman will no longer keep track of the previous contents of the ship result configmap. As we have hit situations were the size of the generated core-services manifest has exceeded 256KB. After a ship operation the loftsman logs are now stored in their own config mapThis allows for a manifest and its log file to grow up to 1MB in size (this is a limit imposed by k8s and ETCD for the size of a single configmap). In my testing the size of the manifest and loftsman log will be approximately the same.
Which issue(s) this PR fixes or finishes:
Testing
Local testing
For local testing I was using a manifest with the size fo 343KB.
The 1.1.0 version of loftsman is able to deploy a manifest that is 343KB in size if it hasn't been deployed before, since there is no data needed to be persisted in the
loftsman.io/previous-data
annotationWhen running
loftsman ship
again the 1.1.0 version of loftsman fails to run due to exceeding the max allowed annotation size.The version of loftsman from this PR is able to successfully deploy this large manifest:
I verified the contents of the 2 configmaps that loftsman created contained the expected data:
Wasp testing
On wasp I used successfully deployed the
cray-hms-rts
helm chart with the version of loftsman from this PR.I also tested running loftsman 1.1.0 and then loftsman 1.2.0 (from this PR) and verified that the
loftsman-rts
configmap only contained the manifest and the ship status, and that theloftsman-rts-ship-log
contained the loftsman log.To simulate a downgrade of loftsman I tested running version 1.2.0 and then 1.1.0. I verified that RTS was deployed successful, and loftsman didn't error out due to the changes in the ship result config map
loftsman-rts
.