-
Notifications
You must be signed in to change notification settings - Fork 4
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 Kubernetes CRD client and schemas #33
Conversation
Dataset requires some more work. |
816929a
to
217a698
Compare
annotations: Optional[dict[str, str]] = None | ||
|
||
|
||
class Image(BaseModel): |
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.
Not that it matters, but Image is only used with TestRunSepc making it not very commonly used between Kubernetes resources.
a7a7d62
to
89bf475
Compare
|
||
|
||
class EnvironmentSpec(BaseModel): | ||
"""EnvironmentSpec is the specification of a Environment Kubernetes resource.""" |
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.
nit: a -> an
Also moved the NotFound check to the 'exists' method.
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.
LGTM
Applicable Issues
eiffel-community/etos#242
Description of the Change
Added schemas and helper methods for interacting with ETOS kubernetes resources.
Alternate Designs
I had these helpers in each service before, but that cause so much friction any time the packages changed as I needed to update every single one and make the correct change. While we still have to update every service when the library updates, at least we don't have to make the same code change multiple times.
Possible Drawbacks
Explained briefly in Alternate Designs.
Sign-off
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Tobias Persson [email protected]