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 }