-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Support Argo Rollout workloads #3651
Conversation
b82c73e
to
1294b2c
Compare
1294b2c
to
b7695b2
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.
This looks good to me. I like the fact that the informers are started conditionally, but perhaps we should also give the user the ability to control this using a Helm chart value? That way, no additional RBAC permissions are needed unless you want to use this feature (many users are sensitive to such additions). It would also make it possible for users of argo-rollouts to explicitly disable this new feature of Telepresence.
Using a Helm chart value would also remove the different behavior depending on CRD's that you mention.
f8761de
to
5f9942d
Compare
charts/telepresence/README.md
Outdated
@@ -101,6 +101,7 @@ The following tables lists the configurable parameters of the Telepresence chart | |||
| client.routing.allowConflictingSubnets | Allow the specified subnets to be routed even if they conflict with other routes on the local machine. | `[]` | | |||
| client.dns.excludeSuffixes | Suffixes for which the client DNS resolver will always fail (or fallback in case of the overriding resolver) | `[".com", ".io", ".net", ".org", ".ru"]` | | |||
| client.dns.includeSuffixes | Suffixes for which the client DNS resolver will always attempt to do a lookup. Includes have higher priority than excludes. | `[]` | | |||
| argoRollouts.enabled | Enable/Disable the argo-rollouts integration. | `false` | |
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.
Just a thought: I can imagine a future where multiple Deployment
alternatives are supported. Might be worth nesting this as alternateWorkloads.argoRollouts.enabled
.
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 like this idea, but I don't think it should be "alternative". It should be just "workloads". Let me explain why.
Each workload used today adds overhead. Both to the client- and cluster-side of Telepresence. If we add an element that defaults to:
workloads:
deployments:
enabled: true
replicaSets:
enabled true
statefulSets:
enabled true
argoRollouts:
enabled false
Then a user that just wants deployments
to be considered a workload could control this and get rid of the current overhead for replicaSets and statefulSets. This will require some more work on our shared-indexer logic and client code, and the complete implementation of what I'm suggesting here is beyond the scope of this PR, but adding the workloads
top level element could be done now as a preparation.
Thoughts?
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'm not familiar enough with the codebase to comment on the implementation side, but from a user perspective that sounds great. (especially the "beyond the scope of this PR" bit so I can get Rollout support sooner 😛)
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.
Just some minor nits, and perhaps add the top level workloads
element for the Helm value.
e75515c
to
8df2cad
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.
Approving this, but I'd still like to see a workloads
top-level element for the Helm value.
@P0lip FYI a rebase from the latest release/v2 will get rid of the errors involving the "thhal" docker repository. |
Sounds good, I like that change and will add it. |
8df2cad
to
c2e1e36
Compare
It looks like this GH action step is not executed causing the integration test to fail |
Oh, that's because the CI is triggered using What you can do, is create another branch from this PR's branch, and push an intentionally empty commit. Then create a new PR that targets this PR. It's CI will then use the |
af242c0
to
1bec08c
Compare
c2e1e36
to
507c2eb
Compare
@thallgren I created a small branch containing the GH actions changes and made this one point at it. We can then just change the target branch on this PR back to v2 and merge it. |
Signed-off-by: Jakub Rożek <[email protected]>
1bec08c
to
76d8be1
Compare
Signed-off-by: Jakub Rożek <[email protected]>
Signed-off-by: Jakub Rożek <[email protected]>
Signed-off-by: Jakub Rożek <[email protected]>
507c2eb
to
f06ce66
Compare
@thallgren I fixed the issue with PATH on Windows and as such this PR can be merged. |
Closes #2406 #3640
Description
I'm a bit on the edge with having a separate path for rollouts when relevant crds are not available. We'll always have that scenario in some way, but could approach it differently.
I went with a simple resource check that we do once upon the start, but the alternative path I was considering (and I still am, to be frank) is to simply handle the errors gracefully and that should be sufficient in most cases.
I'm also torn when it comes to those CRDs overall Since we have a different behavior depending on the availability of the aforementioned CRDs as they are cluster-wide, we isolating the proper test isolation is trickier when we re-use the same cluster.
Argo Rollouts controller is installed "globally" under
argo-rollouts
namespace. It could be potentially installed per namespace, but that shouldn't generally matter in our case.I added
Test_SuccessfullyInterceptsArgoRollout
toWorkloadsSuite
in integration_test/workloads_test.go which should test things pretty thoroughly for this case, but if you think I should add specific tests for workload watcher or agent injection, LMK.This PR needs datawire/k8sapi#21. I tried to combine
k8sFactory
and the argo addition in some way, to have a single function one calls, but there's more there.integration_test/testdata/k8s/argorollout.goyaml
is unused, I know. I'll either drop it or use it in some testsChecklist
./CHANGELOG.yml
.CONTRIBUTING.md
with any special dev tricks I had to use to work on this code efficiently.TELEMETRY.md
if I added, changed, or removed a metric name.