Skip to content

Commit

Permalink
feat(kuma-dp) Expose the possibility to add ProxyTemplates publicly (#…
Browse files Browse the repository at this point in the history
…1452)

Populating the predefinedProfiles map was not possible publicly.
This is limiting for anyone wanting to make custom profiles

Signed-off-by: Charly Molter <charly@koyeb.com>
  • Loading branch information
Charly Molter authored Jan 20, 2021
1 parent 8bd84a9 commit 004a4e1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/xds/generator/proxy_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ func NewDefaultProxyProfile() ResourceGenerator {
}

func init() {
predefinedProfiles[mesh_core.ProfileDefaultProxy] = NewDefaultProxyProfile()
predefinedProfiles[IngressProxy] = CompositeResourceGenerator{AdminProxyGenerator{}, IngressGenerator{}}
RegisterProfile(mesh_core.ProfileDefaultProxy, NewDefaultProxyProfile())
RegisterProfile(IngressProxy, CompositeResourceGenerator{AdminProxyGenerator{}, IngressGenerator{}})
}

func RegisterProfile(profileName string, generator ResourceGenerator) {
predefinedProfiles[profileName] = generator
}

type ProxyTemplateProfileSource struct {
Expand Down

0 comments on commit 004a4e1

Please sign in to comment.