Alibaba Cloud Provider: introducing imageregistry types#1082
Alibaba Cloud Provider: introducing imageregistry types#1082openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Conversation
d157107 to
3de2385
Compare
| type KMSEncryptionAlibaba struct { | ||
| // KeyID holds the KMS encryption key ID | ||
| // +kubebuilder:validation:Required | ||
| KeyID string `json:"keyID"` |
There was a problem hiding this comment.
can this be empty? Which format?
There was a problem hiding this comment.
When the Type is set to KMS then a key would be required. When it is not, it can be empty.
The CMK ID that must be specified when SSEAlgorithm is set to KMS and a specified CMK is used for encryption. In other cases, this element must be set to null.
3de2385 to
446d3dd
Compare
| PublicEndpoint EndpointAccessibility = "Public" | ||
|
|
||
| // PlainText is an AlibabaEncryptionMode. This means no encryption | ||
| PlainText AlibabaEncryptionMode = "PlainText" |
There was a problem hiding this comment.
should this be the default value? Then declare a default via marker.
There was a problem hiding this comment.
Declared below where Type is defined.
|
|
||
| // KMS (key management service) is an encryption type provided to encrypt the provider | ||
| // +optional | ||
| KMS *KMSEncryptionAlibaba `json:"kms,omitempty"` |
There was a problem hiding this comment.
if this is only to be set when type matches, you have to add a patch file (can be follow-up), setting
anyOf:
- properties:
type:
not:
enum: ["KMS"]
not:
required: ["kms"]
- properties:
type:
enum: ["KMS"]
required: ["kms"]
Double check the logic.
There was a problem hiding this comment.
Let me research how to do this.
There was a problem hiding this comment.
446d3dd to
7a60f80
Compare
3cb56a8 to
1b438f9
Compare
| // 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" |
There was a problem hiding this comment.
also need "", because client side validation does not see the default.
| // Currently the default is `PlainText`. | ||
| // +kubebuilder:validation:Enum="PlainText";"KMS";"AES256" | ||
| // +kubebuilder:default="PlainText" | ||
| // +kubebuilder:validation:Required |
There was a problem hiding this comment.
with the default this must be optional now because client-side validation does not see the default.
1b438f9 to
6a777a8
Compare
|
/lgtm /hold |
|
@sttts Thanks for the help. I'll get a test cluster going now. |
6a777a8 to
3c20f7b
Compare
|
Fixed typo in description and nothing else. |
|
/test verify |
|
Verify had a few of these. Wondering if something wrong with the CI. |
|
/test verify |
|
@dmage @sttts In order to correctly apply the kubebuilder/openAPI patch to the CRD I had to rename the 00-crd.yaml to 00-imageregistry.crd.yaml. I have noticed that this CRD no longer gets deployed when testing this latest pull request. Does this require an openshift/client-go and an openshift/library-go update? |
3c20f7b to
6fef1b3
Compare
|
I have updated the Testing these changes now. |
6fef1b3 to
06e543c
Compare
| // Mode defines the different encrytion types 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 | ||
| Mode AlibabaEncryptionMode `json:"mode"` |
There was a problem hiding this comment.
@sttts @kwoodson I am concerning about the field name mode, looking the Alibaba Console, bucket encryption configuration, we have three methods of encryption:
- None
- OSS-Managed
- KMS
Then it has only one encryption algorithm:
- AES256
I am concerned if we could rename this field from mode to method, with the default value of OSS-Managed.
I am not sure if we need the field algorithm, but it could be interesting for future capabilities. For now, it will assume only one value: AES256
There was a problem hiding this comment.
I updated the Type to Method to align with the API. I updated the default to AES256 after @mtulio's tests. This seems to be what we wanted it to be by default.
There was a problem hiding this comment.
Here is the reference where we are setting to default, if KMS is not set:
https://github.com/openshift/cluster-image-registry-operator/pull/724/files#diff-e0f51602f2f4156d47e688910139da09ff81fe2ac10efa43d7d453b06ee08ec8R502
There was a problem hiding this comment.
Have nothing against these changes, but be quick. This should land before FF on Friday (I am out, but David Eads can approve).
@kwoodson @sttts please take a look at those tests: openshift/cluster-image-registry-operator#724 (comment) It's working as expected, but I left some comments regarding the naming conventions of those fields, considering the Console/UI. Please let me know wdyt. |
06e543c to
c260fcb
Compare
|
/hold I have submitted #1086 to fix the |
c260fcb to
c5299f9
Compare
|
Rebased to clean up commits from the #1086 merge. |
|
/hold cancel |
|
@kwoodson: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kwoodson, mtulio, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |


Summary: This PR adds the additional fields necessary to provide support for Alibaba imageregistry.
This PR replaces the previous #1009.
cc @menglingwei