Class ImageTagMirrors
- java.lang.Object
-
- io.fabric8.openshift.api.model.config.v1.ImageTagMirrors
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<ImageTagMirrorsBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class ImageTagMirrors extends Object implements io.fabric8.kubernetes.api.builder.Editable<ImageTagMirrorsBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
ImageTagMirrors holds cluster-wide information about how to handle mirrors in the registries config.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ImageTagMirrors()No args constructor for use in serializationImageTagMirrors(String mirrorSourcePolicy, List<String> mirrors, String source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageTagMirrorsBuilderedit()Map<String,Object>getAdditionalProperties()List<String>getMirrors()mirrors is zero or more locations that may also contain the same images.StringgetMirrorSourcePolicy()mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors.StringgetSource()source matches the repository that users refer to, e.g. in image pull specifications.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetMirrors(List<String> mirrors)mirrors is zero or more locations that may also contain the same images.voidsetMirrorSourcePolicy(String mirrorSourcePolicy)mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors.voidsetSource(String source)source matches the repository that users refer to, e.g. in image pull specifications.ImageTagMirrorsBuildertoBuilder()
-
-
-
Method Detail
-
getMirrorSourcePolicy
public String getMirrorSourcePolicy()
mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. If unset, the image will continue to be pulled from the repository in the pull spec. sourcePolicy is valid configuration only when one or more mirrors are in the mirror list.
-
setMirrorSourcePolicy
public void setMirrorSourcePolicy(String mirrorSourcePolicy)
mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. If unset, the image will continue to be pulled from the repository in the pull spec. sourcePolicy is valid configuration only when one or more mirrors are in the mirror list.
-
getMirrors
public List<String> getMirrors()
mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. Images can be pulled from these mirrors only if they are referenced by their tags. The mirrored location is obtained by replacing the part of the input reference that matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo repository to be used. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Configuring a list of mirrors using "ImageDigestMirrorSet" CRD and forcing digest-pulls for mirrors avoids that issue. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy". Other cluster configuration, including (but not limited to) other imageTagMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. "mirrors" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table
-
setMirrors
public void setMirrors(List<String> mirrors)
mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. Images can be pulled from these mirrors only if they are referenced by their tags. The mirrored location is obtained by replacing the part of the input reference that matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo repository to be used. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Configuring a list of mirrors using "ImageDigestMirrorSet" CRD and forcing digest-pulls for mirrors avoids that issue. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy". Other cluster configuration, including (but not limited to) other imageTagMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. "mirrors" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table
-
getSource
public String getSource()
source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. "source" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo [*.]host for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table
-
setSource
public void setSource(String source)
source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. "source" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo [*.]host for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table
-
edit
public ImageTagMirrorsBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<ImageTagMirrorsBuilder>
-
toBuilder
public ImageTagMirrorsBuilder toBuilder()
-
-