-
Notifications
You must be signed in to change notification settings - Fork 606
Alibaba Cloud Provider: introducing imageregistry types #1082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| - op: add | ||
| path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/storage/properties/oss/properties/encryption/anyOf | ||
| value: | ||
| - properties: | ||
| type: | ||
| not: | ||
| enum: ["KMS"] | ||
| not: | ||
| required: ["kms"] | ||
| - properties: | ||
| type: | ||
| enum: ["KMS"] | ||
| required: ["kms"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -306,6 +306,81 @@ type ImageRegistryConfigStorageIBMCOS struct { | |
| ServiceInstanceCRN string `json:"serviceInstanceCRN,omitempty"` | ||
| } | ||
|
|
||
| // EndpointAccessibility defines the Alibaba VPC endpoint for storage | ||
| type EndpointAccessibility string | ||
|
|
||
| // AlibabaEncryptionMethod defines an enumerable type for the encryption mode | ||
| type AlibabaEncryptionMethod string | ||
|
|
||
| const ( | ||
| // InternalEndpoint sets the VPC endpoint to internal | ||
| InternalEndpoint EndpointAccessibility = "Internal" | ||
| // PublicEndpoint sets the VPC endpoint to public | ||
| PublicEndpoint EndpointAccessibility = "Public" | ||
|
|
||
| // PlainText is an AlibabaEncryptionMethod. This is the default. This means no encryption | ||
| PlainText AlibabaEncryptionMethod = "PlainText" | ||
| // AES256 is an AlibabaEncryptionMethod. This means AES256 encryption | ||
| AES256 AlibabaEncryptionMethod = "AES256" | ||
| // KMS is an AlibabaEncryptionMethod. This means KMS encryption | ||
| KMS AlibabaEncryptionMethod = "KMS" | ||
| ) | ||
|
|
||
| // EncryptionAlibaba this a union type in kube parlance. Depending on the value for the AlibabaEncryptionMethod, | ||
| // different pointers may be used | ||
| type EncryptionAlibaba struct { | ||
| // Method defines the different encrytion modes available | ||
| // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. | ||
| // Currently the default is `AES256`. | ||
| // +kubebuilder:validation:Enum="PlainText";"KMS";"AES256" | ||
| // +kubebuilder:default="AES256" | ||
| // +optional | ||
| Method AlibabaEncryptionMethod `json:"method"` | ||
|
|
||
| // KMS (key management service) is an encryption type that holds the struct for KMS KeyID | ||
| // +optional | ||
| KMS *KMSEncryptionAlibaba `json:"kms,omitempty"` | ||
| } | ||
|
|
||
| type KMSEncryptionAlibaba struct { | ||
| // KeyID holds the KMS encryption key ID | ||
| // +kubebuilder:validation:Required | ||
| // +kubebuilder:validation:MinLength=1 | ||
| KeyID string `json:"keyID"` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can this be empty? Which format?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the |
||
| } | ||
|
|
||
| // ImageRegistryConfigStorageAlibabaOSS holds Alibaba Cloud OSS configuration. | ||
| // Configures 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. | ||
| // About Bucket naming, more details you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/257087.htm) | ||
| // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. | ||
| // Currently the default will be autogenerated in the form of <clusterid>-image-registry-<region>-<random string 27 chars> | ||
| // +kubebuilder:validation:MaxLength=63 | ||
| // +kubebuilder:validation:MinLength=3 | ||
| // +kubebuilder:validation:Pattern=`^[0-9a-z]+(-[0-9a-z]+)*$` | ||
| // +optional | ||
| Bucket string `json:"bucket,omitempty"` | ||
| // Region is the Alibaba Cloud Region in which your bucket exists. | ||
| // For a list of regions, you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/31837.html). | ||
| // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. | ||
| // Currently the default will be based on the installed Alibaba Cloud Region. | ||
| // +optional | ||
| Region string `json:"region,omitempty"` | ||
| // EndpointAccessibility specifies whether the registry use the OSS VPC internal endpoint | ||
| // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. | ||
| // Currently the default is `Internal`. | ||
| // +kubebuilder:validation:Enum="Internal";"Public";"" | ||
| // +kubebuilder:default="Internal" | ||
| // +optional | ||
| EndpointAccessibility EndpointAccessibility `json:"endpointAccessibility,omitempty"` | ||
| // Encryption specifies whether you would like your data encrypted on the server side. | ||
| // More details, you can look cat the [official documentation](https://www.alibabacloud.com/help/doc-detail/117914.htm) | ||
| // +optional | ||
| Encryption *EncryptionAlibaba `json:"encryption,omitempty"` | ||
| } | ||
|
|
||
| // ImageRegistryConfigStorage describes how the storage should be configured | ||
| // for the image registry. | ||
| type ImageRegistryConfigStorage struct { | ||
|
|
@@ -333,6 +408,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. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is only to be set when type matches, you have to add a patch file (can be follow-up), setting
Double check the logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me research how to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From our discussion in slack https://github.com/openshift/api/pull/1082/files#diff-3e8a362860cb72aadab809e7fdb9a0d112ed3e6f09c50c89ac77cf3453189880