Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 Update docs for catalogd TLS and other cleanup #940

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OLM’s purpose is to provide APIs, controllers, and tooling that support the pa

OLM v1 is the follow-up to OLM v0, located [here](https://github.com/operator-framework/operator-lifecycle-manager).

OLM v1 consists of four different components:
OLM v1 consists of three different components:
* operator-controller (this repository)
* [deppy](https://github.com/operator-framework/deppy)
* [catalogd](https://github.com/operator-framework/catalogd)
Expand Down Expand Up @@ -90,7 +90,7 @@ More information can be found via the [Kubebuilder Documentation](https://book.k

## License

Copyright 2022-2023.
Copyright 2022-2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
26 changes: 13 additions & 13 deletions docs/Tasks/adding-a-catalog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Adding a catalog of extensions to a cluster

Extension authors can publish their products in catalogs.
Catalogs are curated collections of Kubernetes extensions, such as Operators.
Cluster administrators can add these catalogs to their cluster.
Cluster administrators can enable polling to get over-the-air updates to catalogs when extension authors publish changes such as bug fixes and new features.
ClusterCatalogs are curated collections of Kubernetes extensions, such as Operators.
Cluster administrators can add these ClusterCatalogs to their cluster.
Cluster administrators can enable polling to get over-the-air updates to ClusterCatalogs when extension authors publish changes such as bug fixes and new features.

For example, the [Kubernetes community Operators catalog](https://github.com/k8s-operatorhub/community-operators) is a catalog of curated extensions that is developed by the Kubernetes community.
You can see the available extensions at [Operatorhub.io](https://operatorhub.io).
Expand All @@ -20,9 +20,9 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://

1. Create a catalog custom resource (CR):

``` yaml title="catalog_cr.yaml"
``` yaml title="clustercatalog_cr.yaml"
apiVersion: catalogd.operatorframework.io/v1alpha1
kind: Catalog
kind: ClusterCatalog
metadata:
name: operatorhubio
spec:
Expand All @@ -44,7 +44,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://

``` yaml title="Example `operatorhubio.yaml` CR"
apiVersion: catalogd.operatorframework.io/v1alpha1
kind: Catalog
kind: ClusterCatalog
metadata:
name: operatorhub
spec:
Expand All @@ -55,14 +55,14 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
pollInterval: 1h
```
2. Apply the catalog CR:
2. Apply the ClusterCatalog CR:
``` terminal
$ kubectl apply -f <catalog_cr>.yaml
kubectl apply -f <clustercatalog_cr>.yaml
```

``` text title="Example output"
catalog.catalogd.operatorframework.io/redhat-operators created
clustercatalog.catalogd.operatorframework.io/operatorhubio created
```

### Verification
Expand All @@ -72,7 +72,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
* Check if your catalog is available on the cluster:

``` terminal
$ kubectl get catalog
kubectl get clustercatalog
```

``` terminal title="Example output"
Expand All @@ -83,7 +83,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
* Check the status of your catalog:

``` terminal
$ kubectl describe catalog
kubectl describe clustercatalog
```

``` terminal title="Example output"
Expand All @@ -92,7 +92,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
Labels: <none>
Annotations: <none>
API Version: catalogd.operatorframework.io/v1alpha1
Kind: Catalog
Kind: ClusterCatalog
Metadata:
Creation Timestamp: 2024-03-12T19:34:50Z
Finalizers:
Expand All @@ -113,7 +113,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
Reason: UnpackSuccessful
Status: True
Type: Unpacked
Content URL: http://catalogd-catalogserver.olmv1-system.svc/catalogs/operatorhubio/all.json
Content URL: https://catalogd-catalogserver.olmv1-system.svc/catalogs/operatorhubio/all.json
Observed Generation: 2
Phase: Unpacked
Resolved Source:
Expand Down
13 changes: 8 additions & 5 deletions docs/Tasks/explore-available-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ Then you can query the catalog by using `curl` commands and the `jq` CLI tool to

## Prerequisites

* You have added a catalog of extensions, such as [OperatorHub.io](https://operatorhub.io), to your cluster.
* You have added a ClusterCatalog of extensions, such as [OperatorHub.io](https://operatorhub.io), to your cluster.
* You have installed the `jq` CLI tool.

**Note:** By default, Catalogd is installed with TLS enabled for the catalog webserver.
The following examples will show this default behavior, but for simplicity's sake will ignore TLS verification in the curl commands using the `-k` flag.

## Procedure

1. Port forward the catalog server service:

``` terminal
$ kubectl -n olmv1-system port-forward svc/catalogd-catalogserver 8080:80
kubectl -n olmv1-system port-forward svc/catalogd-catalogserver 8443:443
```

2. Return a list of all the extensions in a catalog:
``` terminal
$ curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.package") | .name'
curl -k https://localhost:8443/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.package") | .name'
```

??? success
Expand Down Expand Up @@ -86,7 +89,7 @@ Then you can query the catalog by using `curl` commands and the `jq` CLI tool to
* Return list of packages that support `AllNamespaces` install mode and do not use webhooks:

``` terminal
$ curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -c 'select(.schema == "olm.bundle") | {"package":.package, "version":.properties[] | select(.type == "olm.bundle.object").value.data | @base64d | fromjson | select(.kind == "ClusterServiceVersion" and (.spec.installModes[] | select(.type == "AllNamespaces" and .supported == true) != null) and .spec.webhookdefinitions == null).spec.version}'
curl -k https://localhost:8443/catalogs/operatorhubio/all.json | jq -c 'select(.schema == "olm.bundle") | {"package":.package, "version":.properties[] | select(.type == "olm.bundle.object").value.data | @base64d | fromjson | select(.kind == "ClusterServiceVersion" and (.spec.installModes[] | select(.type == "AllNamespaces" and .supported == true) != null) and .spec.webhookdefinitions == null).spec.version}'
```

??? success
Expand Down Expand Up @@ -117,7 +120,7 @@ Then you can query the catalog by using `curl` commands and the `jq` CLI tool to
3. Inspect the contents of an extension's metadata:

``` terminal
$ curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select( .schema == "olm.package") | select( .name == "<package_name>")'
curl -k https://localhost:8443/catalogs/operatorhubio/all.json | jq -s '.[] | select( .schema == "olm.package") | select( .name == "<package_name>")'
```

`package_name`
Expand Down
4 changes: 2 additions & 2 deletions docs/Tasks/installing-an-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ After you add a catalog to your cluster, you can install an extension by creatin
2. Apply the CR to the cluster:

``` terminal
$ kubectl apply -f <cr_name>.yaml
kubectl apply -f <cr_name>.yaml
```

??? success
Expand All @@ -67,7 +67,7 @@ After you add a catalog to your cluster, you can install an extension by creatin
* Describe the installed extension:

``` terminal
$ kubectl describe clusterextensions
kubectl describe clusterextensions
```

??? success
Expand Down
4 changes: 2 additions & 2 deletions docs/Tasks/uninstall-an-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can uninstall a Kubernetes extension and its associated custom resource defi
* Delete the extension's CR:

``` terminal
$ kubectl delete clusterextensions <extension_name>
kubectl delete clusterextensions <extension_name>
```

`extension_name`
Expand All @@ -26,7 +26,7 @@ You can uninstall a Kubernetes extension and its associated custom resource defi
* Verify that the Kubernetes extension is deleted:

``` terminal
$ kubectl get clusterextension.olm.operatorframework.io
kubectl get clusterextension.olm.operatorframework.io
```

``` text title="Example output"
Expand Down
8 changes: 7 additions & 1 deletion docs/refs/catalog-queries.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Catalog queries

**Note:** By default, Catalogd is installed with TLS enabled for the catalog webserver.
The following examples will show this default behavior, but for simplicity's sake will ignore TLS verification in the curl commands using the `-k` flag.


You can use the `curl` command with `jq` to query catalogs that are installed on your cluster.

``` terminal title="Query syntax"
$ curl http://localhost:8080/catalogs/operatorhubio/all.json | <query>
curl -k https://localhost:8443/catalogs/operatorhubio/all.json | <query>
```



## Package queries

Available packages in a catalog
Expand Down
Loading