-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial operatorhub templates (#64)
* Add initial operatorhub templates * Fix CI: yaml -> yml * Add ordered list; Set namespace from cli or applier
- Loading branch information
1 parent
9e9c193
commit 65ff835
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# OperatorHub | ||
|
||
The below templates are used to deploy Operators from OperatorHub without having to interact with the WebUI. | ||
|
||
To do this you would create the following in order: | ||
|
||
1. [OperatorGroup](operatorgroup.yml) | ||
1. [CatalogSourceConfig](catalogsourceconfig.yml) | ||
1. [Subscription](subscription.yml) | ||
|
||
For more details, you can see the documention [here](https://docs.openshift.com/container-platform/4.1/applications/operators/olm-adding-operators-to-cluster.html#olm-installing-operator-from-operatorhub-using-cli_olm-adding-operators-to-a-cluster). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Template | ||
message: |- | ||
The following CatalogSourceConfig has been created: ${NAME} | ||
metadata: | ||
name: catalogsourceconfig-template | ||
objects: | ||
- apiVersion: operators.coreos.com/v1 | ||
kind: CatalogSourceConfig | ||
metadata: | ||
name: ${NAME} | ||
spec: | ||
packages: "${OPERATORS}" | ||
targetNamespace: "${OPERATOR_NAMESPACE}" | ||
parameters: | ||
- name: NAME | ||
required: true | ||
description: Name of the CatalogSourceConfig to create | ||
- name: OPERATOR_NAMESPACE | ||
value: openshift-operators | ||
description: Namespace where you want the operator to be available | ||
- name: OPERATORS | ||
required: true | ||
description: a single or comma-seperated list of operators which you want to subscribe to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Template | ||
message: |- | ||
The following OperatorGroup has been created: ${NAME} | ||
metadata: | ||
name: operatorgroup-template | ||
objects: | ||
- apiVersion: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: ${NAME} | ||
spec: | ||
targetNamespaces: | ||
- ${TARGET_NAMESPACE} | ||
parameters: | ||
- name: NAME | ||
required: true | ||
description: Name of the OperatorGroup to create | ||
- name: TARGET_NAMESPACE | ||
required: true | ||
description: A namespace for the OperatorGroup to target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Template | ||
message: |- | ||
The following subscription has been created: ${NAME} | ||
metadata: | ||
name: subscription-template | ||
objects: | ||
- apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: "${NAME}" | ||
spec: | ||
channel: "${CHANNEL}" | ||
installPlanApproval: ${INSTALL_PLAN} | ||
name: ${OPERATOR_NAME} | ||
source: ${CATALOG_SOURCE_NAME} | ||
sourceNamespace: ${OPERATOR_NAMESPACE} | ||
parameters: | ||
- name: NAME | ||
required: true | ||
description: Name of the subscription you would like to create | ||
- name: OPERATOR_NAME | ||
required: true | ||
description: Name of the operator you would like to subscribe to | ||
- name: OPERATOR_NAMESPACE | ||
value: openshift-operators | ||
description: Namespace where the operator is running | ||
- name: CHANNEL | ||
value: preview | ||
description: Name of the channel that you are subscribing to | ||
- name: INSTALL_PLAN | ||
value: Automatic | ||
description: Install plan that you would like to use (Automatic or Manual) | ||
- name: CATALOG_SOURCE_NAME | ||
required: true | ||
description: Name of the catalog source item that was created |