File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
staging/src/k8s.io/apiserver/pkg/server/filters Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,11 @@ type priorityAndFairnessKeyType int
37
37
38
38
const priorityAndFairnessKey priorityAndFairnessKeyType = iota
39
39
40
+ const (
41
+ responseHeaderMatchedPriorityLevelConfigurationUID = "X-Kubernetes-PF-PriorityLevelUID"
42
+ responseHeaderMatchedFlowSchemaUID = "X-Kubernetes-PF-FlowSchemaUID"
43
+ )
44
+
40
45
// PriorityAndFairnessClassification identifies the results of
41
46
// classification for API Priority and Fairness
42
47
type PriorityAndFairnessClassification struct {
@@ -97,6 +102,8 @@ func WithPriorityAndFairness(
97
102
served = true
98
103
innerCtx := context .WithValue (ctx , priorityAndFairnessKey , classification )
99
104
innerReq := r .Clone (innerCtx )
105
+ w .Header ().Set (responseHeaderMatchedPriorityLevelConfigurationUID , string (classification .PriorityLevelUID ))
106
+ w .Header ().Set (responseHeaderMatchedFlowSchemaUID , string (classification .FlowSchemaUID ))
100
107
handler .ServeHTTP (w , innerReq )
101
108
}
102
109
digest := utilflowcontrol.RequestDigest {requestInfo , user }
You can’t perform that action at this time.
0 commit comments