-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow optional namespaces value when calling kubectl apply. #1
Conversation
7e2d0dd
to
bdf3b1a
Compare
@brosenan are you accepting pr's ? just updated this to allow for kubeconfig param ass well as namespace. |
Sorry for the delay in my response. The build for this PR is failing. I think the root cause is out-of-date dependencies. I did a quick fix, setting the jdk version to openjdk9 to make head build again. Please rebase this PR and I'll accept it. |
Please add tests + documentation for the new parameters. LMK if you need any assistance. lambda-kube/test/lambdakube/core_test.clj Line 1309 in 7c0c509
|
965f731
to
7f8f775
Compare
@brosenan I had a little stab at adding a test and some text to the readme, need to look into the fact library at some point its layout is a bit foreign to me. |
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.
Please run ./create-docs.sh
to update the .md
files. They should be part of the PR.
Thanks,
Boaz.
test/lambdakube/core_test.clj
Outdated
@@ -1307,6 +1307,7 @@ spec: | |||
") | |||
|
|||
;; `kube-apply` takes a string constructed by `to-yaml` and a `.yaml` | |||
;; optionally supply namespace and kube config parameters. |
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.
This line seems to be out of place. It is in the middle of a sentence...
I would move it to just before line 1323, to describe the new test you created.
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.
okay made those changes.
7f8f775
to
880cd1a
Compare
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 Oliver, thanks for your effort, and thanks for baring with me.
I just realized you made manual changes to core.md
, and parallel changes to core_test.clj
.
I'm using an approach in which the documentation (.md
files) are directly derived from the tests (_test.clj
files). Comments are taken to be free text and Clojure code is taken as code fragments.
This process is done automatically using the ./create-docs.sh
script.
For this reason, the comments in core_test.clj
are supposed to document the implementation, not the test. The line you wrote:
optionally supply namespace and kube config parameters.
would make a great comment for the test you have added (instead of the documentation you added in core_test.clj
, which describes the test and not the feature you implemented.
Once you made the change, run ./create_docs.sh
to generate the docs. If you have trouble running it on your machine (e.g., you're using Windows and have no sh/awk), let me know and I'll merge the code and run the script for you.
Thanks again,
Boaz.
okay will change that when i get 2 secs, never seen docs generated from tests before, I had assumed incorrectly they where comment related to tests, does that ean you cant comment your tests ? |
880cd1a
to
6596cf7
Compare
6596cf7
to
42ee335
Compare
@brosenan okay modified, I may have run the create docs script before modifying the tests, I had not realized the md files was generated from the tests comments, thanks for guiding me I may have a few more pr's going forward so this is helpful :) |
If the test is not self explanatory, you can add comments inside the |
I had a stab at adding namespace support to kube ctl, Implemented in a way it should not effect existing functionality.
Still quite new to clojure so if I am doing anything glaringly bad let me know :)