diff --git a/functional_tests/functional_test.go b/functional_tests/functional_test.go index a96b045d4..248afbe42 100644 --- a/functional_tests/functional_test.go +++ b/functional_tests/functional_test.go @@ -172,41 +172,6 @@ func deployChartsAndApps(t *testing.T) { } } - // deploy the operator CRDs - stream, err = os.ReadFile(filepath.Join(testDir, manifestsDir, "operator_crds.yaml")) - require.NoError(t, err) - - for _, resourceYAML := range strings.Split(string(stream), "---") { - if len(resourceYAML) == 0 { - continue - } - - obj, groupVersionKind, err := decode( - []byte(resourceYAML), - nil, - nil) - require.NoError(t, err) - if groupVersionKind.Group == "apiextensions.k8s.io" && - groupVersionKind.Version == "v1" && - groupVersionKind.Kind == "CustomResourceDefinition" { - crd := obj.(*appextensionsv1.CustomResourceDefinition) - apiExtensions := extensionsClient.ApiextensionsV1().CustomResourceDefinitions() - crd, err := apiExtensions.Create(context.Background(), crd, metav1.CreateOptions{}) - require.NoError(t, err) - t.Logf("Deployed CRD %s", crd.Name) - for _, version := range crd.Spec.Versions { - sch.AddKnownTypeWithName( - schema.GroupVersionKind{ - Group: crd.Spec.Group, - Version: version.Name, - Kind: crd.Spec.Names.Kind, - }, - &unstructured.Unstructured{}, - ) - } - } - } - codecs := serializer.NewCodecFactory(sch) crdDecode := codecs.UniversalDeserializer().Decode // Prometheus pod monitor @@ -536,29 +501,6 @@ func teardown(t *testing.T) { } } - crdstream, err = os.ReadFile(filepath.Join(testDir, manifestsDir, "operator_crds.yaml")) - require.NoError(t, err) - for _, resourceYAML := range strings.Split(string(crdstream), "---") { - if len(resourceYAML) == 0 { - continue - } - - obj, groupVersionKind, err := decode( - []byte(resourceYAML), - nil, - nil) - require.NoError(t, err) - if groupVersionKind.Group == "apiextensions.k8s.io" && - groupVersionKind.Version == "v1" && - groupVersionKind.Kind == "CustomResourceDefinition" { - crd := obj.(*appextensionsv1.CustomResourceDefinition) - apiExtensions := extensionsClient.ApiextensionsV1().CustomResourceDefinitions() - _ = apiExtensions.Delete(context.Background(), crd.Name, metav1.DeleteOptions{ - GracePeriodSeconds: &waitTime, - }) - } - } - for _, nm := range namespaces { nmClient := client.CoreV1().Namespaces() _ = nmClient.Delete(context.Background(), nm.Name, metav1.DeleteOptions{ diff --git a/functional_tests/testdata/values/aks_test_values.yaml.tmpl b/functional_tests/testdata/values/aks_test_values.yaml.tmpl index 72fc1b23b..1dd0b0177 100644 --- a/functional_tests/testdata/values/aks_test_values.yaml.tmpl +++ b/functional_tests/testdata/values/aks_test_values.yaml.tmpl @@ -70,8 +70,6 @@ livenessProbe: operator: enabled: true - crds: - create: false admissionWebhooks: certManager: enabled: false diff --git a/functional_tests/testdata/values/autopilot_test_values.yaml.tmpl b/functional_tests/testdata/values/autopilot_test_values.yaml.tmpl index b8cf91534..acf197d8b 100644 --- a/functional_tests/testdata/values/autopilot_test_values.yaml.tmpl +++ b/functional_tests/testdata/values/autopilot_test_values.yaml.tmpl @@ -62,8 +62,6 @@ distribution: gke/autopilot operator: enabled: true - crds: - create: false admissionWebhooks: certManager: enabled: false diff --git a/functional_tests/testdata/values/test_values.yaml.tmpl b/functional_tests/testdata/values/test_values.yaml.tmpl index b0f8651cb..15eed00c1 100644 --- a/functional_tests/testdata/values/test_values.yaml.tmpl +++ b/functional_tests/testdata/values/test_values.yaml.tmpl @@ -71,8 +71,6 @@ extraAttributes: environment: dev operator: enabled: true - crds: - create: false targetAllocator: enabled: true diff --git a/helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/opentelemetry.io_instrumentations.yaml b/helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/crds/opentelemetry.io_instrumentations.yaml similarity index 100% rename from helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/opentelemetry.io_instrumentations.yaml rename to helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/crds/opentelemetry.io_instrumentations.yaml diff --git a/helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/opentelemetry.io_opampbridges.yaml b/helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/crds/opentelemetry.io_opampbridges.yaml similarity index 100% rename from helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/opentelemetry.io_opampbridges.yaml rename to helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/crds/opentelemetry.io_opampbridges.yaml diff --git a/helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/opentelemetry.io_opentelemetrycollectors.yaml b/helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/crds/opentelemetry.io_opentelemetrycollectors.yaml similarity index 100% rename from helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/opentelemetry.io_opentelemetrycollectors.yaml rename to helm-charts/splunk-otel-collector/charts/opentelemetry-operator-crds/crds/opentelemetry.io_opentelemetrycollectors.yaml