generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
What would you like to be added:
Introduce ExtensionFeatureMetadata struct.
type ExtensionFeatureMetadata struct {
emitted bool
source *ExtensionFeatureSource
}
type ExtensionFeatureSource struct {
IngressNN types.NamespacedName
AnnotationKey []string
}
func (m *ExtensionFeatureMetadata) SetEmitted() {
m.emitted = true
}
func (m *ExtensionFeatureMetadata) IsEmitted() bool {
return m.emitted
}
func (m *ExtensionFeatureMetadata) GetSource() *ExtensionFeatureSource {
return m.source
}
func (m *ExtensionFeatureMetadata) SetSource(source *ExtensionFeatureSource) {
m.source = source
}Why this is needed:
currently, we're implementing extension features, like below
- PathRewrite
- RequestTimeout
- Buffer body size
It’s unclear which emitter should apply the extensions.
so, we should append metadata into extensions to handle correctly.
Each extension embeds the metadata above in the struct, allowing the emitter to tell that it has already been processed.
e.g.
type BodySize struct {
ExtensionFeatureMetadata
BufferSize *resource.Quantity
MaxSize *resource.Quantity
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.