operator-framework / operator-sdk

SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding.
https://sdk.operatorframework.io
Apache License 2.0
7.25k stars 1.75k forks source link

Missing Enable ClusterMonitoring Label in Operator Namespace #6825

Closed Lucifergene closed 2 months ago

Lucifergene commented 2 months ago

According to the OKD Docs for enabling metrics for custom operators, it mentions to add the following label to the namespace of the operator:

oc label namespace <operator_namespace> openshift.io/cluster-monitoring="true"

This label is missing in the example memcached-operator with monitoring: https://github.com/operator-framework/operator-sdk/blob/d2366bef634034fa3179629cfef3b7d68cde1727/testdata/go/v4/monitoring/memcached-operator/config/manager/manager.yaml#L4

Is there no current requirement for this label?

acornett21 commented 2 months ago

Hi @Lucifergene this is an upstream project, so it has no vendor specific labeling requirements. If OKD requires that then operator authors targeting OKD would need to add this on their own.