Skip to content

Commit 00a2283

Browse files
committed
OSDOCS-16880: CQA Image Configuration and Advanced Features
1 parent 8fcf0c9 commit 00a2283

8 files changed

+155
-419
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * openshift_images/configuring_samples_operator.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="samples-operator-bootstrapped_{context}"]
7+
= Cluster Samples Operator use of management state
8+
9+
[role="_abstract"]
10+
The Cluster Samples Operator is bootstrapped as `Managed` by default or if global proxy is configured.
11+
12+
In the `Managed` state, the Cluster Samples Operator is actively managing its resources and keeping the component active to pull sample image streams and images from the registry and ensure that the requisite sample templates are installed.
13+
14+
Certain circumstances result in the Cluster Samples Operator bootstrapping itself as `Removed` including:
15+
16+
* 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.
17+
* If the Cluster Samples Operator detects it is on an IPv6 network.
18+
// cannot configure the Samples Operator
19+
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
20+
* If the image controller configuration parameters prevent the creation of image streams by using the default image registry, or by using the image registry specified by `samplesRegistry` setting. For more information, see the following links:
21+
22+
** link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/images/image-configuration-classic#images-configuration-parameters_image-configuration[Image controller configuration parameters]
23+
** link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-title}/html/images/configuring-samples-operator#samples-operator-configuration_configuring-samples-operator[Cluster Samples Operator configuration parameters]
24+
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
25+
26+
[NOTE]
27+
====
28+
For {product-title}, the default image registry is
29+
ifdef::openshift-enterprise[]
30+
`registry.redhat.io`.
31+
endif::[]
32+
ifdef::openshift-rosa,openshift-dedicated,openshift-rosa-hcp,openshift-origin[]
33+
`registry.access.redhat.com` or `quay.io`.
34+
endif::[]
35+
====
36+
37+
However, if the Cluster Samples Operator detects that it is on an IPv6 network and an {product-title} global proxy is configured, then the IPv6 check supersedes all the checks. As a result, the Cluster Samples Operator bootstraps itself as `Removed`.
38+
39+
[IMPORTANT]
40+
====
41+
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].
42+
====
Lines changed: 11 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,41 @@
11
// Module included in the following assemblies:
22
//
33
// * openshift_images/configuring_samples_operator.adoc
4-
// * openshift_images/configuring-samples-operator.adoc
5-
64

75
:_mod-docs-content-type: CONCEPT
86
[id="samples-operator-overview_{context}"]
97
= Understanding the Cluster Samples Operator
108

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.
1311

1412
[NOTE]
1513
====
1614
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.
1715
====
1816

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.
2018

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.
2920

3021
[NOTE]
3122
====
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.
3424
====
3525

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:
3827

3928
* Operator managed image streams.
4029
* Operator managed templates.
4130
* Operator generated configuration resources.
4231
* Cluster status resources.
4332
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.
9234

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:
10636

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]
10938
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:
11140

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]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * openshift_images/configuring_samples_operator.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="samples-operator-restricted-network-install-con_{context}"]
7+
= Restricted network installation
8+
9+
[role="_abstract"]
10+
Boostrapping as `Removed` when unable to access `registry.redhat.io` facilitates restricted network installations when the network restriction is already in place.
11+
12+
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.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * openshift_images/configuring_samples_operator.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="samples-operator-restricted-nw-install-with-access_{context}"]
7+
= Restricted network installation with initial network access
8+
9+
[role="_abstract"]
10+
If a cluster that is intended to be a restricted network is first installed while network access exists, the Cluster Samples Operator installs the content from `registry.redhat.io` since it can access it.
11+
12+
If you want the Cluster Samples Operator to still bootstrap as `Removed` during a restricted network installation with initial network access to defer samples installation until you have decided which samples are desired, you can override the Cluster Samples Operator default configuration by using the following instructions:
13+
14+
*link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/installation_configuration/installing-customizing[Customizing nodes]
15+
16+
To host samples in your disconnected environment, use the following instructions:
17+
18+
* 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]
19+
20+
You must also put the following additional YAML file in the `openshift` directory created by `openshift-install create manifest`:
21+
22+
.Example Cluster Samples Operator YAML file with `managementState: Removed`
23+
[source,yaml]
24+
----
25+
apiVersion: samples.operator.openshift.io/v1
26+
kind: Config
27+
metadata:
28+
name: cluster
29+
spec:
30+
architectures:
31+
- x86_64
32+
managementState: Removed
33+
----
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * openshift_images/configuring_samples_operator.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="samples-operator-retries_{context}"]
7+
= Cluster Samples Operator tracking and error recovery of image stream imports
8+
9+
[role="_abstract"]
10+
After creation or update of a samples image stream, the Cluster Samples Operator monitors the progress of each image stream tag's image import.
11+
12+
If an import fails, the Cluster Samples Operator retries the import through the image stream image import API at a rate of about every 15 minutes until either one of the following occurs:
13+
14+
* The import succeeds.
15+
* The Cluster Samples Operator configuration is changed such that either the image stream is added to the `skippedImagestreams` list, or the management state is changed to `Removed`.

0 commit comments

Comments
 (0)