Skip to content

Commit 8fd4464

Browse files
authored
Consolidate api directory (#1800)
Move operator-controller APIs into apis/operator-controller Move catalogd APIs into apis/catalogd There's a conflict in types, both have a CatalogSource type that we may not be able to easily rename, so the simplest solution was to keep the two APIs serparate Signed-off-by: Todd Short <[email protected]>
1 parent 9b888eb commit 8fd4464

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+55
-55
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ KUSTOMIZE_OPCON_CRDS_DIR := config/base/operator-controller/crd/bases
120120
KUSTOMIZE_OPCON_RBAC_DIR := config/base/operator-controller/rbac
121121
manifests: $(CONTROLLER_GEN) #EXHELP Generate WebhookConfiguration, ClusterRole, and CustomResourceDefinition objects.
122122
# Generate the operator-controller manifests
123-
rm -rf $(KUSTOMIZE_OPCON_CRDS_DIR) && $(CONTROLLER_GEN) crd paths=./api/... output:crd:artifacts:config=$(KUSTOMIZE_OPCON_CRDS_DIR)
123+
rm -rf $(KUSTOMIZE_OPCON_CRDS_DIR) && $(CONTROLLER_GEN) crd paths=./api/operator-controller/... output:crd:artifacts:config=$(KUSTOMIZE_OPCON_CRDS_DIR)
124124
rm -f $(KUSTOMIZE_OPCON_RBAC_DIR)/role.yaml && $(CONTROLLER_GEN) rbac:roleName=manager-role paths=./internal/operator-controller/... output:rbac:artifacts:config=$(KUSTOMIZE_OPCON_RBAC_DIR)
125125
# Generate the catalogd manifests
126-
rm -rf $(KUSTOMIZE_CATD_CRDS_DIR) && $(CONTROLLER_GEN) crd paths="./catalogd/api/..." output:crd:artifacts:config=$(KUSTOMIZE_CATD_CRDS_DIR)
126+
rm -rf $(KUSTOMIZE_CATD_CRDS_DIR) && $(CONTROLLER_GEN) crd paths=./api/catalogd/... output:crd:artifacts:config=$(KUSTOMIZE_CATD_CRDS_DIR)
127127
rm -f $(KUSTOMIZE_CATD_RBAC_DIR)/role.yaml && $(CONTROLLER_GEN) rbac:roleName=manager-role paths="./internal/catalogd/..." output:rbac:artifacts:config=$(KUSTOMIZE_CATD_RBAC_DIR)
128128
rm -f $(KUSTOMIZE_CATD_WEBHOOKS_DIR)/manifests.yaml && $(CONTROLLER_GEN) webhook paths="./internal/catalogd/..." output:webhook:artifacts:config=$(KUSTOMIZE_CATD_WEBHOOKS_DIR)
129129

@@ -358,12 +358,12 @@ API_REFERENCE_DIR := $(ROOT_DIR)/docs/api-reference
358358

359359
crd-ref-docs: $(CRD_REF_DOCS) #EXHELP Generate the API Reference Documents.
360360
rm -f $(API_REFERENCE_DIR)/$(OPERATOR_CONTROLLER_API_REFERENCE_FILENAME)
361-
$(CRD_REF_DOCS) --source-path=$(ROOT_DIR)/api \
361+
$(CRD_REF_DOCS) --source-path=$(ROOT_DIR)/api/operator-controller \
362362
--config=$(API_REFERENCE_DIR)/crd-ref-docs-gen-config.yaml \
363363
--renderer=markdown --output-path=$(API_REFERENCE_DIR)/$(OPERATOR_CONTROLLER_API_REFERENCE_FILENAME);
364364

365365
rm -f $(API_REFERENCE_DIR)/$(CATALOGD_API_REFERENCE_FILENAME)
366-
$(CRD_REF_DOCS) --source-path=$(ROOT_DIR)/catalogd/api \
366+
$(CRD_REF_DOCS) --source-path=$(ROOT_DIR)/api/catalogd \
367367
--config=$(API_REFERENCE_DIR)/crd-ref-docs-gen-config.yaml \
368368
--renderer=markdown --output-path=$(API_REFERENCE_DIR)/$(CATALOGD_API_REFERENCE_FILENAME);
369369

Tiltfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ operator_controller = {
66
'binaries': {
77
'./cmd/operator-controller': 'operator-controller-controller-manager',
88
},
9-
'deps': ['api', 'cmd/operator-controller', 'internal', 'pkg', 'go.mod', 'go.sum'],
9+
'deps': ['api/operator-controller', 'cmd/operator-controller', 'internal/operator-controller', 'internal/shared', 'go.mod', 'go.sum'],
1010
'starting_debug_port': 30000,
1111
}
1212
deploy_repo('operator-controller', operator_controller, '-tags containers_image_openpgp')
@@ -17,7 +17,7 @@ catalogd = {
1717
'binaries': {
1818
'./catalogd/cmd/catalogd': 'catalogd-controller-manager',
1919
},
20-
'deps': ['catalogd/api', 'catalogd/cmd/catalogd', 'catalogd/internal', 'catalogd/pkg', 'go.mod', 'go.sum'],
20+
'deps': ['api/catalogd', 'catalogd/cmd/catalogd', 'internal/catalogd', 'internal/shared', 'go.mod', 'go.sum'],
2121
'starting_debug_port': 20000,
2222
}
2323

catalogd/api/doc.go renamed to api/catalogd/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
//go:generate apiregister-gen --input-dirs ./... -h ../../boilerplate.go.txt
17+
//go:generate apiregister-gen --input-dirs ./... -h ../../hack/boilerplate.go.txt
1818

1919
//
2020
// +domain=operatorframework.io

0 commit comments

Comments
 (0)