apiVersion: samples.operator.openshift.io/v1
kind: Config
metadata:
name: cluster
spec:
architectures:
- x86_64
managementState: Removed
The cluster Samples Operator, which operates in the openshift
namespace, installs and
updates the Red Hat Enterprise Linux (RHEL)-based OpenShift Container Platform imagestreams
and OpenShift Container Platform templates.
During installation, the Operator creates the default configuration object for itself and then creates the sample image streams and templates, including quickstart 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 |
The cluster Samples Operator configuration is a cluster-wide resource, and the deployment is contained within the openshift-cluster-samples-operator
namespace.
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.
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.
Certain circumstances result in the cluster Samples Operator bootstrapping itself as Removed
including:
If the cluster Samples Operator cannot reach registry.redhat.io after three minutes on initial start-up after a clean installation.
If the cluster Samples Operator detects it is on an IPv6 network.
However, if the cluster Samples Operator also detects an OpenShift Container Platform global proxy is configured, it bypasses those checks.
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. |
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.
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
.
You must put the following additional YAML file in the openshift
directory created by openshift-install create manifest
:
managementState: Removed
apiVersion: samples.operator.openshift.io/v1
kind: Config
metadata:
name: cluster
spec:
architectures:
- x86_64
managementState: Removed
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
command, approximately every 15 minutes until it sees the import succeed, or if
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
.
If the cluster Samples Operator is removed during installation, you can use the cluster Samples Operator with an alternate registry.
To ensure the cluster Samples Operator bootstraps as Removed
in a restricted network installation with initial network access in order to defer samples installation until you have decided which samples are desired, follow the instructions for using the cluster Samples Operator with an alternate registry and Customizing nodes, to override the cluster Samples Operator default configuration and initially come up as Removed
.
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.
|
||
|
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.
When the cluster Samples Operator starts supporting multiple architectures, the architecture list is not allowed to be changed while in the Managed
state.
In order to change the architectures values, a cluster administrator must:
Mark the Management State
as Removed
, saving the change.
In a subsequent change, edit the architecture and change the Management State
back to Managed
.
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.
The samples resource maintains the following conditions in its status:
Condition | Description |
---|---|
|
Indicates the samples are created in the |
|
|
|
|
|
Indicator that there is a |
|
Indicator of which image streams had errors during the image import phase for one of their tags.
|
|
|
You can configure the cluster Samples Operator by editing the file with the provided parameters.
Install the OpenShift CLI (oc
).
Access the cluster Samples Operator configuration:
$ oc edit configs.samples.operator.openshift.io/cluster -o yaml
The cluster Samples Operator configuration resembles the following example:
apiVersion: samples.operator.openshift.io/v1
kind: Config
...
For more information about configuring credentials, see Using image pull secrets.