-
Notifications
You must be signed in to change notification settings - Fork 76
Allow running outside a cluster #305
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
Conversation
050b0f9
to
4a4f560
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #305 +/- ##
==========================================
- Coverage 20.37% 20.11% -0.27%
==========================================
Files 30 30
Lines 1374 1397 +23
==========================================
+ Hits 280 281 +1
- Misses 1092 1114 +22
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Hi, thanks for those contributions! Really nice stuff
LGTM ✅
Not sure on the impact as I've been a bit taken by work these last months, @mavimo wdyt? |
4a4f560
to
21d8c07
Compare
It looks like I was mistaken. Go 1.24 was backported to NixOS 24.11 a couple of weeks ago. So at least for NixOS, the toolchain version doesn't matter as much anymore. I can open a backport PR there if necessary in the future. I rebased this PR to resolve the merge conflict; no other changes. |
These are some changes I made to run the controller outside of the cluster:
KUBECONFIG
if set. Ideally, we'd also support-kubeconfig
, because the messages logged byBuildConfigFromFlags
allude to this.-config-map foo/bar
). If set, Secrets will then also be generated in this namespace, rather than the pod namespace.POD_{NAMESPACE,NAME}
vars optional and warn if not set. If not set,-config-map
must be provided with an explicit namespace, and Ingress status will not list external IPs.$RUNTIME_DIRECTORY/certs
over/etc/caddy/certs
, if the env var is set. This is a variable set by systemd when settingRuntimeDirectory
in the service configuration.Though I wonder if we should not just use something like
/tmp/caddy-certs
in all cases here? This works in the container, and is secure in systemd withPrivateTmp
.P.S.: Changes like #301 make building with distribution toolchains a bit more difficult. For example, NixOS 24.11 packages Go 1.23. This doesn't matter for standard deployments, where binaries/images are provided, of course. But if these changes sound useful, maybe we can also relax toolchain version?