Replies: 7 comments 5 replies
-
Thanks @binbin-li for proposing such detailed proposal. I like the design of consolidating multiple CRDs to a single CRD since it aligns with the goal of simplifying setup and management for common use cases. In terms of the drawbacks listed above, here are considerations and potential trade-offs from the user's perspective:
In general, most of the configurations in these four CRDs are not frequently changed by users, it is likely an one-time configuration for each verifier/store/policy enforcer for users. A single unified CRD does not increase the maintenance complexity.
How large will the single unified CRD be? Is there a way to mitigate this risk in case Ratify unified CRD exceed Kubernetes' etcd size limits? I assume this is configurable for etcd https://etcd.io/docs/v3.4/dev-guide/limit/
As long as Ratify logs could locate where is the misconfiguration happended in the unified CRD, it looks no significant difference with multiple CRDs design since users can easily mitigate the failure via the error logs in case any misconfiguration. In addition, I have two questions: How easier of the migration path? Can users with existing multiple CRDs setups transition to a single CRD without service disruptions? I would expect transitioning a clear and well-documented migration path for users. Are we able to support a hybrid approach and make two CRD models configurable? By default, it's a unified single CRD for common scenarios, Ratify allow users to change between single or multiple CRD configurations based on their specific requirements before or after setup. This provides flexibility and extensibility for advanced use cases. |
Beta Was this translation helpful? Give feedback.
-
This is a primary change for Ratify users. I would like to invite @lefteris @DahuK @fseldow @kingnarmer @kingnarmer to share your opinions or concerns if you have. Thanks :-) |
Beta Was this translation helpful? Give feedback.
-
As shared during the community meeting, we could consider a flexible hybrid approach to balance usability, modularity and migration. The hybrid approach is that Ratify v2 introduces a new CRD as a higher-level CRD providing a simplified user interface for users. This higher-level CRD only inlucdes parameters for common scenarios. The existing multiple CRDs are still kept in v2 as lower-level CRDs, and users can also fine-tune resources using those lower-level CRDs if they want. With this, it's easy for v1 to migrate as all the parameters are still there. We will be recommending higher-level CRD for all users, watching any issues with it, and may deprecate lower-level CRDs when time comes. For v1 users in production, they have a period to figure out the path to transit to the higher-level CRD. |
Beta Was this translation helpful? Give feedback.
-
Thanks for reviewing the proposal and providing feedback! Before diving into the details, I’d like to clarify two points:
Overall, I like the idea of a hybrid approach—not just for easing the migration from v1 to v2, but also to offer users more flexibility in configuring their setup. However, as a long-term direction, if we choose to adopt a unified CRD, we would eventually deprecate the split CRDs to avoid the overhead of maintaining both. For the migration path, Ratify could offer tools to help users convert their CRDs from v1 to v2. In cases where CRs are too complex or incompatible, users may need to follow manual instructions to complete the migration. And I'll provide some examples comparing v1 and v2 in different user scenarios to help explain the proposal. |
Beta Was this translation helpful? Give feedback.
-
Example Configurations Using the Unified CRD
Example: Validate a Docker Hub Image Signed with NotationapiVersion: config.ratify.notaryproject.io/v2alpha1
kind: NamespacedRule
metadata:
name: sample-1
spec:
scopes:
- docker.io/library
verifiers:
- name: notation-1
type: notation
parameters:
certificates:
- files:
- ${CERTIFICATE_PATH}
stores:
type: registry-store
parameters:
credential:
username: ""
password: ""
policyEnforcer:
type: threshold-policy
parameters:
policy:
rules:
- verifierName: notation-1 Example: Validate ECR Images Signed with CosignapiVersion: config.ratify.notaryproject.io/v2alpha1
kind: NamespacedRule
metadata:
name: sample-1
spec:
scopes:
- "*.ecr.<region>.amazonaws.com"
verifiers:
- name: cosign-1
type: cosign
parameters:
keyless:
certificateOIDCIssuer:
certificateidentity:
stores:
type: registry-store
parameters:
provider: awsEcrBasic
policyEnforcer:
type: threshold-policy
parameters:
policy:
rules:
- verifierName: cosign-1 Example: Validate Azure Container Registry Images with NotationapiVersion: config.ratify.notaryproject.io/v2alpha1
kind: NamespacedRule
metadata:
name: sample-1
spec:
scopes:
- *.azurecr.io
verifiers:
- name: notation-1
type: notation
parameters:
certificates:
- type: azurekeyvault
vaultURI:
tenantID:
certificates:
- name:
version:
keys:
- name:
version:
stores:
type: registry-store
parameters:
provider: azureContainerRegistry
identityType: azureManagedIdentity
clientID:
policyEnforcer:
type: threshold-policy
parameters:
policy:
rules:
- verifierName: notation-1 Example: Validate Alibaba Cloud Container Registry Images with NotationapiVersion: config.ratify.notaryproject.io/v2alpha1
kind: NamespacedRule
metadata:
name: sample-1
spec:
scopes:
- registry.<region>.aliyuncs.com
verifiers:
- name: notation-1
type: notation
parameters:
certificates:
- type: inline
value: |
-----BEGIN CERTIFICATE-----
XXXXXX
XXXXXX
XXXXXX
-----END CERTIFICATE-----
stores:
type: registry-store
parameters:
provider: alibabacloudAcrBasic
defaultInstanceId:
acrInstancesConfig:
policyEnforcer:
type: threshold-policy
parameters:
policy:
rules:
- verifierName: notation-1 |
Beta Was this translation helpful? Give feedback.
-
Recording-20250627_103545.mp4Pasting a demo for the new v2 CRD. |
Beta Was this translation helpful? Give feedback.
-
I tested the basic capabilities of v2 using the templates in the deployments directory on an Alibaba Cloud cluster. The centralized configuration in the Executor is indeed much more convenient compared to V1. However, I have a few questions:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In Ratify v1, we defined four different Custom Resource Definitions (CRDs) to configure the following components:
To support multi-tenancy, each component has both cluster-scoped and namespaced variants. This results in a total of 8 CRDs. In a single-tenant setup, users (or Helm charts) must apply at least four separate Custom Resources (CRs) for Ratify to function correctly.
Motivation for Change
In Ratify v2, we are exploring the idea of consolidating all configurations into a single CR. The goal is to simplify setup and management, especially for common use cases.
User Experience
While the number of configuration parameters remains the same between the two approaches (split vs. single CR), user experience is notably different. For simple scenarios—such as verifying an image signed with a Notation signature—a single CR can be much more concise and user-friendly.
Example: Consolidated Configuration
Benefits of a Unified CR
However, a single "giant" CR can also introduce drawbacks:
We'll focus on the user experience comparison in this section and ignore the implementation complexity. The below table shows the comparison between 2 approaches.
User Experience Comparison
Recommendation
The choice between a single unified CR and multiple specialized CRs should be driven by the use case:
Beta Was this translation helpful? Give feedback.
All reactions