mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 11:41:27 +00:00
One of the pod recreation conditions has been modified to use hash of runner spec, so that the controller does not keep restarting pods mutated by admission webhooks. This naturally allows us, for example, to use IRSA for EKS that requires its admission webhook to mutate the runner pod to have additional, IRSA-related volumes, volume mounts and env. Resolves #200
18 lines
279 B
Go
18 lines
279 B
Go
package hash
|
|
|
|
import (
|
|
"fmt"
|
|
"hash/fnv"
|
|
"k8s.io/apimachinery/pkg/util/rand"
|
|
)
|
|
|
|
func FNVHashStringObjects(objs ...interface{}) string {
|
|
hash := fnv.New32a()
|
|
|
|
for _, obj := range objs {
|
|
DeepHashObject(hash, obj)
|
|
}
|
|
|
|
return rand.SafeEncodeString(fmt.Sprint(hash.Sum32()))
|
|
}
|