Skip to content

Commit 63ddc0c

Browse files
committed
fixup! fixup! Propagete agent cert hash
1 parent 7fa8c98 commit 63ddc0c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

controllers/operator/common_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ func (r *ReconcileCommonController) readAgentSubjectsFromSecret(ctx context.Cont
598598
}
599599

600600
func (r *ReconcileCommonController) clearProjectAuthenticationSettings(ctx context.Context, conn om.Connection, mdb *mdbv1.MongoDB, processNames []string, log *zap.SugaredLogger) error {
601-
agentCertSecretName := mdb.Spec.Security.AgentClientCertificateSecretName(mdb.Name)
601+
agentCertSecretName := mdb.Spec.GetSecurity().AgentClientCertificateSecretName(mdb.Name)
602602

603603
agentSecret := &corev1.Secret{}
604604
if err := r.client.Get(ctx, kube.ObjectKey(mdb.Namespace, agentCertSecretName), agentSecret); client.IgnoreNotFound(err) != nil {

docker/mongodb-kubernetes-tests/tests/users/users_addition_removal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def test_mdb_resource_running(self, mdb: MongoDB):
5656
def test_certificates_have_sane_subject(self, namespace):
5757
agent_certs = KubernetesTester.read_secret(namespace, "agent-certs-pem")
5858

59-
bytecert = bytes(agent_certs["mms-automation-agent-pem"], "utf-8")
59+
latestHash = agent_certs["latestHash"]
60+
bytecert = bytes(agent_certs[latestHash], "utf-8")
6061
cert = x509.load_pem_x509_certificate(bytecert, default_backend())
6162
names = get_names_from_certificate_attributes(cert)
6263

0 commit comments

Comments
 (0)