MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / instanceCertificates

Function instanceCertificates

internal/patroni/certificates.go:38–56  ·  view source on GitHub ↗

instanceCertificates returns projections of Patroni's CAs, keys, and certificates to include in the instance configuration volume.

(certificates *corev1.Secret)

Source from the content-addressed store, hash-verified

36// instanceCertificates returns projections of Patroni's CAs, keys, and
37// certificates to include in the instance configuration volume.
38func instanceCertificates(certificates *corev1.Secret) []corev1.VolumeProjection {
39 return []corev1.VolumeProjection{{
40 Secret: &corev1.SecretProjection{
41 LocalObjectReference: corev1.LocalObjectReference{
42 Name: certificates.Name,
43 },
44 Items: []corev1.KeyToPath{
45 {
46 Key: certAuthorityFileKey,
47 Path: certAuthorityConfigPath,
48 },
49 {
50 Key: certServerFileKey,
51 Path: certServerConfigPath,
52 },
53 },
54 },
55 }}
56}

Callers 2

TestInstanceCertificatesFunction · 0.85
InstancePodFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestInstanceCertificatesFunction · 0.68