Explorar o código

pass addon overrides to ccp and filter addon dashboard (#4064)

ianedwards %!s(int64=2) %!d(string=hai) anos
pai
achega
d513670a0d

+ 3 - 1
api/server/handlers/porter_app/update_app.go

@@ -111,7 +111,7 @@ func (c *UpdateAppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 		telemetry.AttributeKV{Key: "is-env-override", Value: request.IsEnvOverride},
 	)
 
-	var addons []*porterv1.Addon
+	var addons, addonOverrides []*porterv1.Addon
 	var overrides *porterv1.PorterApp
 	appProto := &porterv1.PorterApp{}
 
@@ -174,6 +174,7 @@ func (c *UpdateAppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 
 		if appFromYaml.PreviewApp != nil {
 			overrides = appFromYaml.PreviewApp.AppProto
+			addonOverrides = appFromYaml.PreviewApp.Addons
 			envVariables = mergeEnvVariables(envVariables, appFromYaml.PreviewApp.EnvVariables)
 		}
 
@@ -248,6 +249,7 @@ func (c *UpdateAppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 		CommitSha:     request.CommitSHA,
 		IsEnvOverride: request.IsEnvOverride,
 		Addons:        addons,
+		AddonOverrides: addonOverrides,
 	})
 
 	ccpResp, err := c.Config().ClusterControlPlaneClient.UpdateApp(ctx, updateReq)

+ 1 - 0
dashboard/src/main/home/add-on-dashboard/AddOnDashboard.tsx

@@ -56,6 +56,7 @@ const templateBlacklist = [
   "worker",
   "job",
   "umbrella",
+  "postgresql-managed"
 ];
 
 const AddOnDashboard: React.FC<Props> = ({

+ 2 - 1
dashboard/src/main/home/add-on-dashboard/NewAddOnFlow.tsx

@@ -35,7 +35,8 @@ const HIDDEN_CHARTS = [
   "porter-agent",
   "rds-chart",
   "rds-postgresql",
-  "rds-postgresql-aurora"
+  "rds-postgresql-aurora",
+  "postgresql-managed"
 ];
 
 //For Charts that don't exist locally we need to add them in manually