|
| 1 | + |
| 2 | + |
| 3 | +. Run the following command in your terminal to create the `rhdh-operator` namespace where the Operator is installed: |
| 4 | ++ |
| 5 | +-- |
| 6 | +[source,terminal] |
| 7 | +---- |
| 8 | +kubectl create namespace rhdh-operator |
| 9 | +---- |
| 10 | +-- |
| 11 | + |
| 12 | +. Create a pull secret in the `olm` namespace using the following command: |
| 13 | ++ |
| 14 | +-- |
| 15 | +[source,terminal] |
| 16 | +---- |
| 17 | +kubectl -n olm create secret docker-registry rhdh-pull-secret \ |
| 18 | + --docker-server=registry.redhat.io \ |
| 19 | + --docker-username=<user_name> \ <1> |
| 20 | + --docker-password=<password> \ <2> |
| 21 | + --docker-email=<email> <3> |
| 22 | +---- |
| 23 | + |
| 24 | +<1> Enter your username in the command. |
| 25 | +<2> Enter your password in the command. |
| 26 | +<3> Enter your email address in the command. |
| 27 | + |
| 28 | +The created pull secret is used to pull the Operator images from the {company-name} Ecosystem. |
| 29 | +-- |
| 30 | + |
| 31 | +. Create a `CatalogSource` resource in the `olm` namespace that contains the Operators from the {company-name} Ecosystem: |
| 32 | ++ |
| 33 | +-- |
| 34 | +[source,terminal,subs="attributes+"] |
| 35 | +---- |
| 36 | +cat <<EOF | kubectl -n olm apply -f - |
| 37 | +apiVersion: operators.coreos.com/v1alpha1 |
| 38 | +kind: CatalogSource |
| 39 | +metadata: |
| 40 | + name: redhat-catalog |
| 41 | +spec: |
| 42 | + sourceType: grpc |
| 43 | + image: registry.redhat.io/redhat/redhat-operator-index:v{ocp-version} |
| 44 | + secrets: |
| 45 | + - "rhdh-pull-secret" |
| 46 | + displayName: {company-name} Operators |
| 47 | +EOF |
| 48 | +---- |
| 49 | +-- |
| 50 | + |
| 51 | +. Wait a few minutes until the Catalog Source is up and run the following command to list the available operators from the {company-name} ecosystem and confirm that the `rhdh` operator is listed: |
| 52 | ++ |
| 53 | +-- |
| 54 | +[source,terminal,subs="attributes+"] |
| 55 | +---- |
| 56 | +kubectl -n olm get packagemanifests |
| 57 | +---- |
| 58 | +-- |
| 59 | + |
| 60 | +. Create a pull secret in the `rhdh-operator` namespace using the following command: |
| 61 | ++ |
| 62 | +-- |
| 63 | +[source,terminal] |
| 64 | +---- |
| 65 | +kubectl -n rhdh-operator create secret docker-registry rhdh-pull-secret \ |
| 66 | + --docker-server=registry.redhat.io \ |
| 67 | + --docker-username=<user_name> \ <1> |
| 68 | + --docker-password=<password> \ <2> |
| 69 | + --docker-email=<email> <3> |
| 70 | +---- |
| 71 | + |
| 72 | +<1> Enter your username in the command. |
| 73 | +<2> Enter your password in the command. |
| 74 | +<3> Enter your email address in the command. |
| 75 | + |
| 76 | +The created pull secret is used to pull the {product-short} images from the {company-name} Ecosystem. |
| 77 | +-- |
| 78 | + |
| 79 | +. Create an `OperatorGroup` resource as follows: |
| 80 | ++ |
| 81 | +-- |
| 82 | +[source,terminal] |
| 83 | +---- |
| 84 | +cat <<EOF | kubectl apply -n rhdh-operator -f - |
| 85 | +apiVersion: operators.coreos.com/v1 |
| 86 | +kind: OperatorGroup |
| 87 | +metadata: |
| 88 | + name: rhdh-operator-group |
| 89 | +EOF |
| 90 | +---- |
| 91 | +-- |
| 92 | + |
| 93 | +. Create a `Subscription` resource using the following code: |
| 94 | ++ |
| 95 | +-- |
| 96 | +[source,terminal,subs="attributes+"] |
| 97 | +---- |
| 98 | +cat <<EOF | kubectl apply -n rhdh-operator -f - |
| 99 | +apiVersion: operators.coreos.com/v1alpha1 |
| 100 | +kind: Subscription |
| 101 | +metadata: |
| 102 | + name: rhdh |
| 103 | + namespace: rhdh-operator |
| 104 | +spec: |
| 105 | + channel: fast |
| 106 | + installPlanApproval: Automatic |
| 107 | + name: rhdh |
| 108 | + source: redhat-catalog |
| 109 | + sourceNamespace: olm |
| 110 | + startingCSV: rhdh-operator.v{product-bundle-version} |
| 111 | +EOF |
| 112 | +---- |
| 113 | +-- |
| 114 | + |
| 115 | +. Run the following command to verify that the created Operator is running: |
| 116 | ++ |
| 117 | +-- |
| 118 | +[source,terminal] |
| 119 | +---- |
| 120 | +kubectl -n rhdh-operator get pods -w |
| 121 | +---- |
| 122 | + |
| 123 | +If the operator pod shows `ImagePullBackOff` status, then you might need permissions to pull the image directly within the Operator deployment's manifest. |
| 124 | + |
| 125 | +[TIP] |
| 126 | +==== |
| 127 | +You can include the required secret name in the `deployment.spec.template.spec.imagePullSecrets` list and verify the deployment name using `kubectl get deployment -n rhdh-operator` command: |
| 128 | +
|
| 129 | +[source,terminal] |
| 130 | +---- |
| 131 | +kubectl -n rhdh-operator patch deployment \ |
| 132 | + rhdh.fast --patch '{"spec":{"template":{"spec":{"imagePullSecrets":[{"name":"rhdh-pull-secret"}]}}}}' \ |
| 133 | + --type=merge |
| 134 | +---- |
| 135 | +==== |
| 136 | +-- |
| 137 | + |
| 138 | +. Update the default configuration of the operator to ensure that {product-short} resources can start correctly using the following steps: |
| 139 | +.. Edit the `backstage-default-config` ConfigMap in the `rhdh-operator` namespace using the following command: |
| 140 | ++ |
| 141 | +-- |
| 142 | +[source,terminal] |
| 143 | +---- |
| 144 | +kubectl -n rhdh-operator edit configmap backstage-default-config |
| 145 | +---- |
| 146 | +-- |
0 commit comments