harvester / harvester

Open source hyperconverged infrastructure (HCI) software
https://harvesterhci.io/
Apache License 2.0
3.85k stars 324 forks source link

[BUG] Can't use Secrets to create Cluster Output #6427

Closed SlavikCA closed 1 month ago

SlavikCA commented 2 months ago

To Reproduce

  1. Enable "rancher-logging" addon
  2. Create secret. I created secret in the "elk-stack" namespace
  3. Go to Monitoring & Logging -> Logging -> Cluster Output and click CREATE

Expected behavior I expect that I'll be able to use Secret I created.

Actual behavior

  1. The "Secret Key" or "Key Id" fields lists entries only from "cattle-logging-system" and I can't use the secret I created in another namespace
  2. But I also can't create the secret in the "cattle-logging-system" namespace, because when I go to SECRETS page - that namespace is hidden there.

Environment

Screenshot 2024-08-27 at 08 40 27

votdev commented 2 months ago

Expected behavior I expect that I'll be able to use Secret I created.

The Output must belong to the same namespace as your secret to be visible in the dropdown.

Example

SlavikCA commented 2 months ago

@votdev Thank you for the reply.

You response is about Output, and looks like it is working, as expected.

My issue is not about Output, but about Cluster Output. Currently in Harvester, there is no way to select namespace for Cluster Output.

Also, I read some docs here: https://kube-logging.dev/docs/quickstarts/single/#configure-the-logging-operator

Note: The control namespace is where the Logging operator deploys the forwarder’s resources, like the StatefulSet and the configuration secrets. Usually it’s called logging.

By default, this namespace is used to define the cluster-wide resources: SyslogNGClusterOutput, SyslogNGClusterFlow, ClusterOutput, and ClusterFlow. For details, see Configure log routing.

It looks like that means, that Cluster Output can only use secret from the "control namespace", which is missing in Harvester UI

brandboat commented 1 month ago

Thanks for reporting this issue, @SlavikCA. This one seems a little bit similar to https://github.com/harvester/harvester/issues/6107, though in different scenario. One possible workaround is use Edit as YAML to create secret under cattle-logging-system namespace. image

brandboat commented 1 month ago

Closing this issue as it is a duplicate of https://github.com/harvester/harvester/issues/6107. @SlavikCA, if you have any questions, feel free to reach out, thank you.