2
0
Эх сурвалжийг харах

add validate apply v2 feature flag (#3365)

Co-authored-by: David Townley <davidtownley@Davids-MacBook-Air.local>
d-g-town 2 жил өмнө
parent
commit
cab82b06ca

+ 2 - 0
api/types/project.go

@@ -14,6 +14,7 @@ type Project struct {
 	AzureEnabled           bool    `json:"azure_enabled"`
 	HelmValuesEnabled      bool    `json:"helm_values_enabled"`
 	MultiCluster           bool    `json:"multi_cluster"`
+	ValidateApplyV2        bool    `json:"validate_apply_v2"`
 }
 
 type FeatureFlags struct {
@@ -26,6 +27,7 @@ type FeatureFlags struct {
 	AzureEnabled               bool   `json:"azure_enabled,omitempty"`
 	HelmValuesEnabled          bool   `json:"helm_values_enabled,omitempty"`
 	MultiCluster               bool   `json:"multi_cluster,omitempty"`
+	ValidateApplyV2            bool   `json:"validate_apply_v2"`
 }
 
 type CreateProjectRequest struct {

+ 2 - 0
internal/models/project.go

@@ -68,6 +68,7 @@ type Project struct {
 	AzureEnabled           bool
 	HelmValuesEnabled      bool
 	MultiCluster           bool `gorm:"default:false"`
+	ValidateApplyV2        bool `gorm:"default:false"`
 }
 
 // ToProjectType generates an external types.Project to be shared over REST
@@ -92,5 +93,6 @@ func (p *Project) ToProjectType() *types.Project {
 		AzureEnabled:           p.AzureEnabled,
 		HelmValuesEnabled:      p.HelmValuesEnabled,
 		MultiCluster:           p.MultiCluster,
+		ValidateApplyV2:        p.ValidateApplyV2,
 	}
 }