Skip to content

Commit

Permalink
(refactor): Remove deprecated CatalogMetadata and associated code (#169)
Browse files Browse the repository at this point in the history
* (refactor): Remove deprecated CatalogMetadata and associated code

Signed-off-by: Bryce Palmer <bpalmer@redhat.com>

* go mod tidy

Signed-off-by: Bryce Palmer <bpalmer@redhat.com>

---------

Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
  • Loading branch information
everettraven committed Sep 15, 2023
1 parent f9c6bcf commit 21ba18e
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 632 deletions.
92 changes: 40 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,81 +91,69 @@ Catalogd helps customers discover installable content by hosting catalog metadat
Events: <none>
```
1. Port forward the `catalogd-catalogserver` service in the `catalogd-system` namespace:
```sh
$ kubectl -n catalogd-system port-forward svc/catalogd-catalogserver 8080:80
```
1. Run the following command to get a list of packages:
```sh
$ kubectl get catalogmetadata -l schema=olm.package
$ curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.package") | .name'
```
*Example output*
```sh
NAME AGE
operatorhubio-olm.package-ack-acm-controller 18m
operatorhubio-olm.package-ack-apigatewayv2-controller 18m
operatorhubio-olm.package-ack-applicationautoscaling-controller 18m
operatorhubio-olm.package-ack-cloudtrail-controller 18m
operatorhubio-olm.package-ack-cloudwatch-controller 18m
operatorhubio-olm.package-ack-dynamodb-controller 18m
operatorhubio-olm.package-ack-ec2-controller 18m
operatorhubio-olm.package-ack-ecr-controller 18m
operatorhubio-olm.package-ack-eks-controller 18m
operatorhubio-olm.package-ack-elasticache-controller 18m
operatorhubio-olm.package-ack-emrcontainers-controller 18m
operatorhubio-olm.package-ack-eventbridge-controller 18m
operatorhubio-olm.package-ack-iam-controller 18m
operatorhubio-olm.package-ack-kinesis-controller 18m
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 110M 100 110M 0 0 112M 0 --:--:-- --:--:-- --:--:-- 112M
"ack-acm-controller"
"ack-apigatewayv2-controller"
"ack-applicationautoscaling-controller"
"ack-cloudtrail-controller"
"ack-cloudwatch-controller"
"ack-dynamodb-controller"
"ack-ec2-controller"
"ack-ecr-controller"
"ack-eks-controller"
"ack-elasticache-controller"
"ack-emrcontainers-controller"
"ack-eventbridge-controller"
"ack-iam-controller"
"ack-kinesis-controller"
...
```
1. Run the following command to get a list of channels:
1. Run the following command to get a list of channels for the `ack-acm-controller` package:
```sh
$ kubectl get catalogmetadata -l olm.channel
$ curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.channel") | select(.package == "ack-acm-controller") | .name'
```
*Example output*
```sh
NAME AGE
operatorhubio-olm.channel-ack-acm-controller-alpha 21m
operatorhubio-olm.channel-ack-apigatewayv2-controller-alpha 21m
operatorhubio-olm.channel-ack-applicationautoscaling-controller-alpha 21m
operatorhubio-olm.channel-ack-cloudtrail-controller-alpha 21m
operatorhubio-olm.channel-ack-cloudwatch-controller-alpha 21m
operatorhubio-olm.channel-ack-dynamodb-controller-alpha 21m
operatorhubio-olm.channel-ack-ec2-controller-alpha 21m
operatorhubio-olm.channel-ack-ecr-controller-alpha 21m
operatorhubio-olm.channel-ack-eks-controller-alpha 21m
operatorhubio-olm.channel-ack-elasticache-controller-alpha 21m
operatorhubio-olm.channel-ack-emrcontainers-controller-alpha 21m
operatorhubio-olm.channel-ack-eventbridge-controller-alpha 21m
operatorhubio-olm.channel-ack-iam-controller-alpha 21m
operatorhubio-olm.channel-ack-kinesis-controller-alpha 21m
...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 110M 100 110M 0 0 115M 0 --:--:-- --:--:-- --:--:-- 116M
"alpha"
```
1. Run the following command to get a list of bundles:
1. Run the following command to get a list of bundles belonging to the `ack-acm-controller` package:
```sh
$ kubectl get catalogmetadata -l olm.bundle
$ curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.bundle") | select(.package == "ack-acm-controller") | .name'
```
*Example output*
```sh
NAME AGE
operatorhubio-olm.bundle-ack-acm-controller-ack-acm-controller.v0.0.1 19m
operatorhubio-olm.bundle-ack-acm-controller-ack-acm-controller.v0.0.2 19m
operatorhubio-olm.bundle-ack-acm-controller-ack-acm-controller.v0.0.4 19m
operatorhubio-olm.bundle-ack-acm-controller-ack-acm-controller.v0.0.5 19m
operatorhubio-olm.bundle-ack-acm-controller-ack-acm-controller.v0.0.6 19m
operatorhubio-olm.bundle-ack-acm-controller-ack-acm-controller.v0.0.7 19m
operatorhubio-olm.bundle-ack-apigatewayv2-controller-ack-apigatewayv2-controller.v0.0.10 19m
operatorhubio-olm.bundle-ack-apigatewayv2-controller-ack-apigatewayv2-controller.v0.0.11 19m
operatorhubio-olm.bundle-ack-apigatewayv2-controller-ack-apigatewayv2-controller.v0.0.12 19m
operatorhubio-olm.bundle-ack-apigatewayv2-controller-ack-apigatewayv2-controller.v0.0.13 19m
operatorhubio-olm.bundle-ack-apigatewayv2-controller-ack-apigatewayv2-controller.v0.0.14 19m
operatorhubio-olm.bundle-ack-apigatewayv2-controller-ack-apigatewayv2-controller.v0.0.15 19m
operatorhubio-olm.bundle-ack-apigatewayv2-controller-ack-apigatewayv2-controller.v0.0.16 19m
operatorhubio-olm.bundle-ack-apigatewayv2-controller-ack-apigatewayv2-controller.v0.0.17 19m
...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 110M 100 110M 0 0 122M 0 --:--:-- --:--:-- --:--:-- 122M
"ack-acm-controller.v0.0.1"
"ack-acm-controller.v0.0.2"
"ack-acm-controller.v0.0.4"
"ack-acm-controller.v0.0.5"
"ack-acm-controller.v0.0.6"
"ack-acm-controller.v0.0.7"
```
## Contributing
Expand Down
64 changes: 0 additions & 64 deletions api/core/v1alpha1/catalogmetadata_types.go

This file was deleted.

80 changes: 0 additions & 80 deletions api/core/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

1 change: 0 additions & 1 deletion config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# It should be run by config/default
resources:
- bases/catalogd.operatorframework.io_catalogs.yaml
- bases/catalogd.operatorframework.io_catalogmetadata.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patches:
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ spec:
- "--metrics-bind-address=127.0.0.1:8080"
- "--leader-elect"
- "--catalogs-storage-dir=/var/cache/catalogs"
- "--feature-gates=CatalogMetadataAPI=true,HTTPServer=true"
- "--feature-gates=HTTPServer=true"

12 changes: 0 additions & 12 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- catalogd.operatorframework.io
resources:
- catalogmetadata
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- catalogd.operatorframework.io
resources:
Expand Down
Loading

0 comments on commit 21ba18e

Please sign in to comment.