Skip to content

Commit 99ca07e

Browse files
committed
fix: remove version from deployment labels
allows version update of existing deployment, since selectors are immutable Signed-off-by: Tom Plant <[email protected]>
1 parent 742aed9 commit 99ca07e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

internal/controller/gateway_controller.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -632,13 +632,15 @@ func (r *GatewayReconciler) deploymentForGateway(
632632
// labelsForGateway returns the labels for selecting the resources
633633
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
634634
func labelsForGateway(name string) map[string]string {
635-
var imageTag string
636-
image, err := imageForGateway()
637-
if err == nil {
638-
imageTag = strings.Split(image, ":")[1]
639-
}
640-
return map[string]string{"app.kubernetes.io/name": "cloudflare-kubernetes-gateway",
641-
"app.kubernetes.io/version": imageTag,
635+
// skip imageTag, to allow version updates to existing deployments
636+
// var imageTag string
637+
// image, err := imageForGateway()
638+
// if err == nil {
639+
// imageTag = strings.Split(image, ":")[1]
640+
// }
641+
return map[string]string{
642+
"app.kubernetes.io/name": "cloudflare-kubernetes-gateway",
643+
// "app.kubernetes.io/version": imageTag,
642644
"app.kubernetes.io/managed-by": "GatewayController",
643645
"cfargotunnel.com/name": name,
644646
}

0 commit comments

Comments
 (0)