-
Notifications
You must be signed in to change notification settings - Fork 137
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 Controller #563
Conversation
Codecov Report
@@ Coverage Diff @@
## main #563 +/- ##
==========================================
+ Coverage 36.01% 38.56% +2.54%
==========================================
Files 44 54 +10
Lines 3207 3563 +356
==========================================
+ Hits 1155 1374 +219
- Misses 1959 2092 +133
- Partials 93 97 +4
Continue to review full report at Codecov.
|
3414844
to
a247c66
Compare
This is really great. I'm very excited about this, thank you! |
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 only just skimmed the layout so far and the autogenerated file question popped up and I wanted to ask that before diving deeper here.
a247c66
to
b29b9ea
Compare
Thank you! I did want to hold on docs initially, since there is nothing to write about other than "there is a controller you can run that nothing else interacts with yet." I'll add docs in the next PR, that includes changes to the Tink API. |
39cc132
to
56d3436
Compare
I call BS on CodeCov saying we're 2% lower in coverage. I know there are specific tests and cases I added that cover files CC is showing as uncovered. |
463d8ab
to
d05b1d0
Compare
codecov is hard to understand some (most?) times. Don't sweat it too much imo. |
82e0761
to
f9e14c5
Compare
Signed-off-by: Micah Hausler <[email protected]> ## Description Extracted repo config changes from #563 ## Why is this needed * Go version is out of date in `ci.yaml` * `.mk` files were missing from editor config * Coverage was counted against for generated files Fixes: # N/A ## How Has This Been Tested? Ran verify/tests locally ## How are existing users impacted? What migration steps/scripts do we need? N/A ## Checklist: I have: - [x] updated the documentation and/or roadmap (if required) - [x] added unit or e2e tests - [x] provided instructions on how to upgrade
f9e14c5
to
ab6c6d5
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.
here's what I've seen so far. Next up is reviewing the tests. About the import blocks, you can automatically fix everthing with:
sed -i '/^import (/,/^)/ { /^\s*$/ d }' $(git ls-files '*.go') && gofumpt -w -s .
I've been meaning to add this to ci-checks.sh but I thought gofumpt
did that itself :(
ab6c6d5
to
87164b5
Compare
8b1a799
to
e905947
Compare
2b9de9d
to
cc44110
Compare
6dac4a5
to
73ca7c7
Compare
@mmlb I removed go from the Nix install, it was using a different version than what GH Actions uses and caused CI failures |
73ca7c7
to
2464bee
Compare
@mmlb anything else you'd like to see here? |
aahhg, sorry for dropping the ball on this. I think I was pretty happy with everything except for dropping go from shell.nix. I'll look again on Tuesday though if thats ok? If its just the go in shell.nix thing then we can merge and I'll sync up with you on why you needed to drop it so we can add it back in. Is that alright? |
This is due to newer point releases of Go in the GH actions than nix has available. We set the Go version in GH actions to
SGTM!
SGTM! |
2464bee
to
fa8e816
Compare
@displague @mmlb I rebased on upstream main so it dismissed previous reviews |
WorkerId: task.WorkerAddr, | ||
Volumes: append(task.Volumes, action.Volumes...), | ||
// TODO: (micahhausler) Dedupe task volume targets overridden in the action volumes? | ||
// Also not sure how Docker handles nested mounts (ex: "/foo:/foo" and "/bar:/foo/bar") |
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.
fyi:
[manny@zennix:~/t/debug]$ tree
.
├── bar
│ └── from-bar
└── foo
└── from-foo
2 directories, 2 files
[manny@zennix:~/t/debug]$ docker run --rm -ti -v $PWD/foo:/foo -v $PWD/bar:/foo/bar alpine
/ # echo ==foo==; ls -l /foo/; echo ==bar==; ls -l /foo/bar;
==foo==
total 33
drwxr-xr-x 2 1000 users 3 Jan 18 20:23 bar
-rw-r--r-- 1 1000 users 0 Jan 18 20:23 from-foo
==bar==
total 1
-rw-r--r-- 1 1000 users 0 Jan 18 20:23 from-bar
/ #
[manny@zennix:~/t/debug]$ tree
.
├── bar
│ └── from-bar
└── foo
├── bar
└── from-foo
3 directories, 2 files
note how foo/bar
directory now exists
Looks like mergify is getting stuck on |
* Add new cmd/tink-controller package * Remove the `status.data` field on Workflows * Add tests for methods on API types * Add `pkg/controllers` package with controller logic * Controllers for individual types (workflows, templates, hardware) will reside in individual sub-packages * Add `pkg/convert` for type conversions * Add `pkg/internal/tests` for testing utilities * Added FrozenTime with Kubernetes and Protobuf methods Signed-off-by: Micah Hausler <[email protected]>
🎉 |
## Description This PR adds a Kubernetes API backend to Tinkerell as a replacement for Postgres. This PR builds on #563 and adds new API capabilities ## Why is this needed ## How Has This Been Tested? ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
Signed-off-by: Micah Hausler [email protected]
Description
This PR adds a new Kubernetes controller binary for the types merged in #542.
cmd/tink-controller
package with a Dockerfile and amain.go
status.data
field on Workflows. This was just a string of the interpolated template, and was redundant given the strongly typed template actions already on the.status
of Workflows.pkg/controllers
package. This introduces aManager
abstraction that wrapssigs.k8s.io/controller-runtime
'sReconciler
typepkg/conversion
package for converting protobuf types to Kubernetes CRD types and vice versapkg/internal/tests
package with internal testing utilities.FrozenTime
interface with Before/After connivence methods fortime.Time
, as well as protobuf and K8s metav1 package time formats.How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
There is no impact to existing users. Nothing form this change is called in any existing code path.
Checklist:
I have:
updated the documentation and/or roadmap (if required)provided instructions on how to upgrade