-
Notifications
You must be signed in to change notification settings - Fork 41
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
Update kubebuilder V4 #234
Conversation
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.
Did you manually verify things worked with this change? In particular, I believe this change as currently written will break the updating of the status subresource on the CRs...
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2021 SPIRE Authors. |
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.
We should probably keep the same copyright on these files. We can use 2023 for new ones.
Makefile
Outdated
@@ -121,10 +127,11 @@ lint-code: $(golangci_lint_bin) | |||
|
|||
##@ Build | |||
|
|||
# TODO: VERIFY BUILD KEEP WORKING WIHT NEW MAIN!!!!!!!!!!!!!!! |
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.
Did the build keep working 😄 ?
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.
hahah forgot to remove the reminders haha
cmd/main.go
Outdated
@@ -93,6 +92,21 @@ func parseConfig() (spirev1alpha1.ControllerManagerConfig, ctrl.Options, []*rege | |||
"Command-line flags override configuration from this file.") | |||
flag.StringVar(&spireAPISocketFlag, "spire-api-socket", "", "The path to the SPIRE API socket (deprecated; use the config file)") | |||
|
|||
// TODO: may we get metric, probeAdrr and leader? |
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.
Has this commented code been addressed elsewhere? the features provided by these configurables are still necessary, especially leader election....
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.
we allow to set those values from Config file, so I think we can remove those comments,
what do you think?
if err = (&spirev1alpha1.ClusterFederatedTrustDomain{}).SetupWebhookWithManager(mgr); err != nil { | ||
setupLog.Error(err, "unable to create webhook", "webhook", "ClusterFederatedTrustDomain") | ||
return err | ||
if os.Getenv("ENABLE_WEBHOOKS") != "false" { |
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.
@kfox1111, you might be interested in this. Looks like a new kubebuilder convention?
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.
Hadn't seen that. Interesting. Thanks for the heads up.
@@ -88,9 +87,3 @@ spec: | |||
storage: true | |||
subresources: | |||
status: {} | |||
status: |
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 believe we still need these. For some reason kubebuilder isn't generating them but without them the status subresource does not update. See #223.
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.
code generator is no longer creating that status,
but when I run demo without status I got no error, and status is generated:
./cluster1 kubectl describe clusterspiffeid ✔ 16:52:03
Name: greeter-server
Namespace:
Labels: <none>
Annotations: <none>
API Version: spire.spiffe.io/v1alpha1
Kind: ClusterSPIFFEID
Metadata:
Creation Timestamp: 2023-10-27T19:48:38Z
Generation: 1
Resource Version: 725
UID: 7043c2fa-90e8-40d8-aa0d-8bd15b0e91eb
Spec:
Federates With:
cluster2.demo
Pod Selector:
Match Labels:
spire.spiffe.io/spiffeid: greeter-server
Spiffe ID Template: spiffe://cluster1.demo/greeter-server
Status:
Stats:
Entries Masked: 0
Entries To Set: 1
Entry Failures: 0
Namespaces Ignored: 4
Namespaces Selected: 6
Pod Entry Render Failures: 0
Pods Selected: 1
not sure, may we add just in case?
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 see. Was this on a clean cluster? I can check this myself to confirm. Maybe it depends on the version of k8s?
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.
it was in the test cluster, (demo one), but I remember getting the erorr you mentioned in aws... like 3 months ago..
so I think it is safe to keep adding this for now
demo/test.sh
Outdated
@@ -37,7 +37,7 @@ cleanup() { | |||
echo "Done." | |||
} | |||
|
|||
trap cleanup EXIT | |||
# trap cleanup EXIT |
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.
Was this commented out for testing?
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.
yeap
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
8f88e3d
to
08c294c
Compare
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
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.
Just some nits on the copyright year changes, other than that LGTM.
cmd/main.go
Outdated
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2021 SPIRE Authors. | |||
Copyright 2023 SPIRE Authors. |
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.
can we revert the copyright year change?
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2021 SPIRE Authors. |
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.
Same here. Should revert this change.
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2021 SPIRE Authors. | |||
Copyright 2023 SPIRE Authors. |
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.
Same here. Should revert this change.
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2021 SPIRE Authors. | |||
Copyright 2023 SPIRE Authors. |
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.
Same here. Should revert this change.
internal/controller/common.go
Outdated
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2021 SPIRE Authors. | |||
Copyright 2023 SPIRE Authors. |
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.
Same here. Should revert this change.
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2021 SPIRE Authors. | |||
Copyright 2023 SPIRE Authors. |
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.
Same here. Should revert this change.
internal/controller/suite_test.go
Outdated
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2021 SPIRE Authors. | |||
Copyright 2023 SPIRE Authors. |
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.
Same here. Should revert this change.
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
No description provided.