Skip to content

Commit 080a856

Browse files
Merge pull request #2524 from simonpasquier/OCPBUGS-35726
OCPBUGS-35726: remove certificate hash annotation for monitoring-plugin
2 parents 4d9bb6a + 4f2367a commit 080a856

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

pkg/manifests/manifests.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,7 +2804,7 @@ func (f *Factory) MonitoringPlugin() (*consolev1.ConsolePlugin, error) {
28042804
return f.NewConsolePlugin(f.assets.MustNewAssetSlice(MonitoringPlugin))
28052805
}
28062806

2807-
func (f *Factory) MonitoringPluginDeployment(tlsSecret *v1.Secret) (*appsv1.Deployment, error) {
2807+
func (f *Factory) MonitoringPluginDeployment() (*appsv1.Deployment, error) {
28082808
d, err := f.NewDeployment(f.assets.MustNewAssetSlice(MonitoringPluginDeployment))
28092809
if err != nil {
28102810
return nil, err
@@ -2823,11 +2823,6 @@ func (f *Factory) MonitoringPluginDeployment(tlsSecret *v1.Secret) (*appsv1.Depl
28232823

28242824
containers[idx].Image = f.config.Images.MonitoringPlugin
28252825

2826-
// Hash the TLS secret and propagate it as an annotation to the
2827-
// deployment's pods to trigger a new rollout when the TLS certificate/key
2828-
// are rotated.
2829-
d.Spec.Template.Annotations["monitoring.openshift.io/cert-hash"] = hashByteMap(tlsSecret.Data)
2830-
28312826
cfg := f.config.ClusterMonitoringConfiguration.MonitoringPluginConfig
28322827
if cfg == nil {
28332828
return d, nil

pkg/tasks/monitoring_plugin.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020

2121
v1 "k8s.io/api/core/v1"
2222
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
23-
"k8s.io/apimachinery/pkg/types"
2423
"k8s.io/klog/v2"
2524

2625
"github.com/openshift/cluster-monitoring-operator/pkg/client"
@@ -108,18 +107,7 @@ func (t *MonitoringPluginTask) Run(ctx context.Context) error {
108107
return fmt.Errorf("reconciling Console Plugin Service failed: %w", err)
109108
}
110109

111-
secret, err := t.client.WaitForSecretByNsName(
112-
ctx,
113-
types.NamespacedName{
114-
Namespace: svc.Namespace,
115-
Name: svc.Annotations["service.beta.openshift.io/serving-cert-secret-name"],
116-
},
117-
)
118-
if err != nil {
119-
return err
120-
}
121-
122-
d, err := t.factory.MonitoringPluginDeployment(secret)
110+
d, err := t.factory.MonitoringPluginDeployment()
123111
if err != nil {
124112
return fmt.Errorf("initializing Console Plugin Deployment failed: %w", err)
125113
}

0 commit comments

Comments
 (0)