@@ -20,7 +20,6 @@ import (
2020 "github.com/replicatedhq/embedded-cluster/cmd/installer/kotscli"
2121 ecv1beta1 "github.com/replicatedhq/embedded-cluster/kinds/apis/v1beta1"
2222 "github.com/replicatedhq/embedded-cluster/kinds/types"
23- "github.com/replicatedhq/embedded-cluster/operator/charts"
2423 "github.com/replicatedhq/embedded-cluster/pkg/addons"
2524 "github.com/replicatedhq/embedded-cluster/pkg/addons/adminconsole"
2625 "github.com/replicatedhq/embedded-cluster/pkg/addons/embeddedclusteroperator"
@@ -50,11 +49,9 @@ import (
5049 "github.com/spf13/cobra"
5150 "github.com/spf13/pflag"
5251 corev1 "k8s.io/api/core/v1"
53- apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
5452 k8serrors "k8s.io/apimachinery/pkg/api/errors"
5553 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5654 "sigs.k8s.io/controller-runtime/pkg/client"
57- "sigs.k8s.io/yaml"
5855)
5956
6057type InstallCmdFlags struct {
@@ -1112,41 +1109,6 @@ func createECNamespace(ctx context.Context, kcli client.Client) error {
11121109 return nil
11131110}
11141111
1115- func createInstallationCRD (ctx context.Context , kcli client.Client ) error {
1116- // decode the CRD file
1117- crds := strings .Split (charts .InstallationCRDFile , "\n ---\n " )
1118-
1119- for _ , crdYaml := range crds {
1120- var crd apiextensionsv1.CustomResourceDefinition
1121- if err := yaml .Unmarshal ([]byte (crdYaml ), & crd ); err != nil {
1122- return fmt .Errorf ("unmarshal installation CRD: %w" , err )
1123- }
1124-
1125- // apply labels and annotations so that the CRD can be taken over by helm shortly
1126- if crd .Labels == nil {
1127- crd .Labels = map [string ]string {}
1128- }
1129- crd .Labels ["app.kubernetes.io/managed-by" ] = "Helm"
1130- if crd .Annotations == nil {
1131- crd .Annotations = map [string ]string {}
1132- }
1133- crd .Annotations ["meta.helm.sh/release-name" ] = "embedded-cluster-operator"
1134- crd .Annotations ["meta.helm.sh/release-namespace" ] = "embedded-cluster"
1135-
1136- // apply the CRD
1137- if err := kcli .Create (ctx , & crd ); err != nil {
1138- return fmt .Errorf ("apply installation CRD: %w" , err )
1139- }
1140-
1141- // wait for the CRD to be ready
1142- if err := kubeutils .WaitForCRDToBeReady (ctx , kcli , crd .Name ); err != nil {
1143- return fmt .Errorf ("wait for installation CRD to be ready: %w" , err )
1144- }
1145- }
1146-
1147- return nil
1148- }
1149-
11501112func createVersionMetadataConfigmap (ctx context.Context , kcli client.Client ) error {
11511113 // This metadata should be the same as the artifact from the release without the vendor customizations
11521114 metadata , err := gatherVersionMetadata (false )
0 commit comments