Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROX-24553: Possibility to add additional VPA recommenders #1888

Merged
merged 33 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
63ea2e3
feat: allow deploying additional VPA recommenders
ludydoo Jun 13, 2024
ab4b5cc
fix recommender deployment runAsUser
ludydoo Jul 1, 2024
93c83fe
fix recommender deployment runAsUser
ludydoo Jul 1, 2024
b632b2b
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
51317ce
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
9f9ba14
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
d7155a8
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
cd86418
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
2a5b448
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
3af4966
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
9218672
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
7d4c101
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
505530c
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
20b375c
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
f2f1b3a
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
23a03a5
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
856f09f
don't update helm chart resources unnecessarily
ludydoo Jul 2, 2024
c66b012
fix openshift service-ca-bundle
ludydoo Jul 2, 2024
f5372e5
fix openshift service-ca-bundle
ludydoo Jul 2, 2024
8d198f1
add missing rbac permission
ludydoo Jul 2, 2024
83526b1
fix helm reconciliation
ludydoo Jul 4, 2024
f27494f
fix helm reconciliation
ludydoo Jul 4, 2024
31482a3
fix helm reconciliation
ludydoo Jul 4, 2024
81cb09d
fix helm reconciliation
ludydoo Jul 4, 2024
120ecee
fix helm reconciliation
ludydoo Jul 4, 2024
9fef2b2
fix helm reconciliation
ludydoo Jul 4, 2024
ee602ae
fix helm reconciliation
ludydoo Jul 4, 2024
0a5bb59
fix helm reconciliation
ludydoo Jul 4, 2024
ad3e30f
fix helm reconciliation
ludydoo Jul 4, 2024
83defde
fix helm reconciliation
ludydoo Jul 4, 2024
f723d2d
fix helm reconciliation
ludydoo Jul 4, 2024
826c4a6
fix helm reconciliation
ludydoo Jul 4, 2024
b794ea1
cleanup
ludydoo Jul 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
don't update helm chart resources unnecessarily
ludydoo committed Jul 2, 2024
commit b632b2be9331ee1ce60e74ff88a4ca8eff5302e2
12 changes: 12 additions & 0 deletions fleetshard/pkg/central/charts/generic.go
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ import (
"context"
"errors"
"fmt"
"reflect"

"github.com/golang/glog"
"helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/chartutil"
@@ -245,6 +247,16 @@ func reconcileGvk(ctx context.Context, params HelmReconcilerParams, gvk schema.G

wantObj.SetResourceVersion(existingObject.GetResourceVersion())

cloned := existingObject.DeepCopy()
if err := params.Client.Update(ctx, cloned, ctrlClient.DryRunAll); err != nil {
return fmt.Errorf("failed to dry-run update object %q of type %v: %w", objectName, gvk, err)
}

if reflect.DeepEqual(cloned.Object, wantObj.Object) {
glog.Infof("object %q of type %v is up-to-date", objectName, gvk)
continue
}

if err := params.Client.Update(ctx, wantObj); err != nil {
return fmt.Errorf("failed to update object %q of type %v: %w", objectName, gvk, err)
}