Skip to content

Commit d095720

Browse files
committed
Always pull most recent flagd
Signed-off-by: Todd Baert <[email protected]>
1 parent cc0e3ae commit d095720

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

webhooks/pod_webhook.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ import (
1717
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
1818
)
1919

20+
// we likely want these to be configurable, eventually
21+
const (
22+
FlagDTag = "main"
23+
FlagDImagePullPolicy = "Always"
24+
)
25+
2026
// NOTE: RBAC not needed here.
2127
//+kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;create;update;patch;delete
2228
//+kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete
@@ -145,10 +151,11 @@ func (m *PodMutator) injectSidecar(pod *corev1.Pod, configMap string) ([]byte, e
145151
})
146152
pod.Spec.Containers = append(pod.Spec.Containers, corev1.Container{
147153
Name: "flagd",
148-
Image: "ghcr.io/open-feature/flagd:main",
154+
Image: "ghcr.io/open-feature/flagd:" + FlagDTag,
149155
Args: []string{
150156
"start", "--uri", "/etc/flagd/config.json",
151157
},
158+
ImagePullPolicy: FlagDImagePullPolicy,
152159
VolumeMounts: []corev1.VolumeMount{
153160
{
154161
Name: "flagd-config",

0 commit comments

Comments
 (0)