MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / getSecretKeyRefFileName

Function getSecretKeyRefFileName

pkg/management/external/utils.go:115–122  ·  view source on GitHub ↗

getSecretKeyRefFileName get the name of the file where the content of the connection secret will be dumped.

(
	serverName string,
	selector *corev1.SecretKeySelector,
)

Source from the content-addressed store, hash-verified

113// getSecretKeyRefFileName get the name of the file where the content of the
114// connection secret will be dumped.
115func getSecretKeyRefFileName(
116 serverName string,
117 selector *corev1.SecretKeySelector,
118) string {
119 directory := filepath.Join(getExternalSecretsPath(), serverName)
120 filePath := filepath.Join(directory, fmt.Sprintf("%v_%v", selector.Name, selector.Key))
121 return filePath
122}
123
124// dumpSecretKeyRefToFile dumps a certain secret to a file inside a temporary folder
125// using 0600 as permission bits.

Callers 2

dumpSecretKeyRefToFileFunction · 0.85

Calls 2

getExternalSecretsPathFunction · 0.85
JoinMethod · 0.80

Tested by

no test coverage detected