-
Notifications
You must be signed in to change notification settings - Fork 617
imageresitry support Alibabacloud oss #1009
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 1 commit
72dbb1f
2ad6000
0a38efa
1f1b466
e20bee9
89df310
9158054
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -306,6 +306,36 @@ type ImageRegistryConfigStorageIBMCOS struct { | |
| ServiceInstanceCRN string `json:"serviceInstanceCRN,omitempty"` | ||
| } | ||
|
|
||
| // ImageRegistryConfigStorageOSS holds Alibaba Cloud OSS configuration. | ||
| type ImageRegistryConfigStorageOSS struct { | ||
|
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. Since there's another push coming anyway, let's clean this up to
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. Got it. |
||
| // bucket is the bucket name in which you want to store the registry's | ||
| // data. | ||
| // Optional, will be generated if not provided. | ||
|
menglingwei marked this conversation as resolved.
|
||
| // +optional | ||
|
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. shouldn't this come after the comment? |
||
| Bucket string `json:"bucket,omitempty"` | ||
|
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. which strings are allowed? |
||
| // region is the GCS location in which your bucket exists. | ||
| // Optional, will be set based on the installed GCS Region. | ||
|
menglingwei marked this conversation as resolved.
Outdated
|
||
| // +optional | ||
|
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. shouldn't this come after the comment? |
||
| Region string `json:"region,omitempty"` | ||
| // regionEndpoint is the endpoint for S3 compatible storage services. | ||
|
menglingwei marked this conversation as resolved.
Outdated
|
||
| // Optional, defaults based on the Region that is provided. | ||
| // +optional | ||
| RegionEndpoint string `json:"regionEndpoint,omitempty"` | ||
| // internal specifies whether the registry use the OSS VPC internal endpoint | ||
| // Optional, defaults to false. if RegionEndpoint is specified, this config will be ignored | ||
|
menglingwei marked this conversation as resolved.
Outdated
|
||
| // +optional | ||
| Internal bool `json:"internal,omitempty"` | ||
|
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. Nothing is a bool. Use an enum string please, with values like Internal and its counterpoint.
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. I think it's better to keep it the same as registry storage-driver for oss. https://github.com/docker/docker.github.io/blob/master/registry/storage-drivers/oss.md
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. The registry storage driver isn't an openshift API. openshift APIs look like kube APIs and we prefer to have enumerations where the value clearly indicates what it does and the list of values provides helpful description of what the alternatives are. This field looks like "EndpointAccessibility" with values "Internal" or "Public". Looking at clear enums like that, the default ought to be internal.
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. So we might want to change Internal to EndpointAccessibility, and EndpointAccessibility is an enums filed. Is ok?
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.
Yes, that looks good. Please be careful about resolving threads without a push. These comments are disappearing from view. |
||
| // encrypt specifies whether the registry stores the image in encrypted | ||
| // format or not. | ||
| // Optional, defaults to false. | ||
| // +optional | ||
| Encrypt bool `json:"encrypt,omitempty"` | ||
|
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. You have two encryption related fields? this and keyID? You need to describe the interaction and likely produce an API that makes it impossible to specify an invalid combination.
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. Why would we allow a non-encrypted option?
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. Here the documation https://www.alibabacloud.com/help/doc-detail/117914.htm?spm=a2c63.p38356.b99.1075.5c3e56989tiYEz.
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.
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. The registry storage driver isn't an openshift API. This API is an openshift API and should conform to our standards.
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. @kwoodson @deads2k From the above discussion. I think i need to change internal to an Enum filed like "EndpointAccessibility" , it may be Internal or Public, the default value is Internal. And the Encrty change to an Enum filed like Encryption,It is used to define the server-side encryption algorithm, KMS or AES256, and same time ,add KeyID , if the Encryption value is KMS, the KeyID must be set. So the final structure should be I wonder if my understanding is correct? If it's correct, I'll do it this way
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. If user don't set Encrypt or out of range ,the default value is AES256. If user set Encrypt to KMS and KeyID is not empty, use KMS. Follow the api documents type Encryption string
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. I didn't realize that keyID was related to Encryption before. type ImageRegistryConfigStorageAlibaba struct{
}
type Encryption string
var(
ClearText = Encryption("ClearText")
AES256 = Encryption("AES256")
KMS = Encryption("KMS")
)
// 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
}
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. Got it.
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. this thread got resolved before a push, unresolving so we can see it. |
||
| // keyID is the KMS key ID to use for encryption. | ||
|
menglingwei marked this conversation as resolved.
Outdated
|
||
| // Optional, Encrypt must be true, or this parameter is ignored. | ||
| // +optional | ||
|
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. shouldn't this come after the comment? |
||
| KeyID string `json:"keyID,omitempty"` | ||
| } | ||
|
|
||
| // ImageRegistryConfigStorage describes how the storage should be configured | ||
| // for the image registry. | ||
| type ImageRegistryConfigStorage struct { | ||
|
|
@@ -333,6 +363,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. | ||
| // +optional | ||
| OSS *ImageRegistryConfigStorageOSS `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.