1 package v1 2 3 import ( 4 corev1 "k8s.io/api/core/v1" 5 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 6 "k8s.io/apimachinery/pkg/runtime" 7 ) 8 9 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 10 11 // ImageList is a list of Image objects. 12 // 13 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 14 // +openshift:compatibility-gen:level=1 15 type ImageList struct { 16 metav1.TypeMeta `json:",inline"` 17 18 // metadata is the standard list's metadata. 19 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 20 metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 21 22 // Items is a list of images 23 Items []Image `json:"items" protobuf:"bytes,2,rep,name=items"` 24 } 25 26 // +genclient 27 // +genclient:nonNamespaced 28 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 29 30 // Image is an immutable representation of a container image and metadata at a point in time. 31 // Images are named by taking a hash of their contents (metadata and content) and any change 32 // in format, content, or metadata results in a new name. The images resource is primarily 33 // for use by cluster administrators and integrations like the cluster image registry - end 34 // users instead access images via the imagestreamtags or imagestreamimages resources. While 35 // image metadata is stored in the API, any integration that implements the container image 36 // registry API must provide its own storage for the raw manifest data, image config, and 37 // layer contents. 38 // 39 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 40 // +openshift:compatibility-gen:level=1 41 type Image struct { 42 metav1.TypeMeta `json:",inline"` 43 44 // metadata is the standard object's metadata. 45 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 46 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 47 48 // DockerImageReference is the string that can be used to pull this image. 49 DockerImageReference string `json:"dockerImageReference,omitempty" protobuf:"bytes,2,opt,name=dockerImageReference"` 50 // DockerImageMetadata contains metadata about this image 51 // +patchStrategy=replace 52 // +kubebuilder:pruning:PreserveUnknownFields 53 DockerImageMetadata runtime.RawExtension `json:"dockerImageMetadata,omitempty" patchStrategy:"replace" protobuf:"bytes,3,opt,name=dockerImageMetadata"` 54 // DockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" 55 DockerImageMetadataVersion string `json:"dockerImageMetadataVersion,omitempty" protobuf:"bytes,4,opt,name=dockerImageMetadataVersion"` 56 // DockerImageManifest is the raw JSON of the manifest 57 DockerImageManifest string `json:"dockerImageManifest,omitempty" protobuf:"bytes,5,opt,name=dockerImageManifest"` 58 // DockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list. 59 DockerImageLayers []ImageLayer `json:"dockerImageLayers,omitempty" protobuf:"bytes,6,rep,name=dockerImageLayers"` 60 // Signatures holds all signatures of the image. 61 // +patchMergeKey=name 62 // +patchStrategy=merge 63 Signatures []ImageSignature `json:"signatures,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=signatures"` 64 // DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. 65 DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty" protobuf:"bytes,8,rep,name=dockerImageSignatures"` 66 // DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. 67 DockerImageManifestMediaType string `json:"dockerImageManifestMediaType,omitempty" protobuf:"bytes,9,opt,name=dockerImageManifestMediaType"` 68 // DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. 69 // Will not be set when the image represents a manifest list. 70 DockerImageConfig string `json:"dockerImageConfig,omitempty" protobuf:"bytes,10,opt,name=dockerImageConfig"` 71 // DockerImageManifests holds information about sub-manifests when the image represents a manifest list. 72 // When this field is present, no DockerImageLayers should be specified. 73 DockerImageManifests []ImageManifest `json:"dockerImageManifests,omitempty" protobuf:"bytes,11,rep,name=dockerImageManifests"` 74 } 75 76 // ImageManifest represents sub-manifests of a manifest list. The Digest field points to a regular 77 // Image object. 78 type ImageManifest struct { 79 // Digest is the unique identifier for the manifest. It refers to an Image object. 80 Digest string `json:"digest" protobuf:"bytes,1,opt,name=digest"` 81 // MediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, 82 // application/vnd.docker.distribution.manifest.v2+json or application/vnd.docker.distribution.manifest.v1+json. 83 MediaType string `json:"mediaType" protobuf:"bytes,2,opt,name=mediaType"` 84 // ManifestSize represents the size of the raw object contents, in bytes. 85 ManifestSize int64 `json:"manifestSize" protobuf:"varint,3,opt,name=manifestSize"` 86 // Architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`. 87 Architecture string `json:"architecture" protobuf:"bytes,4,opt,name=architecture"` 88 // OS specifies the operating system, for example `linux`. 89 OS string `json:"os" protobuf:"bytes,5,opt,name=os"` 90 // Variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU 91 // variant of the ARM CPU. 92 Variant string `json:"variant,omitempty" protobuf:"bytes,6,opt,name=variant"` 93 } 94 95 // ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none. 96 type ImageLayer struct { 97 // Name of the layer as defined by the underlying store. 98 Name string `json:"name" protobuf:"bytes,1,opt,name=name"` 99 // Size of the layer in bytes as defined by the underlying store. 100 LayerSize int64 `json:"size" protobuf:"varint,2,opt,name=size"` 101 // MediaType of the referenced object. 102 MediaType string `json:"mediaType" protobuf:"bytes,3,opt,name=mediaType"` 103 } 104 105 // +genclient 106 // +genclient:onlyVerbs=create,delete 107 // +genclient:nonNamespaced 108 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 109 110 // ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims 111 // as long as the signature is trusted. Based on this information it is possible to restrict runnable images 112 // to those matching cluster-wide policy. 113 // Mandatory fields should be parsed by clients doing image verification. The others are parsed from 114 // signature's content by the server. They serve just an informative purpose. 115 // 116 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 117 // +openshift:compatibility-gen:level=1 118 type ImageSignature struct { 119 metav1.TypeMeta `json:",inline"` 120 121 // metadata is the standard object's metadata. 122 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 123 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 124 125 // Required: Describes a type of stored blob. 126 Type string `json:"type" protobuf:"bytes,2,opt,name=type"` 127 // Required: An opaque binary string which is an image's signature. 128 Content []byte `json:"content" protobuf:"bytes,3,opt,name=content"` 129 // Conditions represent the latest available observations of a signature's current state. 130 // +patchMergeKey=type 131 // +patchStrategy=merge 132 Conditions []SignatureCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` 133 134 // Following metadata fields will be set by server if the signature content is successfully parsed and 135 // the information available. 136 137 // A human readable string representing image's identity. It could be a product name and version, or an 138 // image pull spec (e.g. "registry.access.redhat.com/rhel7/rhel:7.2"). 139 ImageIdentity string `json:"imageIdentity,omitempty" protobuf:"bytes,5,opt,name=imageIdentity"` 140 // Contains claims from the signature. 141 SignedClaims map[string]string `json:"signedClaims,omitempty" protobuf:"bytes,6,rep,name=signedClaims"` 142 // If specified, it is the time of signature's creation. 143 Created *metav1.Time `json:"created,omitempty" protobuf:"bytes,7,opt,name=created"` 144 // If specified, it holds information about an issuer of signing certificate or key (a person or entity 145 // who signed the signing certificate or key). 146 IssuedBy *SignatureIssuer `json:"issuedBy,omitempty" protobuf:"bytes,8,opt,name=issuedBy"` 147 // If specified, it holds information about a subject of signing certificate or key (a person or entity 148 // who signed the image). 149 IssuedTo *SignatureSubject `json:"issuedTo,omitempty" protobuf:"bytes,9,opt,name=issuedTo"` 150 } 151 152 // SignatureConditionType is a type of image signature condition. 153 type SignatureConditionType string 154 155 // SignatureCondition describes an image signature condition of particular kind at particular probe time. 156 type SignatureCondition struct { 157 // Type of signature condition, Complete or Failed. 158 Type SignatureConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=SignatureConditionType"` 159 // Status of the condition, one of True, False, Unknown. 160 Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` 161 // Last time the condition was checked. 162 LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` 163 // Last time the condition transit from one status to another. 164 LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` 165 // (brief) reason for the condition's last transition. 166 Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` 167 // Human readable message indicating details about last transition. 168 Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` 169 } 170 171 // SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject 172 // of signing certificate or key. 173 type SignatureGenericEntity struct { 174 // Organization name. 175 Organization string `json:"organization,omitempty" protobuf:"bytes,1,opt,name=organization"` 176 // Common name (e.g. openshift-signing-service). 177 CommonName string `json:"commonName,omitempty" protobuf:"bytes,2,opt,name=commonName"` 178 } 179 180 // SignatureIssuer holds information about an issuer of signing certificate or key. 181 type SignatureIssuer struct { 182 SignatureGenericEntity `json:",inline" protobuf:"bytes,1,opt,name=signatureGenericEntity"` 183 } 184 185 // SignatureSubject holds information about a person or entity who created the signature. 186 type SignatureSubject struct { 187 SignatureGenericEntity `json:",inline" protobuf:"bytes,1,opt,name=signatureGenericEntity"` 188 // If present, it is a human readable key id of public key belonging to the subject used to verify image 189 // signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g. 190 // 0x685ebe62bf278440). 191 PublicKeyID string `json:"publicKeyID" protobuf:"bytes,2,opt,name=publicKeyID"` 192 } 193 194 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 195 196 // ImageStreamList is a list of ImageStream objects. 197 // 198 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 199 // +openshift:compatibility-gen:level=1 200 type ImageStreamList struct { 201 metav1.TypeMeta `json:",inline"` 202 203 // metadata is the standard list's metadata. 204 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 205 metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 206 207 // Items is a list of imageStreams 208 Items []ImageStream `json:"items" protobuf:"bytes,2,rep,name=items"` 209 } 210 211 // +genclient 212 // +genclient:method=Secrets,verb=get,subresource=secrets,result=github.com/openshift/api/image/v1.SecretList 213 // +genclient:method=Layers,verb=get,subresource=layers,result=github.com/openshift/api/image/v1.ImageStreamLayers 214 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 215 216 // An ImageStream stores a mapping of tags to images, metadata overrides that are applied 217 // when images are tagged in a stream, and an optional reference to a container image 218 // repository on a registry. Users typically update the spec.tags field to point to external 219 // images which are imported from container registries using credentials in your namespace 220 // with the pull secret type, or to existing image stream tags and images which are 221 // immediately accessible for tagging or pulling. The history of images applied to a tag 222 // is visible in the status.tags field and any user who can view an image stream is allowed 223 // to tag that image into their own image streams. Access to pull images from the integrated 224 // registry is granted by having the "get imagestreams/layers" permission on a given image 225 // stream. Users may remove a tag by deleting the imagestreamtag resource, which causes both 226 // spec and status for that tag to be removed. Image stream history is retained until an 227 // administrator runs the prune operation, which removes references that are no longer in 228 // use. To preserve a historical image, ensure there is a tag in spec pointing to that image 229 // by its digest. 230 // 231 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 232 // +openshift:compatibility-gen:level=1 233 type ImageStream struct { 234 metav1.TypeMeta `json:",inline"` 235 236 // metadata is the standard object's metadata. 237 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 238 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 239 240 // Spec describes the desired state of this stream 241 // +optional 242 Spec ImageStreamSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` 243 // Status describes the current state of this stream 244 // +optional 245 Status ImageStreamStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` 246 } 247 248 // ImageStreamSpec represents options for ImageStreams. 249 type ImageStreamSpec struct { 250 // lookupPolicy controls how other resources reference images within this namespace. 251 LookupPolicy ImageLookupPolicy `json:"lookupPolicy,omitempty" protobuf:"bytes,3,opt,name=lookupPolicy"` 252 // dockerImageRepository is optional, if specified this stream is backed by a container repository on this server 253 // Deprecated: This field is deprecated as of v3.7 and will be removed in a future release. 254 // Specify the source for the tags to be imported in each tag via the spec.tags.from reference instead. 255 DockerImageRepository string `json:"dockerImageRepository,omitempty" protobuf:"bytes,1,opt,name=dockerImageRepository"` 256 // tags map arbitrary string values to specific image locators 257 // +patchMergeKey=name 258 // +patchStrategy=merge 259 Tags []TagReference `json:"tags,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=tags"` 260 } 261 262 // ImageLookupPolicy describes how an image stream can be used to override the image references 263 // used by pods, builds, and other resources in a namespace. 264 type ImageLookupPolicy struct { 265 // local will change the docker short image references (like "mysql" or 266 // "php:latest") on objects in this namespace to the image ID whenever they match 267 // this image stream, instead of reaching out to a remote registry. The name will 268 // be fully qualified to an image ID if found. The tag's referencePolicy is taken 269 // into account on the replaced value. Only works within the current namespace. 270 Local bool `json:"local" protobuf:"varint,3,opt,name=local"` 271 } 272 273 // TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track. 274 type TagReference struct { 275 // Name of the tag 276 Name string `json:"name" protobuf:"bytes,1,opt,name=name"` 277 // Optional; if specified, annotations that are applied to images retrieved via ImageStreamTags. 278 // +optional 279 Annotations map[string]string `json:"annotations" protobuf:"bytes,2,rep,name=annotations"` 280 // Optional; if specified, a reference to another image that this tag should point to. Valid values 281 // are ImageStreamTag, ImageStreamImage, and DockerImage. ImageStreamTag references 282 // can only reference a tag within this same ImageStream. 283 From *corev1.ObjectReference `json:"from,omitempty" protobuf:"bytes,3,opt,name=from"` 284 // Reference states if the tag will be imported. Default value is false, which means the tag will 285 // be imported. 286 Reference bool `json:"reference,omitempty" protobuf:"varint,4,opt,name=reference"` 287 // Generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference 288 // is changed the generation is set to match the current stream generation (which is incremented every 289 // time spec is changed). Other processes in the system like the image importer observe that the 290 // generation of spec tag is newer than the generation recorded in the status and use that as a trigger 291 // to import the newest remote tag. To trigger a new import, clients may set this value to zero which 292 // will reset the generation to the latest stream generation. Legacy clients will send this value as 293 // nil which will be merged with the current tag generation. 294 // +optional 295 Generation *int64 `json:"generation" protobuf:"varint,5,opt,name=generation"` 296 // ImportPolicy is information that controls how images may be imported by the server. 297 ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,6,opt,name=importPolicy"` 298 // ReferencePolicy defines how other components should consume the image. 299 ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,7,opt,name=referencePolicy"` 300 } 301 302 // TagImportPolicy controls how images related to this tag will be imported. 303 type TagImportPolicy struct { 304 // Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. 305 Insecure bool `json:"insecure,omitempty" protobuf:"varint,1,opt,name=insecure"` 306 // Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported 307 Scheduled bool `json:"scheduled,omitempty" protobuf:"varint,2,opt,name=scheduled"` 308 // ImportMode describes how to import an image manifest. 309 ImportMode ImportModeType `json:"importMode,omitempty" protobuf:"bytes,3,opt,name=importMode,casttype=ImportModeType"` 310 } 311 312 // ImportModeType describes how to import an image manifest. 313 type ImportModeType string 314 315 const ( 316 // ImportModeLegacy indicates that the legacy behaviour should be used. 317 // For manifest lists, the legacy behaviour will discard the manifest list and import a single 318 // sub-manifest. In this case, the platform is chosen in the following order of priority: 319 // 1. tag annotations; 2. control plane arch/os; 3. linux/amd64; 4. the first manifest in the list. 320 // This mode is the default. 321 ImportModeLegacy ImportModeType = "Legacy" 322 // ImportModePreserveOriginal indicates that the original manifest will be preserved. 323 // For manifest lists, the manifest list and all its sub-manifests will be imported. 324 ImportModePreserveOriginal ImportModeType = "PreserveOriginal" 325 ) 326 327 // TagReferencePolicyType describes how pull-specs for images in an image stream tag are generated when 328 // image change triggers are fired. 329 type TagReferencePolicyType string 330 331 const ( 332 // SourceTagReferencePolicy indicates the image's original location should be used when the image stream tag 333 // is resolved into other resources (builds and deployment configurations). 334 SourceTagReferencePolicy TagReferencePolicyType = "Source" 335 // LocalTagReferencePolicy indicates the image should prefer to pull via the local integrated registry, 336 // falling back to the remote location if the integrated registry has not been configured. The reference will 337 // use the internal DNS name or registry service IP. 338 LocalTagReferencePolicy TagReferencePolicyType = "Local" 339 ) 340 341 // TagReferencePolicy describes how pull-specs for images in this image stream tag are generated when 342 // image change triggers in deployment configs or builds are resolved. This allows the image stream 343 // author to control how images are accessed. 344 type TagReferencePolicy struct { 345 // Type determines how the image pull spec should be transformed when the image stream tag is used in 346 // deployment config triggers or new builds. The default value is `Source`, indicating the original 347 // location of the image should be used (if imported). The user may also specify `Local`, indicating 348 // that the pull spec should point to the integrated container image registry and leverage the registry's 349 // ability to proxy the pull to an upstream registry. `Local` allows the credentials used to pull this 350 // image to be managed from the image stream's namespace, so others on the platform can access a remote 351 // image but have no access to the remote secret. It also allows the image layers to be mirrored into 352 // the local registry which the images can still be pulled even if the upstream registry is unavailable. 353 Type TagReferencePolicyType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=TagReferencePolicyType"` 354 } 355 356 // ImageStreamStatus contains information about the state of this image stream. 357 type ImageStreamStatus struct { 358 // DockerImageRepository represents the effective location this stream may be accessed at. 359 // May be empty until the server determines where the repository is located 360 DockerImageRepository string `json:"dockerImageRepository" protobuf:"bytes,1,opt,name=dockerImageRepository"` 361 // PublicDockerImageRepository represents the public location from where the image can 362 // be pulled outside the cluster. This field may be empty if the administrator 363 // has not exposed the integrated registry externally. 364 PublicDockerImageRepository string `json:"publicDockerImageRepository,omitempty" protobuf:"bytes,3,opt,name=publicDockerImageRepository"` 365 // Tags are a historical record of images associated with each tag. The first entry in the 366 // TagEvent array is the currently tagged image. 367 // +patchMergeKey=tag 368 // +patchStrategy=merge 369 Tags []NamedTagEventList `json:"tags,omitempty" patchStrategy:"merge" patchMergeKey:"tag" protobuf:"bytes,2,rep,name=tags"` 370 } 371 372 // NamedTagEventList relates a tag to its image history. 373 type NamedTagEventList struct { 374 // Tag is the tag for which the history is recorded 375 Tag string `json:"tag" protobuf:"bytes,1,opt,name=tag"` 376 // Standard object's metadata. 377 Items []TagEvent `json:"items" protobuf:"bytes,2,rep,name=items"` 378 // Conditions is an array of conditions that apply to the tag event list. 379 Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` 380 } 381 382 // TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag. 383 type TagEvent struct { 384 // Created holds the time the TagEvent was created 385 Created metav1.Time `json:"created" protobuf:"bytes,1,opt,name=created"` 386 // DockerImageReference is the string that can be used to pull this image 387 DockerImageReference string `json:"dockerImageReference" protobuf:"bytes,2,opt,name=dockerImageReference"` 388 // Image is the image 389 Image string `json:"image" protobuf:"bytes,3,opt,name=image"` 390 // Generation is the spec tag generation that resulted in this tag being updated 391 Generation int64 `json:"generation" protobuf:"varint,4,opt,name=generation"` 392 } 393 394 type TagEventConditionType string 395 396 // These are valid conditions of TagEvents. 397 const ( 398 // ImportSuccess with status False means the import of the specific tag failed 399 ImportSuccess TagEventConditionType = "ImportSuccess" 400 ) 401 402 // TagEventCondition contains condition information for a tag event. 403 type TagEventCondition struct { 404 // Type of tag event condition, currently only ImportSuccess 405 Type TagEventConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=TagEventConditionType"` 406 // Status of the condition, one of True, False, Unknown. 407 Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` 408 // LastTransitionTIme is the time the condition transitioned from one status to another. 409 LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` 410 // Reason is a brief machine readable explanation for the condition's last transition. 411 Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` 412 // Message is a human readable description of the details about last transition, complementing reason. 413 Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` 414 // Generation is the spec tag generation that this status corresponds to 415 Generation int64 `json:"generation" protobuf:"varint,6,opt,name=generation"` 416 } 417 418 // +genclient 419 // +genclient:skipVerbs=get,list,create,update,patch,delete,deleteCollection,watch 420 // +genclient:method=Create,verb=create,result=k8s.io/apimachinery/pkg/apis/meta/v1.Status 421 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 422 423 // ImageStreamMapping represents a mapping from a single image stream tag to a container 424 // image as well as the reference to the container image stream the image came from. This 425 // resource is used by privileged integrators to create an image resource and to associate 426 // it with an image stream in the status tags field. Creating an ImageStreamMapping will 427 // allow any user who can view the image stream to tag or pull that image, so only create 428 // mappings where the user has proven they have access to the image contents directly. 429 // The only operation supported for this resource is create and the metadata name and 430 // namespace should be set to the image stream containing the tag that should be updated. 431 // 432 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 433 // +openshift:compatibility-gen:level=1 434 type ImageStreamMapping struct { 435 metav1.TypeMeta `json:",inline"` 436 437 // metadata is the standard object's metadata. 438 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 439 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 440 441 // Image is a container image. 442 Image Image `json:"image" protobuf:"bytes,2,opt,name=image"` 443 // Tag is a string value this image can be located with inside the stream. 444 Tag string `json:"tag" protobuf:"bytes,3,opt,name=tag"` 445 } 446 447 // +genclient 448 // +genclient:onlyVerbs=get,list,create,update,delete 449 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 450 451 // ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream. 452 // Use this resource to interact with the tags and images in an image stream by tag, or 453 // to see the image details for a particular tag. The image associated with this resource 454 // is the most recently successfully tagged, imported, or pushed image (as described in the 455 // image stream status.tags.items list for this tag). If an import is in progress or has 456 // failed the previous image will be shown. Deleting an image stream tag clears both the 457 // status and spec fields of an image stream. If no image can be retrieved for a given tag, 458 // a not found error will be returned. 459 // 460 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 461 // +openshift:compatibility-gen:level=1 462 type ImageStreamTag struct { 463 metav1.TypeMeta `json:",inline"` 464 465 // metadata is the standard object's metadata. 466 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 467 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 468 469 // tag is the spec tag associated with this image stream tag, and it may be null 470 // if only pushes have occurred to this image stream. 471 Tag *TagReference `json:"tag" protobuf:"bytes,2,opt,name=tag"` 472 473 // generation is the current generation of the tagged image - if tag is provided 474 // and this value is not equal to the tag generation, a user has requested an 475 // import that has not completed, or conditions will be filled out indicating any 476 // error. 477 Generation int64 `json:"generation" protobuf:"varint,3,opt,name=generation"` 478 479 // lookupPolicy indicates whether this tag will handle image references in this 480 // namespace. 481 LookupPolicy ImageLookupPolicy `json:"lookupPolicy" protobuf:"varint,6,opt,name=lookupPolicy"` 482 483 // conditions is an array of conditions that apply to the image stream tag. 484 Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,4,rep,name=conditions"` 485 486 // image associated with the ImageStream and tag. 487 Image Image `json:"image" protobuf:"bytes,5,opt,name=image"` 488 } 489 490 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 491 492 // ImageStreamTagList is a list of ImageStreamTag objects. 493 // 494 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 495 // +openshift:compatibility-gen:level=1 496 type ImageStreamTagList struct { 497 metav1.TypeMeta `json:",inline"` 498 499 // metadata is the standard list's metadata. 500 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 501 metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 502 503 // Items is the list of image stream tags 504 Items []ImageStreamTag `json:"items" protobuf:"bytes,2,rep,name=items"` 505 } 506 507 // +genclient 508 // +genclient:onlyVerbs=get,list,create,update,delete 509 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 510 511 // ImageTag represents a single tag within an image stream and includes the spec, 512 // the status history, and the currently referenced image (if any) of the provided 513 // tag. This type replaces the ImageStreamTag by providing a full view of the tag. 514 // ImageTags are returned for every spec or status tag present on the image stream. 515 // If no tag exists in either form a not found error will be returned by the API. 516 // A create operation will succeed if no spec tag has already been defined and the 517 // spec field is set. Delete will remove both spec and status elements from the 518 // image stream. 519 // 520 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 521 // +openshift:compatibility-gen:level=1 522 type ImageTag struct { 523 metav1.TypeMeta `json:",inline"` 524 525 // metadata is the standard object's metadata. 526 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 527 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 528 529 // spec is the spec tag associated with this image stream tag, and it may be null 530 // if only pushes have occurred to this image stream. 531 Spec *TagReference `json:"spec" protobuf:"bytes,2,opt,name=spec"` 532 // status is the status tag details associated with this image stream tag, and it 533 // may be null if no push or import has been performed. 534 Status *NamedTagEventList `json:"status" protobuf:"bytes,3,opt,name=status"` 535 // image is the details of the most recent image stream status tag, and it may be 536 // null if import has not completed or an administrator has deleted the image 537 // object. To verify this is the most recent image, you must verify the generation 538 // of the most recent status.items entry matches the spec tag (if a spec tag is 539 // set). This field will not be set when listing image tags. 540 Image *Image `json:"image" protobuf:"bytes,4,opt,name=image"` 541 } 542 543 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 544 545 // ImageTagList is a list of ImageTag objects. When listing image tags, the image 546 // field is not populated. Tags are returned in alphabetical order by image stream 547 // and then tag. 548 // 549 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 550 // +openshift:compatibility-gen:level=1 551 type ImageTagList struct { 552 metav1.TypeMeta `json:",inline"` 553 554 // metadata is the standard list's metadata. 555 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 556 metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 557 558 // Items is the list of image stream tags 559 Items []ImageTag `json:"items" protobuf:"bytes,2,rep,name=items"` 560 } 561 562 // +genclient 563 // +genclient:onlyVerbs=get 564 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 565 566 // ImageStreamImage represents an Image that is retrieved by image name from an ImageStream. 567 // User interfaces and regular users can use this resource to access the metadata details of 568 // a tagged image in the image stream history for viewing, since Image resources are not 569 // directly accessible to end users. A not found error will be returned if no such image is 570 // referenced by a tag within the ImageStream. Images are created when spec tags are set on 571 // an image stream that represent an image in an external registry, when pushing to the 572 // integrated registry, or when tagging an existing image from one image stream to another. 573 // The name of an image stream image is in the form "<STREAM>@<DIGEST>", where the digest is 574 // the content addressible identifier for the image (sha256:xxxxx...). You can use 575 // ImageStreamImages as the from.kind of an image stream spec tag to reference an image 576 // exactly. The only operations supported on the imagestreamimage endpoint are retrieving 577 // the image. 578 // 579 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 580 // +openshift:compatibility-gen:level=1 581 type ImageStreamImage struct { 582 metav1.TypeMeta `json:",inline"` 583 584 // metadata is the standard object's metadata. 585 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 586 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 587 588 // Image associated with the ImageStream and image name. 589 Image Image `json:"image" protobuf:"bytes,2,opt,name=image"` 590 } 591 592 // DockerImageReference points to a container image. 593 type DockerImageReference struct { 594 // Registry is the registry that contains the container image 595 Registry string `protobuf:"bytes,1,opt,name=registry"` 596 // Namespace is the namespace that contains the container image 597 Namespace string `protobuf:"bytes,2,opt,name=namespace"` 598 // Name is the name of the container image 599 Name string `protobuf:"bytes,3,opt,name=name"` 600 // Tag is which tag of the container image is being referenced 601 Tag string `protobuf:"bytes,4,opt,name=tag"` 602 // ID is the identifier for the container image 603 ID string `protobuf:"bytes,5,opt,name=iD"` 604 } 605 606 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 607 608 // ImageStreamLayers describes information about the layers referenced by images in this 609 // image stream. 610 // 611 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 612 // +openshift:compatibility-gen:level=1 613 type ImageStreamLayers struct { 614 metav1.TypeMeta `json:",inline"` 615 616 // metadata is the standard object's metadata. 617 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 618 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 619 620 // blobs is a map of blob name to metadata about the blob. 621 Blobs map[string]ImageLayerData `json:"blobs" protobuf:"bytes,2,rep,name=blobs"` 622 // images is a map between an image name and the names of the blobs and config that 623 // comprise the image. 624 Images map[string]ImageBlobReferences `json:"images" protobuf:"bytes,3,rep,name=images"` 625 } 626 627 // ImageBlobReferences describes the blob references within an image. 628 type ImageBlobReferences struct { 629 // imageMissing is true if the image is referenced by the image stream but the image 630 // object has been deleted from the API by an administrator. When this field is set, 631 // layers and config fields may be empty and callers that depend on the image metadata 632 // should consider the image to be unavailable for download or viewing. 633 // +optional 634 ImageMissing bool `json:"imageMissing" protobuf:"varint,3,opt,name=imageMissing"` 635 // layers is the list of blobs that compose this image, from base layer to top layer. 636 // All layers referenced by this array will be defined in the blobs map. Some images 637 // may have zero layers. 638 // +optional 639 Layers []string `json:"layers" protobuf:"bytes,1,rep,name=layers"` 640 // config, if set, is the blob that contains the image config. Some images do 641 // not have separate config blobs and this field will be set to nil if so. 642 // +optional 643 Config *string `json:"config" protobuf:"bytes,2,opt,name=config"` 644 // manifests is the list of other image names that this image points 645 // to. For a single architecture image, it is empty. For a multi-arch 646 // image, it consists of the digests of single architecture images, 647 // such images shouldn't have layers nor config. 648 // +optional 649 Manifests []string `json:"manifests,omitempty" protobuf:"bytes,4,rep,name=manifests"` 650 } 651 652 // ImageLayerData contains metadata about an image layer. 653 type ImageLayerData struct { 654 // Size of the layer in bytes as defined by the underlying store. This field is 655 // optional if the necessary information about size is not available. 656 LayerSize *int64 `json:"size" protobuf:"varint,1,opt,name=size"` 657 // MediaType of the referenced object. 658 MediaType string `json:"mediaType" protobuf:"bytes,2,opt,name=mediaType"` 659 } 660 661 // +genclient 662 // +genclient:onlyVerbs=create 663 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 664 665 // The image stream import resource provides an easy way for a user to find and import container images 666 // from other container image registries into the server. Individual images or an entire image repository may 667 // be imported, and users may choose to see the results of the import prior to tagging the resulting 668 // images into the specified image stream. 669 // 670 // This API is intended for end-user tools that need to see the metadata of the image prior to import 671 // (for instance, to generate an application from it). Clients that know the desired image can continue 672 // to create spec.tags directly into their image streams. 673 // 674 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 675 // +openshift:compatibility-gen:level=1 676 type ImageStreamImport struct { 677 metav1.TypeMeta `json:",inline"` 678 679 // metadata is the standard object's metadata. 680 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 681 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` 682 683 // Spec is a description of the images that the user wishes to import 684 Spec ImageStreamImportSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` 685 // Status is the result of importing the image 686 Status ImageStreamImportStatus `json:"status" protobuf:"bytes,3,opt,name=status"` 687 } 688 689 // ImageStreamImportSpec defines what images should be imported. 690 type ImageStreamImportSpec struct { 691 // Import indicates whether to perform an import - if so, the specified tags are set on the spec 692 // and status of the image stream defined by the type meta. 693 Import bool `json:"import" protobuf:"varint,1,opt,name=import"` 694 // Repository is an optional import of an entire container image repository. A maximum limit on the 695 // number of tags imported this way is imposed by the server. 696 Repository *RepositoryImportSpec `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"` 697 // Images are a list of individual images to import. 698 Images []ImageImportSpec `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"` 699 } 700 701 // ImageStreamImportStatus contains information about the status of an image stream import. 702 type ImageStreamImportStatus struct { 703 // Import is the image stream that was successfully updated or created when 'to' was set. 704 Import *ImageStream `json:"import,omitempty" protobuf:"bytes,1,opt,name=import"` 705 // Repository is set if spec.repository was set to the outcome of the import 706 Repository *RepositoryImportStatus `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"` 707 // Images is set with the result of importing spec.images 708 Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"` 709 } 710 711 // RepositoryImportSpec describes a request to import images from a container image repository. 712 type RepositoryImportSpec struct { 713 // From is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed 714 From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` 715 716 // ImportPolicy is the policy controlling how the image is imported 717 ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,2,opt,name=importPolicy"` 718 // ReferencePolicy defines how other components should consume the image 719 ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,4,opt,name=referencePolicy"` 720 // IncludeManifest determines if the manifest for each image is returned in the response 721 IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,3,opt,name=includeManifest"` 722 } 723 724 // RepositoryImportStatus describes the result of an image repository import 725 type RepositoryImportStatus struct { 726 // Status reflects whether any failure occurred during import 727 Status metav1.Status `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` 728 // Images is a list of images successfully retrieved by the import of the repository. 729 Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,2,rep,name=images"` 730 // AdditionalTags are tags that exist in the repository but were not imported because 731 // a maximum limit of automatic imports was applied. 732 AdditionalTags []string `json:"additionalTags,omitempty" protobuf:"bytes,3,rep,name=additionalTags"` 733 } 734 735 // ImageImportSpec describes a request to import a specific image. 736 type ImageImportSpec struct { 737 // From is the source of an image to import; only kind DockerImage is allowed 738 From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` 739 // To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used 740 To *corev1.LocalObjectReference `json:"to,omitempty" protobuf:"bytes,2,opt,name=to"` 741 742 // ImportPolicy is the policy controlling how the image is imported 743 ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,3,opt,name=importPolicy"` 744 // ReferencePolicy defines how other components should consume the image 745 ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,5,opt,name=referencePolicy"` 746 // IncludeManifest determines if the manifest for each image is returned in the response 747 IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,4,opt,name=includeManifest"` 748 } 749 750 // ImageImportStatus describes the result of an image import. 751 type ImageImportStatus struct { 752 // Status is the status of the image import, including errors encountered while retrieving the image 753 Status metav1.Status `json:"status" protobuf:"bytes,1,opt,name=status"` 754 // Image is the metadata of that image, if the image was located 755 Image *Image `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` 756 // Tag is the tag this image was located under, if any 757 Tag string `json:"tag,omitempty" protobuf:"bytes,3,opt,name=tag"` 758 // Manifests holds sub-manifests metadata when importing a manifest list 759 Manifests []Image `json:"manifests,omitempty" protobuf:"bytes,4,rep,name=manifests"` 760 } 761 762 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 763 764 // SecretList is a list of Secret. 765 // +openshift:compatibility-gen:level=1 766 type SecretList corev1.SecretList 767