Skip to content

Commit 19c9a18

Browse files
authored
Automate catalog item creation (#213)
* update: exclude spellcheck on INFO.md * add: generate operator files script * refactor: ack-controllers * refactor: opendatahub operator * refactor: nfd operator * refactor: openshift-gitops-operator * refactor: serverless operator * fix: README path * fix: script linting * refactor: gitops operator * update: volsync * refactor: volsync * fix: linting * update: web terminal * remove: old files * fix: bases to resources * remove: old files * update: openshift-gitops-operator * update: README.md bases to resources * update: bases to resources * update: cleanup whitespace * update: cleanup * update: odh, nfd, serverless * update: rename rhods to redhat-ods * update: ods file names * update: ods * add: operator_info.txt * fix: ods * update: serverless * update: scripts * update: rename folders to operator name * fix: README, script * update: script for better markdown * update: better markdown lint * fix: more markdown * fix: markdown info * rename: base files * update: files to operator-group.yaml * update: rename filename namespace.yaml * update: rename filename subscription.yaml * update: rename filename namespace.yaml * fix: wordlist * undo: markdown code snippet * cleanup: nmstate * cleanup: s3 operator * update: info, script * cleanup: patchesJson6902 * update: cleanup acm * update: cleanup filenames * fix: rhods operator * fix: logic * update: wordlist * fix: linting
1 parent 2d21293 commit 19c9a18

File tree

317 files changed

+1724
-554
lines changed

Some content is hidden

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

317 files changed

+1724
-554
lines changed

.spellcheck.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ matrix:
1515
- code
1616
- pre
1717
sources:
18-
- '!venv/**|**/*.md'
18+
- '!**/INFO.md|!venv/**|**/*.md'
1919
default_encoding: utf-8

.wordlist-md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Noobaa
5050
NuGet
5151
OADP
5252
OAuth
53-
OCSInitilization
53+
OCSInitialization
5454
OLM
5555
Observability
5656
OpenDataHub
@@ -86,6 +86,7 @@ UI
8686
VolSync
8787
Workspaces
8888
ack
89+
acm
8990
amq
9091
api
9192
apiVersion
@@ -186,7 +187,7 @@ sublicense
186187
tekton
187188
templating
188189
thanos
189-
truely
190+
truly
190191
vSphere
191192
vsphere
192193
workspaces

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In general, the root folder should represent the functionality being provided wi
2121

2222
Overlays for operators should generally use the `channel` name as the name of the overlay if multiple channels are available. For example, if the channel names are `tech-preview` and `stable` then name the overlays the same corresponding to the channels.
2323

24-
When adding new objects into an example, avoid combining objects into a single yaml file. Each object should have its own yaml file that is referenced as a resource in the `kustomization.yaml` file. Some exceptions may exist, such as combining `role` and `roleBinding` into a single RBAC file.
24+
When adding new objects into an example, avoid combining objects into a single yaml file. Each object should have its own yaml file that is referenced as a resource in the `kustomization.yaml` file. Some exceptions may exist, such as combining `role` and `roleBinding` into a single RBAC file.
2525

2626
Files in this repository should use the `.yaml` extension and not `.yml`. Kustomize files should utilize `kustomization.yaml` over alternative naming options.
2727

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ The GitOps Catalog includes kustomize bases and overlays for a number of OpenShi
66

77
This catalog is not officially supported by Red Hat and customers are discouraged from referencing this repo directly as a remote repo in kustomize as future changes may break these references. Instead customers are encouraged to take individual items of interest into their own curated catalog and maintain it as their own.
88

9+
See [Operator Info](operator_info.txt) for a detailed list of dumped OpenShift operator info.
10+
911
## Catalog Refactoring for Consistency
1012

11-
Now that this catalog is part of the Red Hat Community of Practice, there will be some structural refactoring to improve consistency. If you have been using this catalog since before it was part of the `redhat-cop` organization, or at least before any refactoring has begun, be sure to include a `ref` in your `oc/kubectl` commands or `kustomization.yaml` files to avoid any negative side effects. The last tag before the repository was migrated is `v0.3`. Simply include `?ref=v0.3` at the end of the repository reference. For example:
13+
Now that this catalog is part of the Red Hat Community of Practice, there will be some structural refactoring to improve consistency. If you have been using this catalog since before it was part of the `redhat-cop` organization, or at least before any refactoring has begun, be sure to include a `ref` in your `oc/kubectl` commands or `kustomization.yaml` files to avoid any negative side effects. The last tag before the repository was migrated is `v0.3`. Simply include `?ref=v0.3` at the end of the repository reference.
14+
15+
For example:
1216

1317
```
1418
oc apply -k https://github.com/redhat-cop/gitops-catalog/jenkins2/overlays/default?ref=v0.3
@@ -24,7 +28,6 @@ resources:
2428
- github.com/redhat-cop/gitops-catalog/jenkins2/base/?ref=v0.3
2529
```
2630

27-
2831
## Usage
2932

3033
Each catalog item has (or will have) its own README in its directory root with instructions. Generally speaking, you can usually just apply a "base" or "overlay" directly in your cluster by cloning this repository and using the `-k` flag (for Kustomize) built into `oc` and `kubectl`:
@@ -56,3 +59,12 @@ resources:
5659

5760
This enables you to patch these resources for your specific environments. Note that none of these bases specify a namespace, in your kustomization
5861
overlay you can include the specific namespace you want to install the tool into.
62+
63+
## Development
64+
65+
You can use the following to help you create the basic structure for an operator.
66+
67+
```
68+
# load functions
69+
source scripts/automate_operators.sh
70+
```

ack-controllers/aggregate/popular/kustomization.yaml

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

ack-ec2-controller/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ As part of a different overlay in your own GitOps repo:
2626
```
2727
apiVersion: kustomize.config.k8s.io/v1beta1
2828
kind: Kustomization
29-
bases:
29+
resources:
3030
- github.com/redhat-cop/gitops-catalog/ack-ec2-controller/operator/overlays/<channel>?ref=main
3131
```
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

4-
bases:
5-
- ../../ack-controllers/base
6-
74
resources:
8-
- install.yaml
5+
- ../../../ack-system/base
6+
- subscription.yaml

ack-ec2-controller/base/install.yaml renamed to ack-ec2-controller/operator/base/subscription.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
---
21
apiVersion: operators.coreos.com/v1alpha1
32
kind: Subscription
43
metadata:
5-
labels:
6-
operators.coreos.com/ack-ec2-controller.ack-system: ""
74
name: ack-ec2-controller
85
namespace: ack-system
96
spec:
10-
channel: patch-me
7+
channel: patch-me-see-overlays-dir
118
installPlanApproval: Automatic
129
name: ack-ec2-controller
1310
source: community-operators

ack-ec2-controller/overlays/alpha/kustomization.yaml renamed to ack-ec2-controller/operator/overlays/alpha/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44

5-
bases:
5+
resources:
66
- ../../base
77

88
patches:

0 commit comments

Comments
 (0)