From 3a5a2ee0c5a281a04ca1d0c1be26968517fbd242 Mon Sep 17 00:00:00 2001 From: Ankit152 Date: Mon, 28 Oct 2024 19:38:07 +0530 Subject: [PATCH] feat: create service for extensions Signed-off-by: Ankit152 --- apis/v1beta1/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apis/v1beta1/config.go b/apis/v1beta1/config.go index 549aff9815..55e28a2d9c 100644 --- a/apis/v1beta1/config.go +++ b/apis/v1beta1/config.go @@ -206,7 +206,8 @@ func (c *Config) getPortsForComponentKinds(logger logr.Logger, componentKinds .. case KindProcessor: continue case KindExtension: - continue + retriever = extensions.ParserFor + cfg = *c.Extensions } for componentName := range enabledComponents[componentKind] { // TODO: Clean up the naming here and make it simpler to use a retriever. @@ -282,6 +283,10 @@ func (c *Config) GetExporterPorts(logger logr.Logger) ([]corev1.ServicePort, err return c.getPortsForComponentKinds(logger, KindExporter) } +func (c *Config) GetExtensionPorts(logger logr.Logger) ([]corev1.ServicePort, error) { + return c.getPortsForComponentKinds(logger, KindExtension) +} + func (c *Config) GetAllPorts(logger logr.Logger) ([]corev1.ServicePort, error) { return c.getPortsForComponentKinds(logger, KindReceiver, KindExporter) }