-
Notifications
You must be signed in to change notification settings - Fork 16
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
Rename provision_task
to janus_cli
, add create-datastore-key
command.
#314
Conversation
The testing is done via a new library used to spin up an ephemeral Kubernetes cluster using `kind`. It interacts with `kind` by shelling out; I'm not happy about this, but I can't find an equivalent library for Rust.
Unfortunately, kube doesn't work with rustls when talking to local clusters: kube-rs/kube#153 Thankfully, openssl is only a dependency if the test-utils feature is enabled, so our release builds will not depend on openssl. Unfortunately, that means that our release builds will be interacting with Kubernetes using a different TLS library than our tests use.
It's no longer necessary since the crate features are set up to (rightfully) not include openssl in release builds.
provision_task
to janus_cli
, add create-datastore-key
command.
(I suppose an obvious side-effect of this PR is that we'll now need to have |
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 fine, though I have a couple suggestions that can be punted to future enhancements. Last comment is that we should document the dependency on having kind
in $PATH
in a README.
Also, update a stale reference to "PPM" as the protocol name to "DAP".
Updated the README to note the new |
This will be used to provision a datastore key for new environments.
A few notes:
kubernetes::EphemeralCluster
type that turns up a cluster on creation & turns it back down once the value is dropped. This is implemented by shelling out tokind
; I'm not too happy about shelling out, but I can't find an equivalent Rust library, and I suppose it's somewhat more acceptable in test code.create-datastore-key
doesn't need a datastore to exist at all, yet it must receive datastore config information, including (bogus) datastore keys. If we want to clean this up, I would recommend dropping thejanus_main
abstraction, and moving the different things thatjanus_main
does into helper functions that each binary can call as-needed. I'm going to leave this for a later PR, however.