Skip to content

Commit 2f0178f

Browse files
Merge pull request #83 from openshift-bot/synchronize-upstream
NO-ISSUE: Synchronize From Upstream Repositories
2 parents 1eacfde + a856711 commit 2f0178f

File tree

11 files changed

+206
-180
lines changed

11 files changed

+206
-180
lines changed

commitchecker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
expectedMergeBase: 38da6fc3c70c60d4da570333a3e5fc005192d44f
1+
expectedMergeBase: 8cdb7c32aea04da553811232b790d73c1702c49c
22
upstreamBranch: main
33
upstreamOrg: operator-framework
44
upstreamRepo: operator-controller

config/default/kustomization.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ resources:
2626
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2727
#- ../prometheus
2828

29-
patches:
30-
# Protect the /metrics endpoint by putting it behind auth.
31-
# If you want your controller-manager to expose the /metrics
32-
# endpoint w/o any authn/z, please comment the following line.
33-
- path: manager_auth_proxy_patch.yaml
34-
35-
36-
3729
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
3830
# crd/kustomization.yaml
3931
#- manager_webhook_patch.yaml

config/default/manager_auth_proxy_patch.yaml

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

config/manager/manager.yaml

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,22 @@ spec:
2828
labels:
2929
control-plane: controller-manager
3030
spec:
31-
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
32-
# according to the platforms which are supported by your solution.
33-
# It is considered best practice to support multiple architectures. You can
34-
# build your manager image using the makefile target docker-buildx.
35-
# affinity:
36-
# nodeAffinity:
37-
# requiredDuringSchedulingIgnoredDuringExecution:
38-
# nodeSelectorTerms:
39-
# - matchExpressions:
40-
# - key: kubernetes.io/arch
41-
# operator: In
42-
# values:
43-
# - amd64
44-
# - arm64
45-
# - ppc64le
46-
# - s390x
47-
# - key: kubernetes.io/os
48-
# operator: In
49-
# values:
50-
# - linux
31+
affinity:
32+
nodeAffinity:
33+
requiredDuringSchedulingIgnoredDuringExecution:
34+
nodeSelectorTerms:
35+
- matchExpressions:
36+
- key: kubernetes.io/arch
37+
operator: In
38+
values:
39+
- amd64
40+
- arm64
41+
- ppc64le
42+
- s390x
43+
- key: kubernetes.io/os
44+
operator: In
45+
values:
46+
- linux
5147
securityContext:
5248
runAsNonRoot: true
5349
seccompProfile:
@@ -56,7 +52,10 @@ spec:
5652
- command:
5753
- /manager
5854
args:
59-
- --leader-elect
55+
- "--health-probe-bind-address=:8081"
56+
- "--metrics-bind-address=127.0.0.1:8080"
57+
- "--leader-elect"
58+
- "--feature-gates=ForceSemverUpgradeConstraints=true"
6059
image: controller:latest
6160
imagePullPolicy: IfNotPresent
6261
name: manager
@@ -86,6 +85,26 @@ spec:
8685
requests:
8786
cpu: 10m
8887
memory: 64Mi
88+
- name: kube-rbac-proxy
89+
securityContext:
90+
allowPrivilegeEscalation: false
91+
capabilities:
92+
drop:
93+
- "ALL"
94+
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
95+
args:
96+
- "--secure-listen-address=0.0.0.0:8443"
97+
- "--upstream=http://127.0.0.1:8080/"
98+
- "--logtostderr=true"
99+
- "--v=0"
100+
ports:
101+
- containerPort: 8443
102+
protocol: TCP
103+
name: https
104+
resources:
105+
requests:
106+
cpu: 5m
107+
memory: 64Mi
89108
serviceAccountName: controller-manager
90109
terminationGracePeriodSeconds: 10
91110
volumes:

docs/Tasks/adding-a-catalog.md

Lines changed: 126 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,126 @@
1-
Extension authors have the mechanisms to offer their product as part of a curated catalog of extensions, that they can push updates to over-the-air (eg publish new versions, publish patched versions with CVEs, etc). Cluster admins can sign up to receive these updates on clusters, by adding the catalog to the cluster. When a catalog is added to a cluster, the kubernetes extension packages in that catalog become available on cluster for installation and receiving updates.
2-
3-
For example, the [k8s-operatorhub/community-operators](https://github.com/k8s-operatorhub/community-operators) is a catalog of curated extensions that contains a list of extensions being developed by the community. The list of extensions can be viewed in [Operatorhub.io](https://operatorhub.io). This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://quay.io/repository/operatorhubio/catalog?tag=latest&tab=tags) for consumption on clusters.
4-
5-
To consume this catalog on cluster, create a `Catalog` Custom Resource(CR) with the image specified in the `spec.source.image` field:
6-
7-
```bash
8-
$ kubectl apply -f - <<EOF
9-
apiVersion: catalogd.operatorframework.io/v1alpha1
10-
kind: Catalog
11-
metadata:
12-
name: operatorhubio
13-
spec:
14-
source:
15-
type: image
16-
image:
17-
ref: quay.io/operatorhubio/catalog:latest
18-
EOF
19-
```
20-
21-
The packages made available for installation/receiving updates on cluster can then be explored by querying the `Package` and `BundleMetadata` CRs:
22-
23-
```bash
24-
$ kubectl get packages
25-
NAME AGE
26-
operatorhubio-ack-acm-controller 3m12s
27-
operatorhubio-ack-apigatewayv2-controller 3m12s
28-
operatorhubio-ack-applicationautoscaling-controller 3m12s
29-
operatorhubio-ack-cloudtrail-controller 3m12s
30-
operatorhubio-ack-dynamodb-controller 3m12s
31-
operatorhubio-ack-ec2-controller 3m12s
32-
operatorhubio-ack-ecr-controller 3m12s
33-
operatorhubio-ack-eks-controller 3m12s
34-
operatorhubio-ack-elasticache-controller 3m12s
35-
operatorhubio-ack-emrcontainers-controller 3m12s
36-
operatorhubio-ack-eventbridge-controller 3m12s
37-
operatorhubio-ack-iam-controller 3m12s
38-
operatorhubio-ack-kinesis-controller 3m12s
39-
operatorhubio-ack-kms-controller 3m12s
40-
operatorhubio-ack-lambda-controller 3m12s
41-
operatorhubio-ack-memorydb-controller 3m12s
42-
operatorhubio-ack-mq-controller 3m12s
43-
operatorhubio-ack-opensearchservice-controller 3m12s
44-
.
45-
.
46-
.
47-
48-
$ kubectl get bundlemetadata
49-
NAME AGE
50-
operatorhubio-ack-acm-controller.v0.0.1 3m58s
51-
operatorhubio-ack-acm-controller.v0.0.2 3m58s
52-
operatorhubio-ack-acm-controller.v0.0.4 3m58s
53-
operatorhubio-ack-acm-controller.v0.0.5 3m58s
54-
operatorhubio-ack-acm-controller.v0.0.6 3m58s
55-
operatorhubio-ack-apigatewayv2-controller.v0.0.10 3m58s
56-
operatorhubio-ack-apigatewayv2-controller.v0.0.11 3m58s
57-
operatorhubio-ack-apigatewayv2-controller.v0.0.12 3m58s
58-
operatorhubio-ack-apigatewayv2-controller.v0.0.13 3m58s
59-
operatorhubio-ack-apigatewayv2-controller.v0.0.14 3m58s
60-
operatorhubio-ack-apigatewayv2-controller.v0.0.15 3m58s
61-
operatorhubio-ack-apigatewayv2-controller.v0.0.16 3m58s
62-
operatorhubio-ack-apigatewayv2-controller.v0.0.17 3m58s
63-
operatorhubio-ack-apigatewayv2-controller.v0.0.18 3m58s
64-
operatorhubio-ack-apigatewayv2-controller.v0.0.19 3m58s
65-
operatorhubio-ack-apigatewayv2-controller.v0.0.20 3m58s
66-
operatorhubio-ack-apigatewayv2-controller.v0.0.21 3m58s
67-
operatorhubio-ack-apigatewayv2-controller.v0.0.22 3m58s
68-
operatorhubio-ack-apigatewayv2-controller.v0.0.9 3m58s
69-
operatorhubio-ack-apigatewayv2-controller.v0.1.0 3m58s
70-
operatorhubio-ack-apigatewayv2-controller.v0.1.1 3m58s
71-
operatorhubio-ack-apigatewayv2-controller.v0.1.2 3m58s
72-
operatorhubio-ack-apigatewayv2-controller.v0.1.3 3m58s
73-
.
74-
.
75-
.
76-
```
1+
# Adding a catalog of extensions to a cluster
2+
3+
Extension authors can publish their products in catalogs.
4+
Catalogs are curated collections of Kubernetes extensions, such as Operators.
5+
Cluster administrators can add these catalogs to their cluster.
6+
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.
7+
8+
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.
9+
You can see the available extensions at [Operatorhub.io](https://operatorhub.io).
10+
This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://quay.io/repository/operatorhubio/catalog?tag=latest&tab=tags) that can be installed on clusters.
11+
12+
## Prerequisites
13+
14+
* Access to a Kubernetes cluster, for example `kind`, using an account with `cluster-admin` permissions
15+
* [Operator Controller installed](https://github.com/operator-framework/operator-controller/releases) on the cluster
16+
* [Catalogd installed](https://github.com/operator-framework/catalogd/releases/) on the cluster
17+
* Kubernetes CLI (`kubectl`) installed on your workstation
18+
19+
## Procedure
20+
21+
1. Create a catalog custom resource (CR):
22+
23+
``` yaml title="catalog_cr.yaml"
24+
apiVersion: catalogd.operatorframework.io/v1alpha1
25+
kind: Catalog
26+
metadata:
27+
name: operatorhubio
28+
spec:
29+
source:
30+
type: image
31+
image:
32+
ref: <catalog_image>
33+
pollInterval: <poll_interval_duration>
34+
```
35+
36+
`catalog_name`
37+
: Specifies the image reference for the catalog you want to install, such as `quay.io/operatorhubio/catalog:latest`.
38+
39+
`poll_interval_duration`
40+
: Specifies the interval for polling the remote registry for newer image digests.
41+
The default value is `24h`.
42+
Valid units include seconds (`s`), minutes (`m`), and hours (`h`).
43+
To disable polling, set a zero value, such as `0s`.
44+
45+
``` yaml title="Example `operatorhubio.yaml` CR"
46+
apiVersion: catalogd.operatorframework.io/v1alpha1
47+
kind: Catalog
48+
metadata:
49+
name: operatorhub
50+
spec:
51+
source:
52+
type: image
53+
image:
54+
ref: quay.io/operatorhubio/catalog:latest
55+
pollInterval: 1h
56+
```
57+
58+
2. Apply the catalog CR:
59+
60+
``` terminal
61+
$ kubectl apply -f <catalog_cr>.yaml
62+
```
63+
64+
``` text title="Example output"
65+
catalog.catalogd.operatorframework.io/redhat-operators created
66+
```
67+
68+
### Verification
69+
70+
* Run the following commands to verify the status of your catalog:
71+
72+
* Check if your catalog is available on the cluster:
73+
74+
``` terminal
75+
$ kubectl get catalog
76+
```
77+
78+
``` terminal title="Example output"
79+
NAME PHASE AGE
80+
operatorhubio 9s
81+
```
82+
83+
* Check the status of your catalog:
84+
85+
``` terminal
86+
$ kubectl describe catalog
87+
```
88+
89+
``` terminal title="Example output"
90+
Name: operatorhubio
91+
Namespace:
92+
Labels: <none>
93+
Annotations: <none>
94+
API Version: catalogd.operatorframework.io/v1alpha1
95+
Kind: Catalog
96+
Metadata:
97+
Creation Timestamp: 2024-03-12T19:34:50Z
98+
Finalizers:
99+
catalogd.operatorframework.io/delete-server-cache
100+
Generation: 2
101+
Resource Version: 6469
102+
UID: 2e2778cb-dda6-4645-96b7-992e8dd37503
103+
Spec:
104+
Source:
105+
Image:
106+
Poll Interval: 15m0s
107+
Ref: quay.io/operatorhubio/catalog:latest
108+
Type: image
109+
Status:
110+
Conditions:
111+
Last Transition Time: 2024-03-12T19:35:34Z
112+
Message:
113+
Reason: UnpackSuccessful
114+
Status: True
115+
Type: Unpacked
116+
Content URL: http://catalogd-catalogserver.catalogd-system.svc/catalogs/operatorhubio/all.json
117+
Observed Generation: 2
118+
Phase: Unpacked
119+
Resolved Source:
120+
Image:
121+
Last Poll Attempt: 2024-03-12T19:35:26Z
122+
Ref: quay.io/operatorhubio/catalog:latest
123+
Resolved Ref: quay.io/operatorhubio/catalog@sha256:dee29aaed76fd1c72b654b9bc8bebc4b48b34fd8d41ece880524dc0c3c1c55ec
124+
Type: image
125+
Events: <none>
126+
```

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mergedeep==1.3.4
1616
mkdocs==1.5.3
1717
mkdocs-material==9.5.13
1818
mkdocs-material-extensions==1.3.1
19-
packaging==23.2
19+
packaging==24.0
2020
paginate==0.5.6
2121
pathspec==0.12.1
2222
platformdirs==4.2.0

mkdocs.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,15 @@ nav:
1414
- Explore extensions available for installation: 'Tasks/explore-available-packages.md'
1515
- Installing an extension: 'Tasks/installing-an-extension.md'
1616
- Deleting an extension: 'Tasks/uninstall-an-extension.md'
17+
18+
markdown_extensions:
19+
- pymdownx.highlight:
20+
anchor_linenums: true
21+
line_spans: __span
22+
pygments_lang_class: true
23+
- pymdownx.inlinehilite
24+
- pymdownx.snippets
25+
- pymdownx.superfences
26+
- def_list
27+
- pymdownx.tasklist:
28+
custom_checkbox: true

netlify.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# netlify.toml
2+
[build]
3+
command = "mkdocs build"
4+
publish = "site"

0 commit comments

Comments
 (0)