Skip to content

Commit

Permalink
cm cs handling for inheriting data type (#4189)
Browse files Browse the repository at this point in the history
  • Loading branch information
prakash100198 committed Nov 1, 2023
1 parent b3fdf7b commit 92c7643
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/restHandler/CoreAppRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,10 @@ func (handler CoreAppRestHandlerImpl) buildAppConfigMaps(appId int, envId int, c

//set data
data := configMap.Data
if configMap.Data == nil {
//it means env cm is inheriting from base cm
data = configMap.DefaultData
}
var dataObj map[string]interface{}
if data != nil {
err := json.Unmarshal([]byte(data), &dataObj)
Expand Down Expand Up @@ -973,9 +977,6 @@ func (handler CoreAppRestHandlerImpl) buildAppEnvironmentSecrets(appId int, envI
handler.logger.Errorw("service err, CSEnvironmentFetchForEdit in GetAppAllDetail", "err", err, "appId", appId, "envId", envId)
return nil, err, http.StatusInternalServerError
}
if secretConfig.Data == nil {
secretDataWithData.ConfigData[0].Data = secretConfig.Data
}
secretDataWithData.ConfigData[0].DefaultData = secretConfig.DefaultData

secretRes, err, statusCode := handler.buildAppSecrets(appId, envId, secretDataWithData)
Expand Down

0 comments on commit 92c7643

Please sign in to comment.