Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: Min Min <jamsman94@gmail.com>
  • Loading branch information
jamsman94 committed Nov 29, 2024
1 parent 8b50906 commit f380bd7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,6 @@ type SAEEnvInfo struct {
type SAEKV struct {
Name string `bson:"name" json:"name" yaml:"name"`
Value string `bson:"value" json:"value" yaml:"value"`
ValueFrom string `bson:"value_from" json:"value_from" yaml:"value_from"`
ConfigMapID string `bson:"config_map_id" json:"config_map_id" yaml:"config_map_id"`
Key string `bson:"key" json:"key" yaml:"key"`
}
Expand Down
23 changes: 12 additions & 11 deletions pkg/microservice/aslan/core/common/service/sae/sae.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ func validateSAE(args *commonmodels.SAE) error {
}

type saeKV struct {
Name string `json:"name"`
Value string `json:"value"`
ValueFrom string `json:"valueFrom"`
ConfigMapID string `json:"configMapId"`
Key string `json:"key"`
Name string `json:"name"`
Value string `json:"value"`
ValueFrom struct {
ConfigMapID string `json:"configMapId"`
Key string `json:"key"`
} `json:"valueFrom"`
}

// CreateKVMap takes a string and de-serialize it into a struct that we can use
Expand All @@ -130,12 +131,12 @@ func CreateKVMap(kv *string) (map[string]*commonmodels.SAEKV, error) {
resp := make(map[string]*commonmodels.SAEKV)

for _, env := range envList {
resp[env.Key] = &commonmodels.SAEKV{
Name: env.Name,
Value: env.Value,
ValueFrom: env.ValueFrom,
ConfigMapID: env.ConfigMapID,
Key: env.Key,
resp[env.Name] = &commonmodels.SAEKV{
Name: env.Name,
Value: env.Value,
//ValueFrom: env.ValueFrom,
ConfigMapID: env.ValueFrom.ConfigMapID,
Key: env.ValueFrom.Key,
}
}

Expand Down

0 comments on commit f380bd7

Please sign in to comment.