Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
machine424 committed Apr 25, 2024
1 parent 91a3821 commit 89dbf2b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pkg/tasks/metricsserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ func (t *MetricsServerTask) Run(ctx context.Context) error {
}

func (t *MetricsServerTask) create(ctx context.Context) error {

// NEEDED: just a TEST to see if the "right" fix has any issues.
cr, err := t.factory.PrometheusK8sClusterRole()
if err != nil {
return fmt.Errorf("initializing Prometheus ClusterRole failed: %w", err)
}

err = t.client.CreateOrUpdateClusterRole(ctx, cr)
if err != nil {
return fmt.Errorf("reconciling Prometheus ClusterRole failed: %w", err)
}

crb, err := t.factory.PrometheusK8sClusterRoleBinding()
if err != nil {
return fmt.Errorf("initializing Prometheus ClusterRoleBinding failed: %w", err)
}

err = t.client.CreateOrUpdateClusterRoleBinding(ctx, crb)
if err != nil {
return fmt.Errorf("reconciling Prometheus ClusterRoleBinding failed: %w", err)
}

{
sa, err := t.factory.MetricsServerServiceAccount()
if err != nil {
Expand Down

0 comments on commit 89dbf2b

Please sign in to comment.