cruise-automation / k-rail

Kubernetes security tool for policy enforcement
Apache License 2.0
444 stars 55 forks source link

[FR] Override ImagePullPolicy for configured images #43

Closed dustin-decker closed 4 years ago

dustin-decker commented 4 years ago

DAYTONA accounts for approximately half of GCR pulls and we are hitting GCR ratelimits.

Changing ImagePullPolicy:Always to IfNotPresent can help the situation.

Implement a mutation policy that can override this value for configured images.

type ImagePullPolicyConfig struct {
    Images []string
    ImagePullPolicy string
}

type Config struct {
...
PolicyImagePullPolicyOverride  struct {
    []ImagePullPolicyConfig
}
dustin-decker commented 4 years ago

Implemented in #44