-
Notifications
You must be signed in to change notification settings - Fork 49
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
Vendor gardener 1.57.1
and upgrade ginkgo to v2
#450
Vendor gardener 1.57.1
and upgrade ginkgo to v2
#450
Conversation
1.57.0
and upgrade ginkgo to v2
1.57.1
and upgrade ginkgo to v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @AleksandarSavchev!
A few questions/comments
config/rbac/role.yaml
Outdated
resources: | ||
- pods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These permissions are required when deploying druid through kustomize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These permissions were also removed by running make manifests
. I am not sure which change caused it. Will have to look into it.
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the status
field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field was removed by make manifests
due to this PR in controller-tools v0.9.0
pkg/mapper/statefulset_to_etcd.go
Outdated
@@ -34,7 +35,7 @@ type statefulSetToEtcdMapper struct { | |||
cl client.Client | |||
} | |||
|
|||
func (m *statefulSetToEtcdMapper) Map(obj client.Object) []reconcile.Request { | |||
func (m *statefulSetToEtcdMapper) Map(ctx context.Context, log logr.Logger, reader client.Reader, obj client.Object) []reconcile.Request { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These newly added parameters are unused in this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added these parameters since they are needed for the new Mapper interface in order not to change the StatefulSetToEtcd() function. The Mapper interface was changed in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, however a second opinion would be great before I merge this PR
/second-opinion @ishan16696 @abdasgupta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I just have a few minor comments.
Makefile
Outdated
@@ -66,11 +63,12 @@ deploy: manifests | |||
kustomize build config/default | kubectl apply -f - | |||
|
|||
# Generate manifests e.g. CRD, RBAC etc. | |||
# TODO(AleksandarSavchev): config/rbac/role.yaml has had manual changes that were ruiden by the last command of make manifests. make manifests need a fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# TODO(AleksandarSavchev): config/rbac/role.yaml has had manual changes that were ruiden by the last command of make manifests. make manifests need a fix. | |
# TODO(AleksandarSavchev): config/rbac/role.yaml gets incorrectly overwritten by this make target. Thus the generation of the role is skipped for now until a proper generation and generation check is implemented. |
Also could you move this comment right above line 71.
Makefile
Outdated
.PHONY: manifests | ||
manifests: $(CONTROLLER_GEN) | ||
@go generate ./config/crd/bases | ||
@find "$(REPO_ROOT)/config/crd/bases" -name "*.yaml" -exec cp '{}' "$(REPO_ROOT)/charts/druid/charts/crds/templates/" \; | ||
@controller-gen rbac:roleName=manager-role paths="./controllers/..." | ||
# @controller-gen rbac:roleName=manager-role paths="./controllers/..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to skip the entire generation here? @aaronfern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be okay
This role.yaml file generated is used only when deploying druid using kustomize and not in any other case. So should be okay from my pov
controllers/etcd_controller.go
Outdated
@@ -454,7 +453,8 @@ func (r *EtcdReconciler) getPodDisruptionBudgetFromEtcd(etcd *druidv1alpha1.Etcd | |||
decoded := &policyv1beta1.PodDisruptionBudget{} | |||
pdbPath := getChartPathForPodDisruptionBudget() | |||
chartPath := getChartPath() | |||
renderedChart, err := r.chartApplier.Render(chartPath, etcd.Name, etcd.Namespace, values) | |||
// TODO(AleksandarSavchev): .Render is deprecated. Refactor or adapt code to use RenderEmbeddedFS https://github.com/gardener/gardener/pull/6165 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also open an issue for this on gardener/etcd-druid
so that we don't forget it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controllers/etcd_controller.go
Outdated
etcd.Status.Ready = nil | ||
etcd.Status.ReadyReplicas = 0 | ||
|
||
err := r.Client.Status().Update(ctx, etcd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err := r.Client.Status().Update(ctx, etcd) | |
return etcd, r.Client.Status().Update(ctx, etcd) |
|
||
return c.Watch( | ||
&source.Kind{Type: &appsv1.StatefulSet{}}, | ||
mapper.EnqueueRequestsFrom(druidmapper.StatefulSetToEtcd(ctx, mgr.GetClient()), mapper.UpdateWithNew, mgr.GetLogger()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapper.EnqueueRequestsFrom(druidmapper.StatefulSetToEtcd(ctx, mgr.GetClient()), mapper.UpdateWithNew, mgr.GetLogger()), | |
mapper.EnqueueRequestsFrom(druidmapper.StatefulSetToEtcd(ctx, mgr.GetClient()), mapper.UpdateWithNew, c.GetLogger()), |
Hi @AleksandarSavchev |
c3d378d
to
dd4b0a2
Compare
Hi @AleksandarSavchev, I hope that is ok with you. Apologies for the delay. I was supposed to leave a comment in this issue earlier but was unable to do it. If you have any concerns then please respond here and we can discuss further. Best Regards, |
e77cecf
to
3fde038
Compare
* Vendor gardener 1.57.1 * Upgrade ginkgo to v2 * linter fixes and added/removed TODOs * Added github username to TODOs * Added review suggestions * Made fixes to PR * Rebase master * squash * remove changes to make manifests
* Vendor gardener 1.57.1 * Upgrade ginkgo to v2 * linter fixes and added/removed TODOs * Added github username to TODOs * Added review suggestions * Made fixes to PR * Rebase master * squash * remove changes to make manifests
* Vendor gardener 1.57.1 * Upgrade ginkgo to v2 * linter fixes and added/removed TODOs * Added github username to TODOs * Added review suggestions * Made fixes to PR * Rebase master * squash * remove changes to make manifests Co-authored-by: Aleksandar Savchev <[email protected]>
How to categorize this PR?
/area open-source
/kind enhancement
What this PR does / why we need it:
Vendor gardener
v1.57.1
This PR also upgrades
ginkgo
tov2
and removes unnecessary replace directives fromgo.mod
file.Which issue(s) this PR fixes:
Fixes #447
Special notes for your reviewer:
The
ginkgo
upgrade was needed because newer versions of g/g are usingv2
and it was causing problems in some of the env testsRelease note: