Skip to content

Commit

Permalink
fix: add korrel8r proxy configuration to logging view plugin (rhobs#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgbernalp authored Jun 13, 2024
1 parent 2b43907 commit a1f0de3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/controllers/uiplugin/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const (
port = 9443
serviceAccountSuffix = "-sa"
servingCertVolumeName = "serving-cert"
korrel8rName = "korrel8r"
Korrel8rConfigFileName = "korrel8r.yaml"
Korrel8rConfigMountDir = "/config/"
OpenshiftLoggingNs = "openshift-logging"
Expand Down Expand Up @@ -79,12 +80,11 @@ func pluginComponentReconcilers(plugin *uiv1alpha1.UIPlugin, pluginInfo UIPlugin
}

if pluginInfo.Korrel8rImage != "" {
kname := "korrel8r"
components = append(components, reconciler.NewUpdater(newKorrel8rService(kname, namespace), plugin))
korrel8rCm, err := newKorrel8rConfigMap(kname, namespace, pluginInfo)
components = append(components, reconciler.NewUpdater(newKorrel8rService(korrel8rName, namespace), plugin))
korrel8rCm, err := newKorrel8rConfigMap(korrel8rName, namespace, pluginInfo)
if err == nil && korrel8rCm != nil {
components = append(components, reconciler.NewUpdater(korrel8rCm, plugin))
components = append(components, reconciler.NewUpdater(newKorrel8rDeployment(kname, namespace, pluginInfo), plugin))
components = append(components, reconciler.NewUpdater(newKorrel8rDeployment(korrel8rName, namespace, pluginInfo), plugin))
}
}

Expand Down
10 changes: 10 additions & 0 deletions pkg/controllers/uiplugin/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ func createLoggingPluginInfo(plugin *uiv1alpha1.UIPlugin, namespace, name, image
Port: 8080,
},
},
{
Type: "Service",
Alias: "korrel8r",
Authorize: true,
Service: osv1alpha1.ConsolePluginProxyServiceConfig{
Name: korrel8rName,
Namespace: namespace,
Port: port,
},
},
},
ConfigMap: &corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{
Expand Down

0 comments on commit a1f0de3

Please sign in to comment.