From 272d557a6918e87866f0ca4cda22b456584bedc6 Mon Sep 17 00:00:00 2001 From: Patrick Derks Date: Mon, 13 Jul 2026 09:22:07 +0200 Subject: [PATCH] feat: add disable snippet sync for deployment helper https://github.com/shopware/deployment-helper/pull/91/changes --- api/v1/store.go | 5 +++-- api/v1/store_env.go | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/api/v1/store.go b/api/v1/store.go index f36deeb..17f9c16 100644 --- a/api/v1/store.go +++ b/api/v1/store.go @@ -123,8 +123,9 @@ type Configuration struct { } type FastlySpec struct { - TokenRef SecretRef `json:"tokenRef,omitempty"` - ServiceRef SecretRef `json:"serviceRef,omitempty"` + DisableOnSetupMigration bool `json:"disableOnSetupMigration,omitempty"` + TokenRef SecretRef `json:"tokenRef,omitempty"` + ServiceRef SecretRef `json:"serviceRef,omitempty"` } type Credentials struct { diff --git a/api/v1/store_env.go b/api/v1/store_env.go index ae90343..46202d2 100644 --- a/api/v1/store_env.go +++ b/api/v1/store_env.go @@ -413,7 +413,8 @@ func (s *Store) getFastly() []corev1.EnvVar { s.Spec.ShopConfiguration.Fastly.ServiceRef.Key != "" && s.Spec.ShopConfiguration.Fastly.TokenRef.Name != "" && s.Spec.ShopConfiguration.Fastly.TokenRef.Key != "" { - envVars = append(envVars, + envVars = append( + envVars, corev1.EnvVar{ Name: "FASTLY_SERVICE_ID", ValueFrom: &corev1.EnvVarSource{ @@ -437,6 +438,18 @@ func (s *Store) getFastly() []corev1.EnvVar { }, }, ) + + // Disable snippet sync from deployment-helper + if s.Spec.ShopConfiguration.Fastly.DisableOnSetupMigration { + envVars = append( + envVars, + corev1.EnvVar{ + Name: "FASTLY_DISABLE_SNIPPET_UPDATE", + Value: "1", + }, + ) + } + } return envVars }