Loading main.go +5 −4 Changes for main.go: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -81,12 +81,12 @@ func run() error { starLogLevelHTTPServer(ctx) operator, err := buildOperator() topics, err := resolveKafkaTopics() if err != nil { return err } topics, err := resolveKafkaTopics() operator, err := buildOperator(topics) if err != nil { return err } Loading Loading @@ -151,7 +151,7 @@ func starLogLevelHTTPServer(ctx context.Context) { }() } func buildOperator() (*ops.Operator, error) { func buildOperator(topics map[string]streamConfig) (*ops.Operator, error) { logger.Debug("Initializing dependency engines (Git, Kompose, HelmConverter)...") gitEngine := engines.NewGitEngine(logger) komposeEngine := engines.NewKomposeEngine(logger) Loading @@ -160,7 +160,8 @@ func buildOperator() (*ops.Operator, error) { builder := ops.NewOperatorBuilder(). WithLogger(logger). WithHelmConverter(helmConverterEngine). WithHelmRegistryClient(helmRegistryClient) WithHelmRegistryClient(helmRegistryClient). WithRegistryRequestTopic(topics["registry"].Out) operator, err := builder.Build() if err != nil { Loading ops/activationHandler.go +1 −1 Changes for ops/activationHandler.go: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ func (op *Operator) ActivationRequestHandler(ctx goka.Context, msg interface{}, op.Logger.Info("service_id=%s msg=\"Processing Activation request.\"", serviceID) op.Logger.Info("service_id=%s msg=\"Routing to Registry API for Kubeconfig resolution.\"", serviceID) if err := registryapi.SendActivationKubeconfigRequest(traceCtx, ctx, op.Logger, kogitoActivationReq, kogitoActivationReq.Data.K8sServiceID); err != nil { if err := registryapi.SendActivationKubeconfigRequest(traceCtx, ctx, op.Logger, kogitoActivationReq, kogitoActivationReq.Data.K8sServiceID, op.registryRequestTopic); err != nil { span.RecordError(err) span.SetStatus(codes.Error, err.Error()) return Loading ops/deploy_strategy.go +1 −0 Changes for ops/deploy_strategy.go: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ type DeployInputs struct { ReleaseName string ChartRegistryURI string CompletionDate string StoreKubeconfigTopic string } func SelectDeployStrategy(annotatedNamespace string, in DeployInputs, log logging.Logger) DeployStrategy { Loading ops/deploy_strategy_default.go +1 −1 Changes for ops/deploy_strategy_default.go: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ func (s *DefaultHelmStrategy) provisionAndPublishNSKubeconfig(ctx context.Contex } s.Log.Info("service_id=%s msg=\"Publishing namespace user Kubeconfig to Registry API.\"", serviceID) if err := registryapi.SendSAKubeconfigRequestInternal(ctx, gokaCtx, s.Log, serviceID, kc); err != nil { if err := registryapi.SendSAKubeconfigRequestInternal(ctx, gokaCtx, s.Log, serviceID, kc, s.In.StoreKubeconfigTopic); err != nil { s.Log.Warning("service_id=%s msg=\"Failed to publish namespace kubeconfig to registry. Reason: %v\"", serviceID, err) } Loading ops/helmDeployHandler.go +2 −1 Changes for ops/helmDeployHandler.go: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ func (op *Operator) processHelmDeploymentRequest(traceCtx context.Context, ctx g } op.Logger.Info("service_id=%s msg=\"Routing to Registry API for Kubeconfig resolution.\"", serviceID) return registryapi.SendDeploymentKubeconfigRequest(traceCtx, ctx, op.Logger, kogitoHelmDeployReq, kogitoHelmDeployReq.Data.K8sServiceID, imagePullSecrets) return registryapi.SendDeploymentKubeconfigRequest(traceCtx, ctx, op.Logger, kogitoHelmDeployReq, kogitoHelmDeployReq.Data.K8sServiceID, imagePullSecrets, op.registryRequestTopic) } func (op *Operator) HandleDeployment(traceCtx context.Context, ctx goka.Context, deployParams registryapi.DeployParams) { Loading Loading @@ -266,5 +266,6 @@ func (op *Operator) buildDeployInputs(deployParams registryapi.DeployParams) (De ReleaseName: releaseName, ChartRegistryURI: chartRegistryURI, CompletionDate: deployParams.ServiceOperationReq.RequestedCompletionDate, StoreKubeconfigTopic: deployParams.StoreKubeconfigTopic, }, nil } Loading
main.go +5 −4 Changes for main.go: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -81,12 +81,12 @@ func run() error { starLogLevelHTTPServer(ctx) operator, err := buildOperator() topics, err := resolveKafkaTopics() if err != nil { return err } topics, err := resolveKafkaTopics() operator, err := buildOperator(topics) if err != nil { return err } Loading Loading @@ -151,7 +151,7 @@ func starLogLevelHTTPServer(ctx context.Context) { }() } func buildOperator() (*ops.Operator, error) { func buildOperator(topics map[string]streamConfig) (*ops.Operator, error) { logger.Debug("Initializing dependency engines (Git, Kompose, HelmConverter)...") gitEngine := engines.NewGitEngine(logger) komposeEngine := engines.NewKomposeEngine(logger) Loading @@ -160,7 +160,8 @@ func buildOperator() (*ops.Operator, error) { builder := ops.NewOperatorBuilder(). WithLogger(logger). WithHelmConverter(helmConverterEngine). WithHelmRegistryClient(helmRegistryClient) WithHelmRegistryClient(helmRegistryClient). WithRegistryRequestTopic(topics["registry"].Out) operator, err := builder.Build() if err != nil { Loading
ops/activationHandler.go +1 −1 Changes for ops/activationHandler.go: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ func (op *Operator) ActivationRequestHandler(ctx goka.Context, msg interface{}, op.Logger.Info("service_id=%s msg=\"Processing Activation request.\"", serviceID) op.Logger.Info("service_id=%s msg=\"Routing to Registry API for Kubeconfig resolution.\"", serviceID) if err := registryapi.SendActivationKubeconfigRequest(traceCtx, ctx, op.Logger, kogitoActivationReq, kogitoActivationReq.Data.K8sServiceID); err != nil { if err := registryapi.SendActivationKubeconfigRequest(traceCtx, ctx, op.Logger, kogitoActivationReq, kogitoActivationReq.Data.K8sServiceID, op.registryRequestTopic); err != nil { span.RecordError(err) span.SetStatus(codes.Error, err.Error()) return Loading
ops/deploy_strategy.go +1 −0 Changes for ops/deploy_strategy.go: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ type DeployInputs struct { ReleaseName string ChartRegistryURI string CompletionDate string StoreKubeconfigTopic string } func SelectDeployStrategy(annotatedNamespace string, in DeployInputs, log logging.Logger) DeployStrategy { Loading
ops/deploy_strategy_default.go +1 −1 Changes for ops/deploy_strategy_default.go: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ func (s *DefaultHelmStrategy) provisionAndPublishNSKubeconfig(ctx context.Contex } s.Log.Info("service_id=%s msg=\"Publishing namespace user Kubeconfig to Registry API.\"", serviceID) if err := registryapi.SendSAKubeconfigRequestInternal(ctx, gokaCtx, s.Log, serviceID, kc); err != nil { if err := registryapi.SendSAKubeconfigRequestInternal(ctx, gokaCtx, s.Log, serviceID, kc, s.In.StoreKubeconfigTopic); err != nil { s.Log.Warning("service_id=%s msg=\"Failed to publish namespace kubeconfig to registry. Reason: %v\"", serviceID, err) } Loading
ops/helmDeployHandler.go +2 −1 Changes for ops/helmDeployHandler.go: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ func (op *Operator) processHelmDeploymentRequest(traceCtx context.Context, ctx g } op.Logger.Info("service_id=%s msg=\"Routing to Registry API for Kubeconfig resolution.\"", serviceID) return registryapi.SendDeploymentKubeconfigRequest(traceCtx, ctx, op.Logger, kogitoHelmDeployReq, kogitoHelmDeployReq.Data.K8sServiceID, imagePullSecrets) return registryapi.SendDeploymentKubeconfigRequest(traceCtx, ctx, op.Logger, kogitoHelmDeployReq, kogitoHelmDeployReq.Data.K8sServiceID, imagePullSecrets, op.registryRequestTopic) } func (op *Operator) HandleDeployment(traceCtx context.Context, ctx goka.Context, deployParams registryapi.DeployParams) { Loading Loading @@ -266,5 +266,6 @@ func (op *Operator) buildDeployInputs(deployParams registryapi.DeployParams) (De ReleaseName: releaseName, ChartRegistryURI: chartRegistryURI, CompletionDate: deployParams.ServiceOperationReq.RequestedCompletionDate, StoreKubeconfigTopic: deployParams.StoreKubeconfigTopic, }, nil }