@@ -2,7 +2,7 @@ package network
22
33import (
44 "context"
5- "crypto/sha1 "
5+ "crypto/sha256 "
66 "encoding/hex"
77 "encoding/json"
88 "fmt"
@@ -483,7 +483,7 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
483483 // daemonsets need to know when those ConfigMaps change so they can
484484 // restart with the new options. Render those ConfigMaps first and
485485 // embed a hash of their data into the ovnkube-node daemonsets.
486- h := sha1 .New ()
486+ h := sha256 .New ()
487487 for _ , path := range cmPaths {
488488 manifests , err := render .RenderTemplate (path , & data )
489489 if err != nil {
@@ -505,7 +505,7 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
505505
506506 // Compute a separate hash for no-overlay node config (outboundSNAT).
507507 // This allows ovnkube-node to restart when outboundSNAT changes
508- nodeNoOverlayHash := sha1 .New ()
508+ nodeNoOverlayHash := sha256 .New ()
509509 nodeNoOverlayHashData := fmt .Sprintf ("outboundSNAT=%v" , data .Data ["NoOverlayOutboundSNAT" ])
510510 if _ , err := nodeNoOverlayHash .Write ([]byte (nodeNoOverlayHashData )); err != nil {
511511 return nil , progressing , errors .Wrap (err , "failed to hash node no-overlay config" )
@@ -515,7 +515,7 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
515515 // Compute a separate hash for control-plane config (bgpManagedConfig).
516516 // This allows ovnkube-control-plane to restart when bgpManagedConfig changes,
517517 // without restarting ovnkube-node pods.
518- cpHash := sha1 .New ()
518+ cpHash := sha256 .New ()
519519 cpHashData := fmt .Sprintf ("asNumber=%v,topology=%v" ,
520520 data .Data ["NoOverlayManagedASNumber" ],
521521 data .Data ["NoOverlayManagedTopology" ])
0 commit comments