-
Notifications
You must be signed in to change notification settings - Fork 26
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
KIND: Fix output path for api conversation generation + Fix webhook ca bundle injection for flow-collector CRD #284
Conversation
Fix the logic to detect if the cloned repo is in the GOPATH by removing a the hardcoded path `$(GOPATH)/src/network-observability-operator` and instead just check if the $(ROOT_DIR) is in the $(GOPATH) or not with string comparisons. Also update the conversions with the new controller-gen version. Signed-off-by: Andrew Stoycos <[email protected]>
14938cd
to
00fcdc8
Compare
/assign @msherif1234 This should be good to go now! |
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.
overall looks good thanks for fixing KinD env, just left a couple of nits
@@ -21,3 +21,11 @@ spec: | |||
secret: | |||
defaultMode: 420 | |||
secretName: webhook-server-cert | |||
--- | |||
# The following patch adds a directive for certmanager to inject CA into the CRD |
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.
isn't better/cleaner to have this in its own patch file and let kustomization
patch 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.
Sure, it's just a preference thing I can do that if you'd like, I wish I could just point to ../crd/patches/cainjection_in_flowcollectors.yaml
but it won't let me point to that file from the kubernetes/
directory
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 wanted to keep the original sdk yamls as close as the original auto generated ones so any future interactions with sdk-operator will be smooth
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 can do that later if needed
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.
All good I can do it now
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.
Done
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!
/lgtm
also there is no longer version updates so pls adjust the title and PR description just indicating for kind we need to have cert-mage CA or something similar |
Signed-off-by: Andrew Stoycos <[email protected]>
tested and lgtm, thanks @astoycos ! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jotak The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR fixes two bugs:
There are still some webhook issues when running on KIND... specifically I spin things up with
IMG="quay.io/bpfd/network-observability-operator:test" make image-build image-push
make local-deploy
IMG="quay.io/bpfd/network-observability-operator:test" make deploy-kind
make deploy-sample-cr
I run into
operator Logs:
This PR fixes the aforementioned bug by ensuring we inject the webhook ca-bundle into the flow-collector CRD definition.
The makefile logic to detect weather or not the cloned code is in gopath is flawed....specifically
Assumes that you specifically cloned the code to
$GOPATH/src/network-observability-operator
which probably isn’t the case for everyonefor example on my setup the repo lives at
/home/astoycos/go/src/github.com/netobserv/network-observability-operator
so although it’s in my GOPATH we still set --output-base here when we don’t need to. Ultimately I was seeingzz_generated.conversion.go
get put in the wrong spot because of thisThe fix just makes sure that the $GOPATH is in wherever the code lives (i.e $ROOT_DIR)