diff --git a/imageregistry/v1/00-crd.yaml b/imageregistry/v1/00-crd.yaml index 901cc09a37c..f543cb72468 100644 --- a/imageregistry/v1/00-crd.yaml +++ b/imageregistry/v1/00-crd.yaml @@ -708,6 +708,35 @@ spec: description: managementState indicates if the operator manages the underlying storage unit. If Managed the operator will remove the storage when this operator gets Removed. type: string pattern: ^(Managed|Unmanaged)$ + oss: + description: OSS represents configuration that uses Alibaba Cloud Object Storage Service. + type: object + properties: + bucket: + description: bucket is the bucket name in which you want to store the registry's data. Optional, will be generated if not provided. About Bucket naming, more details you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/257087.htm) + type: string + encrypt: + description: encrypt specifies whether you would like your data encrypted on the server side. Defaults to false if not specified. Optional, defaults to AES256. More details, you can look cat the [official documentation](https://www.alibabacloud.com/help/doc-detail/117914.htm) + type: object + required: + - encryptionType + - kms + properties: + encryptionType: + type: string + kms: + type: object + required: + - keyID + properties: + keyID: + type: string + endpointAccessibility: + description: EndpointAccessibility specifies whether the registry use the OSS VPC internal endpoint Optional, defaults to Internal. + type: string + region: + description: region is the Alibaba Cloud Region in which your bucket exists. Optional, will be set based on the installed Alibaba Cloud Region. For a list of regions, you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/31837.html). + type: string pvc: description: pvc represents configuration that uses a PersistentVolumeClaim. type: object @@ -949,6 +978,35 @@ spec: description: managementState indicates if the operator manages the underlying storage unit. If Managed the operator will remove the storage when this operator gets Removed. type: string pattern: ^(Managed|Unmanaged)$ + oss: + description: OSS represents configuration that uses Alibaba Cloud Object Storage Service. + type: object + properties: + bucket: + description: bucket is the bucket name in which you want to store the registry's data. Optional, will be generated if not provided. About Bucket naming, more details you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/257087.htm) + type: string + encrypt: + description: encrypt specifies whether you would like your data encrypted on the server side. Defaults to false if not specified. Optional, defaults to AES256. More details, you can look cat the [official documentation](https://www.alibabacloud.com/help/doc-detail/117914.htm) + type: object + required: + - encryptionType + - kms + properties: + encryptionType: + type: string + kms: + type: object + required: + - keyID + properties: + keyID: + type: string + endpointAccessibility: + description: EndpointAccessibility specifies whether the registry use the OSS VPC internal endpoint Optional, defaults to Internal. + type: string + region: + description: region is the Alibaba Cloud Region in which your bucket exists. Optional, will be set based on the installed Alibaba Cloud Region. For a list of regions, you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/31837.html). + type: string pvc: description: pvc represents configuration that uses a PersistentVolumeClaim. type: object diff --git a/imageregistry/v1/types.go b/imageregistry/v1/types.go index 7723074c6ec..2d73bd8346d 100644 --- a/imageregistry/v1/types.go +++ b/imageregistry/v1/types.go @@ -306,6 +306,59 @@ type ImageRegistryConfigStorageIBMCOS struct { ServiceInstanceCRN string `json:"serviceInstanceCRN,omitempty"` } +type EndpointAccessibility string + +var ( + InternalEndpoint = EndpointAccessibility("Internal") + PublicEndpoint = EndpointAccessibility("Public") +) + +type Encryption string + +var ( + ClearText = Encryption("ClearText") + AES256 = Encryption("AES256") + KMS = Encryption("KMS") +) + +// EncryptionAlibaba this a union type in kube parlance. Depending on the value for the encryptionType, +// different pointers may be used +type EncryptionAlibaba struct { + EncryptionType Encryption `json:"encryptionType"` + + KMSEncryptionAlibaba *KMSEncryptionAlibaba `json:"kms"` +} + +type KMSEncryptionAlibaba struct { + KeyID string `json:"keyID"` +} + +// ImageRegistryConfigStorageAlibabaOSS holds Alibaba Cloud OSS configuration. +// the registry to use Alibaba Cloud Object Storage Service for backend storage. +// More about oss, you can look at the [official documentation](https://www.alibabacloud.com/help/product/31815.htm) +type ImageRegistryConfigStorageAlibabaOSS struct { + // bucket is the bucket name in which you want to store the registry's + // data. + // Optional, will be generated if not provided. + // +optional + // About Bucket naming, more details you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/257087.htm) + Bucket string `json:"bucket,omitempty"` + // region is the Alibaba Cloud Region in which your bucket exists. + // Optional, will be set based on the installed Alibaba Cloud Region. + // +optional + // For a list of regions, you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/31837.html). + Region string `json:"region,omitempty"` + // EndpointAccessibility specifies whether the registry use the OSS VPC internal endpoint + // Optional, defaults to Internal. + // +optional + EndpointAccessibility EndpointAccessibility `json:"endpointAccessibility,omitempty"` + // encrypt specifies whether you would like your data encrypted on the server side. Defaults to false if not specified. + // Optional, defaults to AES256. + // +optional + // More details, you can look cat the [official documentation](https://www.alibabacloud.com/help/doc-detail/117914.htm) + Encrypt EncryptionAlibaba `json:"encrypt,omitempty"` +} + // ImageRegistryConfigStorage describes how the storage should be configured // for the image registry. type ImageRegistryConfigStorage struct { @@ -333,6 +386,9 @@ type ImageRegistryConfigStorage struct { // ibmcos represents configuration that uses IBM Cloud Object Storage. // +optional IBMCOS *ImageRegistryConfigStorageIBMCOS `json:"ibmcos,omitempty"` + // OSS represents configuration that uses Alibaba Cloud Object Storage Service. + // +optional + OSS *ImageRegistryConfigStorageAlibabaOSS `json:"oss,omitempty"` // managementState indicates if the operator manages the underlying // storage unit. If Managed the operator will remove the storage when // this operator gets Removed. diff --git a/imageregistry/v1/zz_generated.deepcopy.go b/imageregistry/v1/zz_generated.deepcopy.go index a8ae67f3ff9..0cb96ed9359 100644 --- a/imageregistry/v1/zz_generated.deepcopy.go +++ b/imageregistry/v1/zz_generated.deepcopy.go @@ -75,6 +75,27 @@ func (in *ConfigList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionAlibaba) DeepCopyInto(out *EncryptionAlibaba) { + *out = *in + if in.KMSEncryptionAlibaba != nil { + in, out := &in.KMSEncryptionAlibaba, &out.KMSEncryptionAlibaba + *out = new(KMSEncryptionAlibaba) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionAlibaba. +func (in *EncryptionAlibaba) DeepCopy() *EncryptionAlibaba { + if in == nil { + return nil + } + out := new(EncryptionAlibaba) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ImagePruner) DeepCopyInto(out *ImagePruner) { *out = *in @@ -334,6 +355,11 @@ func (in *ImageRegistryConfigStorage) DeepCopyInto(out *ImageRegistryConfigStora *out = new(ImageRegistryConfigStorageIBMCOS) **out = **in } + if in.OSS != nil { + in, out := &in.OSS, &out.OSS + *out = new(ImageRegistryConfigStorageAlibabaOSS) + (*in).DeepCopyInto(*out) + } return } @@ -347,6 +373,23 @@ func (in *ImageRegistryConfigStorage) DeepCopy() *ImageRegistryConfigStorage { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageRegistryConfigStorageAlibabaOSS) DeepCopyInto(out *ImageRegistryConfigStorageAlibabaOSS) { + *out = *in + in.Encrypt.DeepCopyInto(&out.Encrypt) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageAlibabaOSS. +func (in *ImageRegistryConfigStorageAlibabaOSS) DeepCopy() *ImageRegistryConfigStorageAlibabaOSS { + if in == nil { + return nil + } + out := new(ImageRegistryConfigStorageAlibabaOSS) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ImageRegistryConfigStorageAzure) DeepCopyInto(out *ImageRegistryConfigStorageAzure) { *out = *in @@ -548,3 +591,19 @@ func (in *ImageRegistryStatus) DeepCopy() *ImageRegistryStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KMSEncryptionAlibaba) DeepCopyInto(out *KMSEncryptionAlibaba) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSEncryptionAlibaba. +func (in *KMSEncryptionAlibaba) DeepCopy() *KMSEncryptionAlibaba { + if in == nil { + return nil + } + out := new(KMSEncryptionAlibaba) + in.DeepCopyInto(out) + return out +} diff --git a/imageregistry/v1/zz_generated.swagger_doc_generated.go b/imageregistry/v1/zz_generated.swagger_doc_generated.go index 42a7ff81151..3da4c18bb9b 100644 --- a/imageregistry/v1/zz_generated.swagger_doc_generated.go +++ b/imageregistry/v1/zz_generated.swagger_doc_generated.go @@ -27,6 +27,14 @@ func (ConfigList) SwaggerDoc() map[string]string { return map_ConfigList } +var map_EncryptionAlibaba = map[string]string{ + "": "EncryptionAlibaba this a union type in kube parlance. Depending on the value for the encryptionType, different pointers may be used", +} + +func (EncryptionAlibaba) SwaggerDoc() map[string]string { + return map_EncryptionAlibaba +} + var map_ImageRegistryConfigProxy = map[string]string{ "": "ImageRegistryConfigProxy defines proxy configuration to be used by registry.", "http": "http defines the proxy to be used by the image registry when accessing HTTP endpoints.", @@ -79,6 +87,7 @@ var map_ImageRegistryConfigStorage = map[string]string{ "pvc": "pvc represents configuration that uses a PersistentVolumeClaim.", "azure": "azure represents configuration that uses Azure Blob Storage.", "ibmcos": "ibmcos represents configuration that uses IBM Cloud Object Storage.", + "oss": "OSS represents configuration that uses Alibaba Cloud Object Storage Service.", "managementState": "managementState indicates if the operator manages the underlying storage unit. If Managed the operator will remove the storage when this operator gets Removed.", } @@ -86,6 +95,18 @@ func (ImageRegistryConfigStorage) SwaggerDoc() map[string]string { return map_ImageRegistryConfigStorage } +var map_ImageRegistryConfigStorageAlibabaOSS = map[string]string{ + "": "ImageRegistryConfigStorageAlibabaOSS holds Alibaba Cloud OSS configuration. the registry to use Alibaba Cloud Object Storage Service for backend storage. More about oss, you can look at the [official documentation](https://www.alibabacloud.com/help/product/31815.htm)", + "bucket": "bucket is the bucket name in which you want to store the registry's data. Optional, will be generated if not provided. About Bucket naming, more details you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/257087.htm)", + "region": "region is the Alibaba Cloud Region in which your bucket exists. Optional, will be set based on the installed Alibaba Cloud Region. For a list of regions, you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/31837.html).", + "endpointAccessibility": "EndpointAccessibility specifies whether the registry use the OSS VPC internal endpoint Optional, defaults to Internal.", + "encrypt": "encrypt specifies whether you would like your data encrypted on the server side. Defaults to false if not specified. Optional, defaults to AES256. More details, you can look cat the [official documentation](https://www.alibabacloud.com/help/doc-detail/117914.htm)", +} + +func (ImageRegistryConfigStorageAlibabaOSS) SwaggerDoc() map[string]string { + return map_ImageRegistryConfigStorageAlibabaOSS +} + var map_ImageRegistryConfigStorageAzure = map[string]string{ "": "ImageRegistryConfigStorageAzure holds the information to configure the registry to use Azure Blob Storage for backend storage.", "accountName": "accountName defines the account to be used by the registry.",