Conversation
dc74843 to
73b73a4
Compare
This comment was marked as outdated.
This comment was marked as outdated.
eb0a266 to
7f7923c
Compare
7f7923c to
99036df
Compare
99036df to
242be5a
Compare
1ec8c1d to
9f97bc2
Compare
242be5a to
c10799c
Compare
|
|
||
| allComponentFeatures := []*componentfeaturesv1.ComponentFeatures{r.GetComponentFeatures()} | ||
|
|
||
| allProxies, err := h.getAllClusterProxies(request.Context()) |
There was a problem hiding this comment.
Why we need to have Proxies Capabilities where we are handling the case types.AppServer: case ?
d633d79 to
243dd04
Compare
9f97bc2 to
b6f6040
Compare
243dd04 to
0e91561
Compare
b6f6040 to
177f84e
Compare
ad8195b to
d969fa9
Compare
177f84e to
b8a3e14
Compare
0515dbf to
f9d56b7
Compare
b8a3e14 to
e3bad8f
Compare
f9d56b7 to
4572cde
Compare
e3bad8f to
b00e1fc
Compare
4572cde to
b7b1154
Compare
b00e1fc to
a3ecc1a
Compare
997956e to
5898ded
Compare
smallinsky
left a comment
There was a problem hiding this comment.
The aggregatedAppServer logic could be simplified and made consistent with the aggregatedKube approach
Test coverage is also missing for the “many app servers -> same app” scenario, and I think the flow should distinguish the proxy app feature from the app server feature more explicitly.
That said, aside from this and a few nit comments looks solid. LGTM once the remaining comments are addressed.
| func (a *aggregatedAppServer) Copy() types.AppServer { | ||
| out := a.AppServer.Copy() | ||
| if a.features != nil { | ||
| out.SetComponentFeatures(componentfeatures.Join(a.features)) | ||
| } | ||
| return out | ||
| } | ||
|
|
||
| func (a *aggregatedAppServer) CloneResource() types.ResourceWithLabels { | ||
| return a.Copy() | ||
| } |
There was a problem hiding this comment.
Why this method are needed ?
I fee like the aggregatedAppServer should overwrite the GetFeatures instead of trying to update on copy.
For instance you can take a look at aggregatedKube or agggragateDB where GetTargetHealthStatus method is overriten by wrapper
We don't want to introduce seconds solution solving the same problem but in different way.
There was a problem hiding this comment.
Copy()/CloneResource() are needed as unified cache returns clones so the intersection needs to be set on the cloned Resource otherwise the aggregation is lost when we copy/unwrap.
But I agree it'd be better to match the aggregatedKube/aggregateDatabase pattern. I’ll also override GetComponentFeatures() on the wrapper like GetTargetHealthStatus so Copy() can set ComponentFeatures from that method so both pre-copy and post-copy behaviour is consistent.
There was a problem hiding this comment.
Copy()/CloneResource() are needed as unified cache returns clones so the intersection needs to be set on the cloned Resource otherwise the aggregation is lost when we copy/unwrap.
Why the aggregatedKube/aggregateDatabase don't need the Clone ? I think that we follow existing pattern this can be simplified.
There was a problem hiding this comment.
They do have copy/clone funcs?
teleport/lib/services/unified_resource.go
Lines 1112 to 1122 in 1fec131
5898ded to
7d9118f
Compare
7d9118f to
1fec131
Compare
smallinsky
left a comment
There was a problem hiding this comment.
LGTM when remaining comment will be addressed
1fec131 to
90d2aa2
Compare
- Impl `ComponentFeatures` for Auth, Proxy, AppServer - Add helper funcs - Add/update tests - Update WebUI types
90d2aa2 to
172d4b1
Compare
* types: Add `ComponentFeatures` proto types * feat: Add handling for `ComponentFeatures` to Auth, Proxy, AppServer - Impl `ComponentFeatures` for Auth, Proxy, AppServer - Add helper funcs - Add/update tests - Update WebUI types * docs: Update operator crd manifests, tf docs
Context
Implements the initial phase of RFD 230 by adding a versioned
ComponentFeaturespayload to service presence, allowing consumers to reason about capabilities without relying on semver. For now, App Service, Auth, and Proxy advertise support for Resource Constraints in certificates (RFD 228), and are used by Proxy to setSupportedFeatureIDson App records fromclusterUnifiedResourcesGet.Related
ListAuthServers/ListProxies#61702.