mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 03:57:01 +00:00
feat: EKS IAM Roles for Service Accounts for Runner Pods (#226)
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
This commit is contained in:
17
hash/fnv.go
Normal file
17
hash/fnv.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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()))
|
||||
}
|
||||
Reference in New Issue
Block a user