Skip to content

Commit

Permalink
controller: use DefaultServiceAccount in differ
Browse files Browse the repository at this point in the history
This addresses an issue in which the defunct `DefaultServiceAccount`
from the `HelmReleaseReconciler` was being used to construct the
impersonator used by the differ.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
  • Loading branch information
hiddeco committed Sep 18, 2023
1 parent 6240012 commit 2465cb4
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions internal/controller/helmrelease_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,15 @@ type HelmReleaseReconciler struct {
client.Client
helper.Metrics

Config *rest.Config
Scheme *runtime.Scheme
EventRecorder kuberecorder.EventRecorder
DefaultServiceAccount string
NoCrossNamespaceRef bool
ClientOpts runtimeClient.Options
KubeConfigOpts runtimeClient.KubeConfigOptions
StatusPoller *polling.StatusPoller
PollingOpts polling.Options
ControllerName string
Config *rest.Config
Scheme *runtime.Scheme
EventRecorder kuberecorder.EventRecorder
NoCrossNamespaceRef bool
ClientOpts runtimeClient.Options
KubeConfigOpts runtimeClient.KubeConfigOptions
StatusPoller *polling.StatusPoller
PollingOpts polling.Options
ControllerName string

httpClient *retryablehttp.Client
requeueDependency time.Duration
Expand Down Expand Up @@ -325,7 +324,7 @@ func (r *HelmReleaseReconciler) reconcileRelease(ctx context.Context,
r.PollingOpts,
hr.Spec.KubeConfig,
r.KubeConfigOpts,
r.DefaultServiceAccount,
kube.DefaultServiceAccountName,
hr.Spec.ServiceAccountName,
hr.GetNamespace(),
), r.ControllerName)
Expand Down

0 comments on commit 2465cb4

Please sign in to comment.