@@ -20,7 +20,6 @@ import (
20
20
"github.com/replicatedhq/embedded-cluster/cmd/installer/kotscli"
21
21
ecv1beta1 "github.com/replicatedhq/embedded-cluster/kinds/apis/v1beta1"
22
22
"github.com/replicatedhq/embedded-cluster/kinds/types"
23
- "github.com/replicatedhq/embedded-cluster/operator/charts"
24
23
"github.com/replicatedhq/embedded-cluster/pkg/addons"
25
24
"github.com/replicatedhq/embedded-cluster/pkg/addons/adminconsole"
26
25
"github.com/replicatedhq/embedded-cluster/pkg/addons/embeddedclusteroperator"
@@ -50,11 +49,9 @@ import (
50
49
"github.com/spf13/cobra"
51
50
"github.com/spf13/pflag"
52
51
corev1 "k8s.io/api/core/v1"
53
- apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
54
52
k8serrors "k8s.io/apimachinery/pkg/api/errors"
55
53
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
56
54
"sigs.k8s.io/controller-runtime/pkg/client"
57
- "sigs.k8s.io/yaml"
58
55
)
59
56
60
57
type InstallCmdFlags struct {
@@ -1112,41 +1109,6 @@ func createECNamespace(ctx context.Context, kcli client.Client) error {
1112
1109
return nil
1113
1110
}
1114
1111
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
-
1150
1112
func createVersionMetadataConfigmap (ctx context.Context , kcli client.Client ) error {
1151
1113
// This metadata should be the same as the artifact from the release without the vendor customizations
1152
1114
metadata , err := gatherVersionMetadata (false )
0 commit comments