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