-
Notifications
You must be signed in to change notification settings - Fork 50
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
🌱 Add kubefwd and local-dev target #1034
🌱 Add kubefwd and local-dev target #1034
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
c705472
to
60fbc20
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1034 +/- ##
==========================================
- Coverage 77.60% 77.00% -0.60%
==========================================
Files 18 19 +1
Lines 1268 1357 +89
==========================================
+ Hits 984 1045 +61
- Misses 202 222 +20
- Partials 82 90 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Awesome sauce, serves as a nice demo of using bingo for conditional deps too. |
Oh this is nice. Similar to |
Is the primary use case here to be able to hook up the debugger? Outside of that, it seems like our existing Tilt setup covers most of the local dev ground. My only 👎 is that this will be a second local-dev option. I know our Tilt configuration has a delve container, so maybe it is possible to hook that up with the IDE? |
Yeah, looks like we run all the OLM pods with a delve entrypoint and forward the delve port out to the local environment: https://github.com/operator-framework/tilt-support/blob/255e8f7a550634d40c4efc0c9844c278c67135a4/Tiltfile#L148 |
rm -rf "${CERT_DIR}" | ||
mkdir -p "${CERT_DIR}" | ||
function import_certs() { | ||
local secret_name=$1 | ||
data=$(kubectl get secret "${secret_name}" -n "${OLMV1_NAMESPACE}" -o jsonpath="{.data['tls\.crt']}") | ||
if [[ -n "${data}" ]]; then | ||
echo "${data}" | base64 --decode > "${CERT_DIR}/${secret_name}-tls.crt" | ||
fi | ||
} | ||
|
||
for secret in $(kubectl get secrets -n "${OLMV1_NAMESPACE}" -o jsonpath="{.items[*].metadata.name}"); do | ||
import_certs "${secret}" | ||
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.
What are you doing with this certificate?
In the latest incarnation, you should just be able to grab ca.crt
from the secret (if present) as the root for all certificates used between operator-controller and catalogd (at least the catalogd service). You shouldn't have to grab tls.crt
, which applies only to that certificate.
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 just copy the certificates to a folder and start operator-controller with --ca-certs-dir so that I can talk to the catalogd endpoint and debug directly from the IDE
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.
The ca can change, right? and if I have the tls cert it should work every time - even if the ca changes?
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.
A few comments.
New changes are detected. LGTM label has been removed. |
08e5df5
to
61ac5a0
Compare
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
61ac5a0
to
c5638f8
Compare
Pull request was closed
Description
Adds:
It's helpful to be able to run/debug operator-controller directly from the IDE. Tilt is pretty nifty, but too many moving parts for me. I just want to click debug on the IDE and be done.
This way you can start operator-controller with --ca-certs-dir=hack/certs and you should be able to talk to catalogd
Reviewer Checklist