Skip to content

Commit

Permalink
post-bump fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Apr 17, 2024
1 parent c2d1967 commit a7a6cc5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/operator/etcdcertsigner/etcdcertsignercontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ func (c *EtcdCertSignerController) syncAllMasterCertificates(ctx context.Context
}

// EnsureConfigMapCABundle is stateful w.r.t to the configmap it manages, so we can simply add it to the bundle before the new one
_, err = c.certConfig.signerCaBundle.EnsureConfigMapCABundle(ctx, signerCaPair)
signerName := fmt.Sprintf("%s/%s", operatorclient.GlobalUserSpecifiedConfigNamespace, tlshelpers.EtcdSignerCertSecretName)
_, err = c.certConfig.signerCaBundle.EnsureConfigMapCABundle(ctx, signerCaPair, signerName)
if err != nil {
return fmt.Errorf("error on ensuring signer bundle for existing pair: %w", err)
}
Expand All @@ -205,7 +206,7 @@ func (c *EtcdCertSignerController) syncAllMasterCertificates(ctx context.Context
return fmt.Errorf("error on ensuring etcd-signer cert: %w", err)
}

signerBundle, err := c.certConfig.signerCaBundle.EnsureConfigMapCABundle(ctx, newSignerCaPair)
signerBundle, err := c.certConfig.signerCaBundle.EnsureConfigMapCABundle(ctx, newSignerCaPair, signerName)
if err != nil {
return fmt.Errorf("error on ensuring signer bundle for new pair: %w", err)
}
Expand All @@ -215,12 +216,13 @@ func (c *EtcdCertSignerController) syncAllMasterCertificates(ctx context.Context
return fmt.Errorf("error on ensuring etcd client cert: %w", err)
}

metricsSignerSecretName := fmt.Sprintf("%s/%s", operatorclient.GlobalUserSpecifiedConfigNamespace, tlshelpers.EtcdMetricsSignerCertSecretName)
metricsSignerCaPair, err := tlshelpers.ReadConfigMetricsSignerCert(ctx, c.secretClient)
if err != nil {
return err
}

_, err = c.certConfig.metricsSignerCaBundle.EnsureConfigMapCABundle(ctx, metricsSignerCaPair)
_, err = c.certConfig.metricsSignerCaBundle.EnsureConfigMapCABundle(ctx, metricsSignerCaPair, metricsSignerSecretName)
if err != nil {
return fmt.Errorf("error on ensuring metrics signer bundle for existing pair: %w", err)
}
Expand All @@ -231,7 +233,7 @@ func (c *EtcdCertSignerController) syncAllMasterCertificates(ctx context.Context
return fmt.Errorf("error on ensuring metrics-signer cert: %w", err)
}

metricsSignerBundle, err := c.certConfig.metricsSignerCaBundle.EnsureConfigMapCABundle(ctx, newMetricsSignerCaPair)
metricsSignerBundle, err := c.certConfig.metricsSignerCaBundle.EnsureConfigMapCABundle(ctx, newMetricsSignerCaPair, metricsSignerSecretName)
if err != nil {
return fmt.Errorf("error on ensuring metrics signer bundle: %w", err)
}
Expand Down

0 comments on commit a7a6cc5

Please sign in to comment.