Este contenido no está disponible en el idioma seleccionado.
Chapter 2. Configuring the Cluster Samples Operator
The Cluster Samples Operator, which operates in the
openshift
2.1. Understanding the Cluster Samples Operator Copiar enlaceEnlace copiado en el portapapeles!
During installation, the Operator creates the default configuration object for itself and then creates the sample image streams and templates, including quick start templates.
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
openshift
The Cluster Samples Operator configuration is a cluster-wide resource, and the deployment is contained within the
openshift-cluster-samples-operator
The image for the Cluster Samples Operator contains image stream and template definitions for the associated OpenShift Container Platform release. When each sample is created or updated, the Cluster Samples Operator includes an annotation that denotes the version of OpenShift Container Platform. 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.
The Jenkins images are part of the image payload from installation and are tagged into the image streams directly.
The Cluster Samples Operator configuration resource includes a finalizer which cleans up the following upon deletion:
- Operator managed image streams.
- Operator managed templates.
- Operator generated configuration resources.
- Cluster status resources.
Upon deletion of the samples resource, the Cluster Samples Operator recreates the resource using the default configuration.
2.1.1. Cluster Samples Operator’s use of management state Copiar enlaceEnlace copiado en el portapapeles!
The Cluster Samples Operator is bootstrapped as
Managed
Managed
Certain circumstances result in the Cluster Samples Operator bootstrapping itself as
Removed
- If the Cluster Samples Operator cannot reach registry.redhat.io after three minutes on initial startup after a clean installation.
- If the Cluster Samples Operator detects it is on an IPv6 network.
However, if the Cluster Samples Operator detects that it is on an IPv6 network and an OpenShift Container Platform global proxy is configured, then IPv6 check supersedes all the checks. As a result, the Cluster Samples Operator bootstraps itself as
Removed
IPv6 installations are not currently supported by registry.redhat.io. The Cluster Samples Operator pulls most of the sample image streams and images from registry.redhat.io.
2.1.1.1. Restricted network installation Copiar enlaceEnlace copiado en el portapapeles!
Boostrapping as
Removed
registry.redhat.io
Removed
Removed
Managed
2.1.1.2. Restricted network installation with initial network access Copiar enlaceEnlace copiado en el portapapeles!
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
Removed
Removed
You must put the following additional YAML file in the
openshift
openshift-install create manifest
Example Cluster Samples Operator YAML file with managementState: Removed
apiVersion: samples.operator.openshift.io/v1
kind: Config
metadata:
name: cluster
spec:
architectures:
- x86_64
managementState: Removed
2.1.2. Cluster Samples Operator’s tracking and error recovery of image stream imports Copiar enlaceEnlace copiado en el portapapeles!
After creation or update of a samples image stream, the Cluster Samples Operator monitors the progress of each image stream tag’s image import.
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
skippedImagestreams
Removed
Additional resources
-
If the Cluster Samples Operator is removed during installation, you can use the Cluster Samples Operator with an alternate registry so content can be imported, and then set the Cluster Samples Operator to to get the samples.
Managed To ensure the Cluster Samples Operator bootstraps as
in a restricted network installation with initial network access to defer samples installation until you have decided which samples are desired, follow the instructions for customizing nodes to override the Cluster Samples Operator default configuration and initially come up asRemoved.Removed- To host samples in your disconnected environment, follow the instructions for using the Cluster Samples Operator with an alternate registry.
2.1.3. Cluster Samples Operator assistance for mirroring Copiar enlaceEnlace copiado en el portapapeles!
During installation, OpenShift Container Platform creates a config map named
imagestreamtag-to-image
openshift-cluster-samples-operator
imagestreamtag-to-image
The format of the key for each entry in the data field in the config map is
<image_stream_name>_<image_stream_tag_name>
During a disconnected installation of OpenShift Container Platform, the status of the Cluster Samples Operator is set to
Removed
Managed
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.
You can use this config map as a reference for which images need to be mirrored for your image streams to import.
-
While the Cluster Samples Operator is set to , you can create your mirrored registry, or determine which existing mirrored registry you want to use.
Removed - Mirror the samples you want to the mirrored registry using the new config map as your guide.
-
Add any of the image streams you did not mirror to the list of the Cluster Samples Operator configuration object.
skippedImagestreams -
Set of the Cluster Samples Operator configuration object to the mirrored registry.
samplesRegistry -
Then set the Cluster Samples Operator to to install the image streams you have mirrored.
Managed
See Using Cluster Samples Operator image streams with alternate or mirrored registries for a detailed procedure.
2.2. Cluster Samples Operator configuration parameters Copiar enlaceEnlace copiado en el portapapeles!
The samples resource offers the following configuration fields:
| Parameter | Description |
|---|---|
|
|
|
|
| Allows you to specify which registry is accessed by image streams for their image content.
Note Creation or update of RHEL content does not commence if the secret for pull access is not in place when either
Creation or update of RHEL content is not gated by the existence of the pull secret if the
|
|
| Placeholder to choose an architecture type. |
|
| Image streams that are in the Cluster Samples Operator’s inventory but that the cluster administrator wants the Operator to ignore or not manage. You can add a list of image stream names to this parameter. For example,
|
|
| Templates that are in the Cluster Samples Operator’s inventory, but that the cluster administrator wants the Operator to ignore or not manage. |
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.
2.2.1. Configuration restrictions Copiar enlaceEnlace copiado en el portapapeles!
When the Cluster Samples Operator starts supporting multiple architectures, the architecture list is not allowed to be changed while in the
Managed
To change the architectures values, a cluster administrator must:
-
Mark the as
Management State, saving the change.Removed -
In a subsequent change, edit the architecture and change the back to
Management State.Managed
The Cluster Samples Operator still processes secrets while in
Removed
Removed
Removed
Managed
Managed
Managed
2.2.2. Conditions Copiar enlaceEnlace copiado en el portapapeles!
The samples resource maintains the following conditions in its status:
| Condition | Description |
|---|---|
|
| Indicates the samples are created in the
|
|
|
This condition is deprecated in OpenShift Container Platform. |
|
|
|
|
| Indicator that there is a
|
|
| Indicator of which image streams had errors during the image import phase for one of their tags.
|
|
|
This condition is deprecated in OpenShift Container Platform. |
2.3. Accessing the Cluster Samples Operator configuration Copiar enlaceEnlace copiado en el portapapeles!
You can configure the Cluster Samples Operator by editing the file with the provided parameters.
Prerequisites
-
Install the OpenShift CLI ().
oc
Procedure
Access the Cluster Samples Operator configuration:
$ oc edit configs.samples.operator.openshift.io/cluster -o yamlThe Cluster Samples Operator configuration resembles the following example:
apiVersion: samples.operator.openshift.io/v1 kind: Config ...
2.4. Removing deprecated image stream tags from the Cluster Samples Operator Copiar enlaceEnlace copiado en el portapapeles!
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.
You can remove deprecated image stream tags by editing the image stream with the
oc tag
Deprecated image stream tags that the samples providers have removed from their image streams are not included on initial installations.
Prerequisites
-
You installed the CLI.
oc
Procedure
Remove deprecated image stream tags by editing the image stream with the
command.oc tag$ oc tag -d <image_stream_name:tag>Example output
Deleted tag default/<image_stream_name:tag>.
Additional resources
- For more information about configuring credentials, see Using image pull secrets.