34
34
- [ Upgrade / Downgrade Strategy] ( #upgrade--downgrade-strategy )
35
35
- [ Version Skew Strategy] ( #version-skew-strategy )
36
36
- [ Open Questions] ( #open-questions )
37
- - [ Do We Need Status?] ( #do-we-need-status )
38
37
- [ Do We Need Verbs?] ( #do-we-need-verbs )
39
38
- [ Do We Need Any or Wildcard Selectors?] ( #do-we-need-any-or-wildcard-selectors )
40
39
- [ Do We Need Label Selectors?] ( #do-we-need-label-selectors )
41
- - [ Are " ; To" ; and " ; From" ; the right field names?] ( #are-to-and-from-the-right-field-names )
42
40
- [ Production Readiness Review Questionnaire] ( #production-readiness-review-questionnaire )
43
41
- [ Feature Enablement and Rollback] ( #feature-enablement-and-rollback )
44
42
- [ Rollout, Upgrade and Rollback Planning] ( #rollout-upgrade-and-rollback-planning )
@@ -166,6 +164,20 @@ Anyone creating or updating a ReferenceGrant MUST have read access to the resour
166
164
they are providing access to. If that authorization check fails, the update or
167
165
create action will also fail.
168
166
167
+ <<[ UNRESOLVED Do we need checks beyond read access? ] >>
168
+ Previous Discussion: https://github.com/kubernetes/enhancements/pull/3767#discussion_r1084528657
169
+
170
+ Comment that started that thread:
171
+
172
+ does anything ensure the user creating the ReferenceGrant has permissions (read?
173
+ write?) on the object they are granting access to? Translating the existing
174
+ ReferenceGrant into an authz check means translating from Kind to Resource
175
+
176
+ since this is extending "half of a handshake", it seems important to ensure the
177
+ actor extending the handshake actually has permission to do so
178
+
179
+ <<[ /UNRESOLVED] >>
180
+
169
181
#### ` Resource ` vs ` Kind `
170
182
171
183
When creating a metaresource (that is, a resource that targets other resources)
@@ -219,12 +231,13 @@ spec:
219
231
resource : gateways
220
232
namespace : foo
221
233
to :
222
- - resource : secrets
234
+ - group : " "
235
+ resource : secrets
223
236
224
237
```
225
238
226
- The new version communicates the scope more clearly because ` resource ` is
227
- unambiguous and corresponds to exactly one URL path on the API Server.
239
+ The new version communicates the scope more clearly because ` group ` + ` resource `
240
+ is unambiguous and corresponds to exactly one set of objects on the API Server.
228
241
229
242
This change also leaves room for an enhancement. Whether we have an in-tree or
230
243
CRD implementation, we can rely on the exact matching that the plural resource
@@ -291,7 +304,8 @@ spec:
291
304
resource : gateways
292
305
namespace : gateway-api-example-ns1
293
306
to :
294
- - resource : secrets
307
+ - group : " "
308
+ resource : secrets
295
309
` ` `
296
310
297
311
For Gateway TLS references, if this ReferenceGrant is deleted (revoking,
@@ -337,7 +351,8 @@ spec:
337
351
resource: httproutes
338
352
namespace: baz
339
353
to:
340
- - resource: services
354
+ - group: ""
355
+ resource: services
341
356
` ` `
342
357
343
358
For HTTPRoute objects referencing a backend in another namespace, if the
@@ -472,6 +487,31 @@ type ReferenceGrantSpec struct {
472
487
To []ReferenceGrantTo `json:"to"`
473
488
}
474
489
490
+ ```
491
+ <<[ UNRESOLVED Are "To" and "From" the right field names? ] >>
492
+ Previous Discussion: https://github.com/kubernetes/enhancements/pull/3767#discussion_r1084671720
493
+
494
+ Comments from @thockin :
495
+
496
+ I would not argue for subject/object - that's confusing, and I love to take
497
+ analogies too far.
498
+
499
+ NetPol uses To/From but only for actual communications, and that still has been
500
+ critiqued as perhaps "too cute".
501
+
502
+ Subject/From isn't too bad, but not as symmetric. Subject/Referrer is correct
503
+ but decidedly uncute. Subject/Origin?
504
+
505
+ I hold opinions from an API review POV, but I'd like sig-auth to own the
506
+ decision :)
507
+
508
+ For reference, there was an [ earlier
509
+ discussion] ( https://groups.google.com/g/kubernetes-api-reviewers/c/ldmrXXQC4G4 )
510
+ on the kubernetes-api-reviewers mailing list that's also relevant to this.
511
+ <<[ /UNRESOLVED] >>
512
+
513
+ ``` go
514
+
475
515
// ReferenceGrantFrom describes trusted namespaces and kinds.
476
516
type ReferenceGrantFrom struct {
477
517
// Group is the group of the referent.
@@ -520,6 +560,50 @@ moving ReferenceGrant to the new API group, just notes to save discussion time.
520
560
multiple controllers consume the same ReferenceGrant?
521
561
* Status design is still pending, but it's currently expected that controllers
522
562
will indicate status on the _ referring_ resources, not on ReferenceGrant itself.
563
+ <<[ UNRESOLVED do we need status? ] >>
564
+ Original Thread: https://github.com/kubernetes/enhancements/pull/3767#discussion_r1084670421
565
+
566
+ We want to be able to represent the following, in descending order of
567
+ importance:
568
+
569
+ 1 . Communicate that the ReferenceGrant is actively being used
570
+ 2 . Communicate which controllers are using this ReferenceGrant
571
+ 3 . Communicate how many times it's been used with sufficient granularity that I
572
+ can see the effects of my changes (if I remove this reference, am I removing
573
+ a dependency on this ReferenceGrant?)
574
+
575
+ We could introduce a status structure that allowed each implementing controller
576
+ to write 1 entry:
577
+
578
+ ``` yaml
579
+ status :
580
+ referencesAllowed :
581
+ - controllerName : gateway.example.com
582
+ numReferences : 1
583
+ ` ` `
584
+
585
+ @thockin responded with:
586
+
587
+ If we think that the cardinality of controllers is low, we can put it in status.
588
+ The downsides are:
589
+
590
+ 1. Could frequently require retries because of optimistic concurrency failures
591
+ (I'm trying to increment my count, but so is everyone else)
592
+ 1. If we're wrong about cardinality, there's not an easy way out
593
+ 1. Lots of writes to a resource that will be watched fairly often (every
594
+ controller which needs refs will watch all refgrants)
595
+ 1. We need .status.
596
+ 1. If we instead put that into a ReferenceGrantUse resource (just a tuple of
597
+ controller-name and count), then we only have optimistic concurrency
598
+ problems with ourselves, we have ~infinite cardinality, nobody will be
599
+ watching them, and RefGrant doesn't need .status.
600
+
601
+ Downsides:
602
+
603
+ 1. It's another new resource
604
+ 1. It's a new pattern, untested in other places.
605
+
606
+ <<[/UNRESOLVED]>>
523
607
* Clarify that the expected operating model for implementations expects them to
524
608
have broad, read access to both ReferenceGrant and the specific ` To` Kinds they
525
609
support, and then self-limit to only _use_ the relevant ones.
@@ -610,55 +694,16 @@ the old Gateway API resources as part of a seamless migration. We expect that
610
694
many implementations will provide this recommendation to users, and we may even
611
695
provide tooling to simplify this process.
612
696
697
+ <<[UNRESOLVED open questions that don't clearly fit elsewhere ]>>
613
698
# # Open Questions
614
699
615
700
This KEP was merged in a provisional state with a number of open questions
616
701
remaining. This section highlights the questions we have not resolved yet.
617
702
618
- ### Do We Need Status?
619
-
620
- We want to be able to represent the following, in descending order of
621
- importance:
622
-
623
- 1 . Communicate that the ReferenceGrant is actively being used
624
- 2 . Communicate which controllers are using this ReferenceGrant
625
- 3 . Communicate how many times it's been used with sufficient granularity that I
626
- can see the effects of my changes (if I remove this reference, am I removing
627
- a dependency on this ReferenceGrant?)
628
-
629
- We could introduce a status structure that allowed each implementing controller
630
- to write 1 entry:
631
-
632
- ``` yaml
633
- status :
634
- referencesAllowed :
635
- - controllerName : gateway.example.com
636
- numReferences : 1
637
- ` ` `
638
-
639
- @thockin responded with:
640
-
641
- If we think that the cardinality of controllers is low, we can put it in status.
642
- The downsides are:
643
-
644
- 1. Could frequently require retries because of optimistic concurrency failures
645
- (I'm trying to increment my count, but so is everyone else)
646
- 1. If we're wrong about cardinality, there's not an easy way out
647
- 1. Lots of writes to a resource that will be watched fairly often (every
648
- controller which needs refs will watch all refgrants)
649
- 1. We need .status.
650
- 1. If we instead put that into a ReferenceGrantUse resource (just a tuple of
651
- controller-name and count), then we only have optimistic concurrency
652
- problems with ourselves, we have ~infinite cardinality, nobody will be
653
- watching them, and RefGrant doesn't need .status.
654
-
655
- Downsides:
656
-
657
- 1. It's another new resource
658
- 1. It's a new pattern, untested in other places.
659
-
660
703
# ## Do We Need Verbs?
661
704
705
+ Previous Discussion : https://github.com/kubernetes/enhancements/pull/3767#discussion_r1084509958
706
+
662
707
We could add a `verbs` field to enable users to specify the kind of referential
663
708
access they want to grant. For example, we could define "read", "route", and
664
709
" backup" as well-known verbs to start. We could also allow implementations to
@@ -669,6 +714,10 @@ elsewhere in the resource, see the next item for more.
669
714
670
715
# ## Do We Need Any or Wildcard Selectors?
671
716
717
+ Previous Discussions :
718
+ * https://github.com/kubernetes/enhancements/pull/3767#discussion_r1086020464
719
+ * https://github.com/kubernetes/enhancements/pull/3767#discussion_r1086012665
720
+
672
721
We already allow "Name" to be optional in `To`, effectively resulting in
673
722
wildcard behavior. Should we expand that to allow any of the following?
674
723
@@ -683,6 +732,10 @@ a moot point.
683
732
684
733
# ## Do We Need Label Selectors?
685
734
735
+ Previous Discussions :
736
+ * https://github.com/kubernetes/enhancements/pull/3767#discussion_r1084492070
737
+ * https://github.com/kubernetes/enhancements/pull/3767#discussion_r1084674648
738
+
686
739
As a natural next step, instead of simply allowing all, we could use
687
740
label selectors to enable :
688
741
@@ -730,25 +783,7 @@ type NamespaceResource struct {
730
783
Resource string
731
784
}
732
785
` ` `
733
-
734
- # ## Are "To" and "From" the right field names?
735
- Comments from @thockin :
736
-
737
- I would not argue for subject/object - that's confusing, and I love to take
738
- analogies too far.
739
-
740
- NetPol uses To/From but only for actual communications, and that still has been
741
- critiqued as perhaps "too cute".
742
-
743
- Subject/From isn't too bad, but not as symmetric. Subject/Referrer is correct
744
- but decidedly uncute. Subject/Origin?
745
-
746
- I hold opinions from an API review POV, but I'd like sig-auth to own the
747
- decision :)
748
-
749
- For reference, there was an [earlier
750
- discussion](https://groups.google.com/g/kubernetes-api-reviewers/c/ldmrXXQC4G4)
751
- on the kubernetes-api-reviewers mailing list that's also relevant to this.
786
+ <<[/UNRESOLVED]>>
752
787
753
788
754
789
# # Production Readiness Review Questionnaire
0 commit comments