|
1 | 1 | // Module included in the following assemblies: |
2 | 2 | // |
3 | 3 | // * openshift_images/configuring_samples_operator.adoc |
4 | | -// * openshift_images/configuring-samples-operator.adoc |
5 | | - |
6 | 4 |
|
7 | 5 | :_mod-docs-content-type: CONCEPT |
8 | 6 | [id="samples-operator-overview_{context}"] |
9 | 7 | = Understanding the Cluster Samples Operator |
10 | 8 |
|
11 | | -During installation, the Operator creates the default configuration object for |
12 | | -itself and then creates the sample image streams and templates, including quick start templates. |
| 9 | +[role="_abstract"] |
| 10 | +During installation, the Operator creates the default configuration object for itself and then creates the sample image streams and templates, including quick start templates. |
13 | 11 |
|
14 | 12 | [NOTE] |
15 | 13 | ==== |
16 | 14 | To facilitate image stream imports from other registries that require credentials, a cluster administrator can create any additional secrets that contain the content of a Docker `config.json` file in the `openshift` namespace needed for image import. |
17 | 15 | ==== |
18 | 16 |
|
19 | | -The Cluster Samples Operator configuration is a cluster-wide resource, and the deployment is contained within the `openshift-cluster-samples-operator` namespace. |
| 17 | +The Cluster Samples Operator configuration is a cluster-wide resource. The deployment of the Operator is within the `openshift-cluster-samples-operator` namespace. |
20 | 18 |
|
21 | | -The image for the Cluster Samples Operator contains image stream and template definitions |
22 | | -for the associated {product-title} release. When each sample is created or updated, |
23 | | -the Cluster Samples Operator includes an annotation that denotes the version of |
24 | | -{product-title}. The Operator uses this annotation to ensure that each sample |
25 | | -matches the release version. Samples outside of its inventory are ignored, as |
26 | | -are skipped samples. Modifications to any samples that are managed by the |
27 | | -Operator, where that version annotation is modified or deleted, are reverted |
28 | | -automatically. |
| 19 | +The image for the Cluster Samples Operator has image stream and template definitions for the associated {product-title} release. When each sample is created or updated, the Cluster Samples Operator includes an annotation that denotes the version of {product-title}. The Operator uses this annotation to ensure that each sample matches the release version. Samples outside of its inventory are ignored, as are skipped samples. Modifications to any samples that are managed by the Operator, where that version annotation is modified or deleted, are reverted automatically. |
29 | 20 |
|
30 | 21 | [NOTE] |
31 | 22 | ==== |
32 | | -The Jenkins images are part of the image payload from |
33 | | -installation and are tagged into the image streams directly. |
| 23 | +The Jenkins images are part of the image payload from installation and are tagged into the image streams directly. |
34 | 24 | ==== |
35 | 25 |
|
36 | | -The Cluster Samples Operator configuration resource includes a finalizer which cleans up |
37 | | -the following upon deletion: |
| 26 | +The Cluster Samples Operator configuration resource includes a finalizer which cleans up the following upon deletion: |
38 | 27 |
|
39 | 28 | * Operator managed image streams. |
40 | 29 | * Operator managed templates. |
41 | 30 | * Operator generated configuration resources. |
42 | 31 | * Cluster status resources. |
43 | 32 |
|
44 | | -Upon deletion of the samples resource, the Cluster Samples Operator recreates the |
45 | | -resource using the default configuration. |
46 | | - |
47 | | -[id="samples-operator-bootstrapped"] |
48 | | -== Cluster Samples Operator's use of management state |
49 | | - |
50 | | -The Cluster Samples Operator is bootstrapped as `Managed` by default or if global proxy is configured. In the `Managed` state, the Cluster Samples Operator is actively managing its resources and keeping the component active in order to pull sample image streams and images from the registry and ensure that the requisite sample templates are installed. |
51 | | - |
52 | | -Certain circumstances result in the Cluster Samples Operator bootstrapping itself as `Removed` including: |
53 | | - |
54 | | -* If the Cluster Samples Operator cannot reach link:https://registry.redhat.io[registry.redhat.io] after three minutes on initial startup after a clean installation. |
55 | | -* If the Cluster Samples Operator detects it is on an IPv6 network. |
56 | | -// cannot configure the Samples Operator |
57 | | -ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] |
58 | | -* If the xref:../openshift_images/image-configuration.adoc#images-configuration-parameters_image-configuration[image controller configuration parameters] prevent the creation of image streams by using the default image registry, or by using the image registry specified by the xref:../openshift_images/configuring-samples-operator.adoc#samples-operator-configuration_configuring-samples-operator[`samplesRegistry` setting]. |
59 | | -endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] |
60 | | - |
61 | | -[NOTE] |
62 | | -==== |
63 | | -For {product-title}, the default image registry is |
64 | | -ifdef::openshift-enterprise[] |
65 | | -`registry.redhat.io`. |
66 | | -endif::[] |
67 | | -ifdef::openshift-rosa,openshift-dedicated,openshift-rosa-hcp,openshift-origin[] |
68 | | -`registry.access.redhat.com` or `quay.io`. |
69 | | -endif::[] |
70 | | -==== |
71 | | - |
72 | | -However, if the Cluster Samples Operator detects that it is on an IPv6 network and an {product-title} global proxy is configured, then IPv6 check supersedes all the checks. As a result, the Cluster Samples Operator bootstraps itself as `Removed`. |
73 | | - |
74 | | -[IMPORTANT] |
75 | | -==== |
76 | | -IPv6 installations are not currently supported by link:https://registry.redhat.io[registry.redhat.io]. The Cluster Samples Operator pulls most of the sample image streams and images from link:https://registry.redhat.io[registry.redhat.io]. |
77 | | -==== |
78 | | - |
79 | | -// Restricted network not supported ROSA/OSD |
80 | | -ifndef::openshift-rosa,openshift-dedicated[] |
81 | | -[id="samples-operator-restricted-network-install"] |
82 | | -=== Restricted network installation |
83 | | - |
84 | | -Boostrapping as `Removed` when unable to access `registry.redhat.io` facilitates restricted network installations when the network restriction is already in place. Bootstrapping as `Removed` when network access is restricted allows the cluster administrator more time to decide if samples are desired, because the Cluster Samples Operator does not submit alerts that sample image stream imports are failing when the management state is set to `Removed`. When the Cluster Samples Operator comes up as `Managed` and attempts to install sample image streams, it starts alerting two hours after initial installation if there are failing imports. |
85 | | - |
86 | | -[id="samples-operator-restricted-network-install-with-access"] |
87 | | -=== Restricted network installation with initial network access |
88 | | - |
89 | | -Conversely, if a cluster that is intended to be a restricted network or disconnected cluster is first installed while network access exists, the Cluster Samples Operator installs the content from `registry.redhat.io` since it can access it. If you want the Cluster Samples Operator to still bootstrap as `Removed` in order to defer samples installation until you have decided which samples are desired, set up image mirrors, and so on, then follow the instructions for using the Samples Operator with an alternate registry and customizing nodes, both linked in the additional resources section, to override the Cluster Samples Operator default configuration and initially come up as `Removed`. |
90 | | - |
91 | | -You must put the following additional YAML file in the `openshift` directory created by `openshift-install create manifest`: |
| 33 | +Upon deletion of the samples resource, the Cluster Samples Operator recreates the resource by using the default configuration. |
92 | 34 |
|
93 | | -.Example Cluster Samples Operator YAML file with `managementState: Removed` |
94 | | -[source,yaml] |
95 | | ----- |
96 | | -apiVersion: samples.operator.openshift.io/v1 |
97 | | -kind: Config |
98 | | -metadata: |
99 | | - name: cluster |
100 | | -spec: |
101 | | - architectures: |
102 | | - - x86_64 |
103 | | - managementState: Removed |
104 | | ----- |
105 | | -endif::openshift-rosa,openshift-dedicated[] |
| 35 | +If the Cluster Samples Operator is removed during installation, you can use the Cluster Samples Operator with an alternate registry so that content can be imported. Then you can set the Cluster Samples Operator to `Managed` to get the samples. Use the following instructions: |
106 | 36 |
|
107 | | -[id="samples-operator-retries"] |
108 | | -== Cluster Samples Operator's tracking and error recovery of image stream imports |
| 37 | +* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/images/samples-operator-alt-registry[Using the Cluster Samples Operator with an alternate registry] |
109 | 38 |
|
110 | | -After creation or update of a samples image stream, the Cluster Samples Operator monitors the progress of each image stream tag's image import. |
| 39 | +For more information about configuring credentials, see the following link: |
111 | 40 |
|
112 | | -If an import fails, the Cluster Samples Operator retries the import through the image stream image import API, which is the same API used by the `oc import-image` command, approximately every 15 minutes until it sees the import succeed, or if |
113 | | -the Cluster Samples Operator's configuration is changed such that either the image stream is added to the `skippedImagestreams` list, or the management state is changed to `Removed`. |
| 41 | +* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/images/managing-images#using-image-pull-secrets[Using image pull secrets] |
0 commit comments