Skip to content

Commit 6de14b2

Browse files
authored
Merge pull request #193 from fi-ts/remove-crd-installer
Remove crd installer
2 parents 1e67481 + ce89e68 commit 6de14b2

File tree

5 files changed

+3
-104
lines changed

5 files changed

+3
-104
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ FROM gcr.io/distroless/static:nonroot
2424
WORKDIR /
2525
COPY --from=builder /workspace/manager .
2626
COPY external/svc-postgres-operator.yaml external/svc-postgres-operator.yaml
27-
COPY external/crd-postgresql.yaml external/crd-postgresql.yaml
2827
USER nonroot:nonroot
2928

3029
ENTRYPOINT ["/manager"]

controllers/suite_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ var (
5050
externalYAMLDir = filepath.Join("..", "external")
5151
externalYAMLDirTest = filepath.Join(externalYAMLDir, "test")
5252

53+
HelmCRDDir = filepath.Join("..", "charts", "postgreslet", "crds")
54+
5355
instance = &pg.Postgres{}
5456
)
5557

@@ -77,7 +79,7 @@ var _ = BeforeSuite(func(done Done) {
7779
svcClusterTestEnv = &envtest.Environment{
7880
CRDInstallOptions: envtest.CRDInstallOptions{
7981
Paths: []string{
80-
filepath.Join(externalYAMLDir, "crd-postgresql.yaml"),
82+
filepath.Join(HelmCRDDir, "postgresql.yaml"),
8183
filepath.Join(externalYAMLDirTest, "crd-clusterwidenetworkpolicy.yaml"),
8284
},
8385
},

main.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424

2525
databasev1 "github.com/fi-ts/postgreslet/api/v1"
2626
"github.com/fi-ts/postgreslet/controllers"
27-
"github.com/fi-ts/postgreslet/pkg/crdinstaller"
2827
"github.com/fi-ts/postgreslet/pkg/lbmanager"
2928
"github.com/fi-ts/postgreslet/pkg/operatormanager"
3029
firewall "github.com/metal-stack/firewall-controller/api/v1"
@@ -91,16 +90,6 @@ func main() {
9190
)
9291

9392
svcClusterConf := ctrl.GetConfigOrDie()
94-
i, err := crdinstaller.New(svcClusterConf, scheme, ctrl.Log.WithName("CRDInstaller"))
95-
if err != nil {
96-
setupLog.Error(err, "unable to create `CRDInstaller`")
97-
os.Exit(1)
98-
}
99-
if err := i.Install("external/crd-postgresql.yaml"); err != nil {
100-
setupLog.Error(err, "unable to install CRD Postgresql")
101-
os.Exit(1)
102-
}
103-
10493
svcClusterMgr, err := ctrl.NewManager(svcClusterConf, ctrl.Options{
10594
Scheme: scheme,
10695
MetricsBindAddress: metricsAddrSvcMgr,

pkg/crdinstaller/crdinstaller.go

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)