Skip to content

Commit f8840f6

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

12 files changed

+184
-430
lines changed

modules/images-samples-operator-deprecated-image-stream.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[id="images-samples-operator-deprecated-image-stream_{context}"]
99
= Removing deprecated image stream tags from the Cluster Samples Operator
1010

11+
[role="_abstract"]
1112
The Cluster Samples Operator leaves deprecated image stream tags in an image stream because users can have deployments that use the deprecated image stream tags.
1213

1314
You can remove deprecated image stream tags by editing the image stream with the `oc tag` command.
@@ -19,11 +20,11 @@ Deprecated image stream tags that the samples providers have removed from their
1920

2021
.Prerequisites
2122

22-
* You installed the `oc` CLI.
23+
* You installed the {oc-first}.
2324
2425
.Procedure
2526

26-
* Remove deprecated image stream tags by editing the image stream with the `oc tag` command.
27+
* Remove deprecated image stream tags by editing the image stream with the following `oc tag` command:
2728
+
2829
[source,terminal]
2930
----

modules/installation-images-samples-disconnected-mirroring-assist.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@
88
[id="installation-images-samples-disconnected-mirroring-assist_{context}"]
99
= Cluster Samples Operator assistance for mirroring
1010

11-
During installation, {product-title} creates a config map named `imagestreamtag-to-image` in the `openshift-cluster-samples-operator` namespace. The `imagestreamtag-to-image` config map contains an entry, the populating image, for each image stream tag.
11+
[role="_abstract"]
12+
During installation, {product-title} creates a config map named `imagestreamtag-to-image` in the `openshift-cluster-samples-operator` namespace.
13+
14+
The `imagestreamtag-to-image` config map contains an entry, the populating image, for each image stream tag.
1215

1316
The format of the key for each entry in the data field in the config map is `<image_stream_name>_<image_stream_tag_name>`.
1417

1518
ifndef::openshift-rosa;openshift-dedicated[]
1619
During a disconnected installation of {product-title}, the status of the Cluster Samples Operator is set to `Removed`. If you choose to change it to `Managed`, it installs samples.
1720
[NOTE]
1821
====
19-
The use of samples in a network-restricted or discontinued environment may require access to services external to your network. Some example services include: Github, Maven Central, npm, RubyGems, PyPi and others. There might be additional steps to take that allow the cluster samples operators's objects to reach the services they require.
22+
The use of samples in a network-restricted or discontinued environment might require access to services external to your network. Some example services include: Github, Maven Central, npm, RubyGems, PyPi and others. There might be additional steps to take that allow the Cluster Samples Operators objects to reach the services they require.
2023
====
2124
endif::openshift-rosa;openshift-dedicated[]
2225

23-
You can use this config map as a reference for which images need to be mirrored for your image streams to import.
26+
Use the following principles to determine which images you need to mirror for your image streams to import:
2427

2528
* While the Cluster Samples Operator is set to `Removed`, you can create your mirrored registry, or determine which existing mirrored registry you want to use.
2629
* Mirror the samples you want to the mirrored registry using the new config map as your guide.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 the registry after three minutes on initial startup after a clean installation.
17+
* If the Cluster Samples Operator detects that 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-version}/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+
ifdef::openshift-enterprise,openshift-dedicated,openshift-origin[]
38+
However, if the Cluster Samples Operator detects that it is on an IPv6 network and an {product-title}
39+
endif::[]
40+
ifdef::openshift-rosa,openshift-rosa-hcp[]
41+
However, if the Cluster Samples Operator detects that it is on an IPv6 network and a {product-title}
42+
endif::[]
43+
global proxy is configured, then the IPv6 check supersedes all the checks. As a result, the Cluster Samples Operator bootstraps itself as `Removed`.
44+
45+
[IMPORTANT]
46+
====
47+
IPv6 installations are not currently supported by the registry. The Cluster Samples Operator pulls most of the sample image streams and images from the registry.
48+
====

modules/samples-operator-configuration.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="samples-operator-configuration_{context}"]
77
= Cluster Samples Operator configuration parameters
88

9+
[role="_abstract"]
910
The samples resource offers the following configuration fields:
1011

1112
[cols="3a,8a",options="header"]
@@ -42,18 +43,20 @@ Creation or update of RHEL content is not gated by the existence of the pull sec
4243

4344
Secret, image stream, and template watch events can come in before the initial samples resource object is created, the Cluster Samples Operator detects and re-queues the event.
4445

46+
[id="samples-operator-config-restrictions_{context}"]
4547
== Configuration restrictions
4648

47-
When the Cluster Samples Operator starts supporting multiple architectures, the architecture list is not allowed to be changed while in the `Managed` state.
49+
When the Cluster Samples Operator starts supporting multiple architectures, you cannot change the architecture list while the Operator is in the `Managed` state.
4850

4951
To change the architectures values, a cluster administrator must:
5052

5153
* Mark the `Management State` as `Removed`, saving the change.
5254
* In a subsequent change, edit the architecture and change the `Management State` back to `Managed`.
5355

54-
The Cluster Samples Operator still processes secrets while in `Removed` state. You can create the secret before switching to `Removed`, while in `Removed` before switching to `Managed`, or after switching to `Managed` state. There are delays in creating the samples until the secret event is processed if you create the secret after switching to `Managed`. This helps facilitate the changing of the registry, where you choose to remove all the samples before switching to insure a clean slate. Removing all samples before switching is not required.
56+
The Cluster Samples Operator still processes secrets while in `Removed` state. You can create the secret before switching to `Removed`, while in `Removed` before switching to `Managed`, or after switching to `Managed` state. There are delays in creating the samples until the secret event is processed if you create the secret after switching to `Managed`. This helps facilitate the changing of the registry, where you choose to remove all the samples before switching to ensure a clean slate. Removing all samples before switching is not required.
5557

56-
== Conditions
58+
[id="samples-operator-conditions_{context}"]
59+
== Samples resource conditions
5760

5861
The samples resource maintains the following conditions in its status:
5962

@@ -81,6 +84,6 @@ The samples resource maintains the following conditions in its status:
8184
`True` when an error has occurred. The list of image streams with an error is in the reason field. The details of each error reported are in the message field.
8285

8386
|`MigrationInProgress`
84-
|`True` when the Cluster Samples Operator detects that the version is different than the Cluster Samples Operator version with which the current samples set are installed.
87+
|`True` when the Cluster Samples Operator detects that the version is different from the Cluster Samples Operator version with which the current samples set are installed.
8588

8689
|===

modules/samples-operator-crd.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
[id="samples-operator-crd_{context}"]
88
= Accessing the Cluster Samples Operator configuration
99

10+
[role="_abstract"]
1011
You can configure the Cluster Samples Operator by editing the file with the provided parameters.
1112

1213
.Prerequisites
1314

14-
* Install the OpenShift CLI (`oc`).
15+
* You installed the {oc-first}.
1516
1617
.Procedure
1718

18-
* Access the Cluster Samples Operator configuration:
19+
* Access the Cluster Samples Operator configuration by running the following command:
1920
+
2021
[source,terminal]
2122
----
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+
The Cluster Samples Operator boostrapping itself as `Removed` when unable to access `registry.redhat.io` facilitates restricted network installations when the network restriction is already in place.
11+
12+
As a cluster administrator, you have more time to decide if samples are needed when the Operator is boostrapped `Removed`. This is because the Cluster Samples Operator does not submit alerts that sample image stream imports are failing when the management state is `Removed`. When the Cluster Samples Operator management state is `Managed`, and the Operator attempts to install sample image streams, failing-import alerts start two hours after initial installation.

0 commit comments

Comments
 (0)