Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcoa: bump logging resources to 6.0 #1626

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ func TestNewMCOACRDEventHandler(t *testing.T) {
},
{
name: "CRD created is a dependency",
crdName: "clusterlogforwarders.logging.openshift.io",
crdName: "clusterlogforwarders.observability.openshift.io",
expectedReqs: []reconcile.Request{
{
NamespacedName: types.NamespacedName{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func TestUpdateMCOAStatus(t *testing.T) {
Type: reasonMCOADegraded,
Status: metav1.ConditionTrue,
Reason: reasonMCOADegraded,
Message: "MultiCluster-Observability-Addon degraded because the following CRDs are not installed on the hub: clusterlogforwarders.logging.openshift.io(v1), instrumentations.opentelemetry.io(v1alpha1), opentelemetrycollectors.opentelemetry.io(v1beta1)",
Message: "MultiCluster-Observability-Addon degraded because the following CRDs are not installed on the hub: clusterlogforwarders.observability.openshift.io(v1), instrumentations.opentelemetry.io(v1alpha1), opentelemetrycollectors.opentelemetry.io(v1beta1)",
},
},
{
Expand All @@ -349,7 +349,7 @@ func TestUpdateMCOAStatus(t *testing.T) {
existingObjs: []runtime.Object{
&apiextensionsv1.CustomResourceDefinition{
ObjectMeta: metav1.ObjectMeta{
Name: "clusterlogforwarders.logging.openshift.io",
Name: "clusterlogforwarders.observability.openshift.io",
},
Spec: apiextensionsv1.CustomResourceDefinitionSpec{
Versions: []apiextensionsv1.CustomResourceDefinitionVersion{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ spec:
customizedVariables:
# Operator Subscription Channels
- name: openshiftLoggingChannel
value: stable-5.9
value: stable-6.0
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
name: multicluster-observability-addon
namespace: open-cluster-management-observability
# Describes the default log forwarding outputs for each log type applied to all managed clusters.
- group: logging.openshift.io
- group: observability.openshift.io
resource: clusterlogforwarders
# Describes the default OpenTelemetryCollector type applied to all managed clusters.
- group: opentelemetry.io
Expand All @@ -35,7 +35,7 @@ spec:
- name: global
namespace: open-cluster-management-global-set
configs:
- group: logging.openshift.io
- group: observability.openshift.io
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change from upstream, or does it distinguish MCOA CR's as separate to the CLF installed CR's?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With Logging Operator 6.0 the logging team deprecated the old CRDs and created a new one, it's still called ClusterLogForwarder but they belong to a different group.

TL;DR: Upstream, they are still the CR's managed by CLO

resource: clusterlogforwarders
name: instance
namespace: open-cluster-management-observability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
resources: ["secrets"]
verbs: ["get", "list", "watch"]
# Roles for addon to perform logging specific actions
- apiGroups: ["logging.openshift.io"]
- apiGroups: ["observability.openshift.io"]
resources: ["clusterlogforwarders"]
verbs: ["get", "list", "watch"]
# Role for addon to perform opentelemetry specific actions
Expand Down
2 changes: 1 addition & 1 deletion operators/multiclusterobservability/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const (
)

const (
ClusterLogForwarderCRDName = "clusterlogforwarders.logging.openshift.io"
ClusterLogForwarderCRDName = "clusterlogforwarders.observability.openshift.io"
OpenTelemetryCollectorCRDName = "opentelemetrycollectors.opentelemetry.io"
InstrumentationCRDName = "instrumentations.opentelemetry.io"
)
Expand Down
6 changes: 3 additions & 3 deletions operators/multiclusterobservability/pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ func TestGetOperandName(t *testing.T) {

func TestGetMCOASupportedCRDNames(t *testing.T) {
expected := []string{
"clusterlogforwarders.logging.openshift.io",
"clusterlogforwarders.observability.openshift.io",
"opentelemetrycollectors.opentelemetry.io",
"instrumentations.opentelemetry.io",
}
Expand All @@ -823,8 +823,8 @@ func TestGetMCOASupportedCRDFQDN(t *testing.T) {
}{
{
name: "Valid CRD name with version",
crdName: "clusterlogforwarders.logging.openshift.io",
expected: "clusterlogforwarders.v1.logging.openshift.io",
crdName: "clusterlogforwarders.observability.openshift.io",
expected: "clusterlogforwarders.v1.observability.openshift.io",
},
{
name: "Valid CRD name with different version",
Expand Down
Loading