Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.

Commit 2cb02e5

Browse files
varshaprasad96m1kola
authored andcommitted
Make provisioner logic external
This commit pulls the provisioner logic in rukpak under pkg/, so that it can be easily be used by operator-controller. Signed-off-by: Varsha Prasad Narsing <[email protected]>
1 parent ac1802e commit 2cb02e5

14 files changed

+15
-15
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ generate: $(CONTROLLER_GEN) ## Generate code and manifests
9191
$(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./api/...
9292
$(CONTROLLER_GEN) rbac:roleName=core-admin \
9393
paths=./internal/controllers/bundledeployment/... \
94-
paths=./internal/provisioner/plain/... \
95-
paths=./internal/provisioner/registry/... \
94+
paths=./pkg/provisioner/plain/... \
95+
paths=./pkg/provisioner/registry/... \
9696
output:stdout > ./manifests/base/core/resources/cluster_role.yaml
9797
$(CONTROLLER_GEN) rbac:roleName=webhooks-admin paths=./internal/webhook/... output:stdout > ./manifests/base/apis/webhooks/resources/cluster_role.yaml
9898
$(CONTROLLER_GEN) rbac:roleName=helm-provisioner-admin \
9999
paths=./internal/controllers/bundledeployment/... \
100-
paths=./internal/provisioner/helm/... \
100+
paths=./pkg/provisioner/helm/... \
101101
output:stdout > ./manifests/base/provisioners/helm/resources/cluster_role.yaml
102102

103103
verify: tidy fmt generate ## Verify the current code generation and lint

cmd/core/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ import (
4747

4848
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
4949
"github.com/operator-framework/rukpak/internal/controllers/bundledeployment"
50-
"github.com/operator-framework/rukpak/internal/provisioner/plain"
51-
"github.com/operator-framework/rukpak/internal/provisioner/registry"
5250
"github.com/operator-framework/rukpak/internal/version"
5351
"github.com/operator-framework/rukpak/pkg/features"
5452
"github.com/operator-framework/rukpak/pkg/finalizer"
5553
"github.com/operator-framework/rukpak/pkg/preflights/crdupgradesafety"
54+
"github.com/operator-framework/rukpak/pkg/provisioner/plain"
55+
"github.com/operator-framework/rukpak/pkg/provisioner/registry"
5656
"github.com/operator-framework/rukpak/pkg/source"
5757
"github.com/operator-framework/rukpak/pkg/storage"
5858
"github.com/operator-framework/rukpak/pkg/util"

cmd/helm/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ import (
4242

4343
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
4444
"github.com/operator-framework/rukpak/internal/controllers/bundledeployment"
45-
"github.com/operator-framework/rukpak/internal/provisioner/helm"
4645
"github.com/operator-framework/rukpak/internal/version"
4746
"github.com/operator-framework/rukpak/pkg/finalizer"
47+
"github.com/operator-framework/rukpak/pkg/provisioner/helm"
4848
"github.com/operator-framework/rukpak/pkg/source"
4949
"github.com/operator-framework/rukpak/pkg/storage"
5050
"github.com/operator-framework/rukpak/pkg/util"

docs/provisioners/helm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Summary
44

5-
The `helm` provisioner is one of the [provisioners](https://github.com/operator-framework/rukpak/tree/main/internal/provisioner) of RukPak.
5+
The `helm` provisioner is one of the [provisioners](https://github.com/operator-framework/rukpak/tree/main/pkg/provisioner) of RukPak.
66
It is able to instantiate a given `helm+v3` bundle with a specified helm chart onto a cluster where it then installs the content. It does so by reconciling `Bundle` and `BundleDeployment` types that have
77
the `spec.provisionerClassName` field set to `core-rukpak-io-helm`. This field must be set to the correct provisioner
88
name in order for the `helm` provisioner to see and interact with the bundle.

docs/provisioners/plain.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Summary
44

5-
The `plain` provisioner is one of core RukPak [provisioners](https://github.com/operator-framework/rukpak/tree/main/internal/provisioner)
5+
The `plain` provisioner is one of core RukPak [provisioners](https://github.com/operator-framework/rukpak/tree/main/pkg/provisioner)
66
that knows how to interact with bundles of a particular format.
77
These `plain+v0` bundles, or plain bundles, are simply container images containing a set of static Kubernetes YAML
88
manifests in a given directory. For more information on the `plain+v0` format, see

docs/provisioners/registry.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Summary
44

5-
The `registry` provisioner is one of core Rukpak [provisioners](https://github.com/operator-framework/rukpak/tree/main/internal/provisioner)
5+
The `registry` provisioner is one of core Rukpak [provisioners](https://github.com/operator-framework/rukpak/tree/main/pkg/provisioner)
66
that knows how to interact with bundles of a particular format.
77
These `registry+v1` bundles, or `registry` bundles, are container images containing a set of static Kubernetes YAML
88
manifests organized in the legacy Operator Lifecycle Manger (OLM) format. For more information on the `registry+v1` format, see
File renamed without changes.
File renamed without changes.

internal/provisioner/registry/registry.go pkg/provisioner/registry/registry.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1111

1212
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
13-
"github.com/operator-framework/rukpak/internal/provisioner/plain"
1413
"github.com/operator-framework/rukpak/pkg/convert"
14+
"github.com/operator-framework/rukpak/pkg/provisioner/plain"
1515
)
1616

1717
const (

test/e2e/api_validation_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"sigs.k8s.io/controller-runtime/pkg/client"
1414

1515
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
16-
"github.com/operator-framework/rukpak/internal/provisioner/plain"
16+
"github.com/operator-framework/rukpak/pkg/provisioner/plain"
1717
)
1818

1919
var _ = Describe("bundle api validation", func() {

test/e2e/helm_provisioner_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"sigs.k8s.io/controller-runtime/pkg/client"
1616

1717
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
18-
"github.com/operator-framework/rukpak/internal/provisioner/helm"
18+
"github.com/operator-framework/rukpak/pkg/provisioner/helm"
1919
)
2020

2121
var _ = Describe("helm provisioner bundledeployment", func() {

test/e2e/plain_provisioner_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"sigs.k8s.io/controller-runtime/pkg/client"
3030

3131
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
32-
"github.com/operator-framework/rukpak/internal/provisioner/plain"
32+
"github.com/operator-framework/rukpak/pkg/provisioner/plain"
3333
"github.com/operator-framework/rukpak/pkg/storage"
3434
"github.com/operator-framework/rukpak/pkg/util"
3535
)

test/e2e/registry_provisioner_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"sigs.k8s.io/controller-runtime/pkg/client"
1313

1414
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
15-
registryprovisioner "github.com/operator-framework/rukpak/internal/provisioner/registry"
15+
registryprovisioner "github.com/operator-framework/rukpak/pkg/provisioner/registry"
1616
)
1717

1818
var _ = Describe("registry provisioner bundle", func() {

test/e2e/webhook_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1111

1212
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
13-
"github.com/operator-framework/rukpak/internal/provisioner/plain"
13+
"github.com/operator-framework/rukpak/pkg/provisioner/plain"
1414
)
1515

1616
var _ = Describe("bundle deployment api validating webhook", func() {

0 commit comments

Comments
 (0)