File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 55- (Bugfix) Prevent unexpected rotation in case of SecurityContext change
66- (Bugfix) Ensure PDB is created
77- (Bugfix) Fix Schema Apply Checksum
8+ - (Bugfix) Use MD5 instead of SHA256 for CRD Checksums
89
910## [ 1.2.40] ( https://github.com/arangodb/kube-arangodb/tree/1.2.40 ) (2024-04-10)
1011- (Feature) Add Core fields to the Scheduler Container Spec
Original file line number Diff line number Diff line change @@ -48,10 +48,10 @@ func (d DefinitionData) schemaDefinitionLoader() util.Loader[crdSchemas] {
4848
4949func (d DefinitionData ) Checksum () (definition , schema string ) {
5050 if len (d .definition ) > 0 {
51- definition = util .SHA256 (d .definition )
51+ definition = util .MD5 (d .definition )
5252 }
5353 if len (d .schemaDefinition ) > 0 {
54- schema = util .SHA256 (d .schemaDefinition )
54+ schema = util .MD5 (d .schemaDefinition )
5555 }
5656 return
5757}
Original file line number Diff line number Diff line change 2121package util
2222
2323import (
24+ "crypto/md5"
2425 "crypto/sha256"
2526 "fmt"
2627
@@ -35,6 +36,14 @@ func SHA256(data []byte) string {
3536 return fmt .Sprintf ("%0x" , sha256 .Sum256 (data ))
3637}
3738
39+ func MD5FromString (data string ) string {
40+ return MD5 ([]byte (data ))
41+ }
42+
43+ func MD5 (data []byte ) string {
44+ return fmt .Sprintf ("%0x" , md5 .Sum (data ))
45+ }
46+
3847func SHA256FromJSON [T interface {}](a T ) (string , error ) {
3948 d , err := json .Marshal (a )
4049 if err != nil {
You can’t perform that action at this time.
0 commit comments