Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions api/v1/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
15 changes: 14 additions & 1 deletion api/v1/store_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
}
Expand Down
Loading