Skip to content

Commit 8103be4

Browse files
montuswenmontuswen
andauthored
Add Notation to parseFSInfoFromConfigMap in pkg\ddc\juicefs\datasetinfo_parser.go (#4576)
Signed-off-by: montuswen <montuswen@gmail.com> Co-authored-by: montuswen <montuswen@gmail.com>
1 parent 59b3713 commit 8103be4

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

pkg/ddc/juicefs/datasetinfo_parser.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,21 @@ func GetFSInfoFromConfigMap(client client.Client, name string, namespace string)
6767
return parseFSInfoFromConfigMap(configMap)
6868
}
6969

70+
// parseFSInfoFromConfigMap extracts file system configuration information
71+
// from the provided ConfigMap. It parses the data field of the ConfigMap
72+
// into a JuiceFS structure and populates the returned map with relevant
73+
// configuration details. If the parsing fails or the data field is missing,
74+
// an error is returned.
75+
//
76+
// Parameters:
77+
// - configMap: A pointer to a v1.ConfigMap object that contains the
78+
// configuration data.
79+
//
80+
// Returns:
81+
// - info: A map containing parsed configuration details such as MetaUrlSecret,
82+
// TokenSecret, AccessKeySecret, SecretKeySecret, FormatCmd, Name, and Edition.
83+
// - err: An error if the data parsing process fails or if the required data
84+
// field is missing.
7085
func parseFSInfoFromConfigMap(configMap *v1.ConfigMap) (info map[string]string, err error) {
7186
var value JuiceFS
7287
info = map[string]string{}

0 commit comments

Comments
 (0)