Skip to content

Commit

Permalink
Merge pull request #561 from SparebankenVest/feature/init-container-i…
Browse files Browse the repository at this point in the history
…mage-pull-policy

Expose init container image pull policy
  • Loading branch information
181192 authored Jul 2, 2023
2 parents ec4b515 + 00dca3f commit 5567e33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/azure-keyvault-secrets-webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ func initConfig() {
viper.SetDefault("metrics_enabled", false)
viper.SetDefault("env_injector_exec_dir", "/azure-keyvault/")

viper.SetDefault("webhook_container_image_pull_policy", corev1.PullIfNotPresent)
viper.SetDefault("webhook_container_security_context_read_only", false)
viper.SetDefault("webhook_container_security_context_non_root", false)
viper.SetDefault("webhook_container_security_context_user_uid", 1000)
Expand Down
2 changes: 1 addition & 1 deletion cmd/azure-keyvault-secrets-webhook/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (p podWebHook) getInitContainers() []corev1.Container {
container := corev1.Container{
Name: "copy-azurekeyvault-env",
Image: viper.GetString("azurekeyvault_env_image"),
ImagePullPolicy: corev1.PullIfNotPresent,
ImagePullPolicy: corev1.PullPolicy(viper.GetString("webhook_container_image_pull_policy")),
Command: []string{"sh", "-c", cmd},
SecurityContext: &corev1.SecurityContext{
Capabilities: &corev1.Capabilities{
Expand Down

0 comments on commit 5567e33

Please sign in to comment.