Skip to content
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

More trust store types #16

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9c1ba64
feat: basic function of multi-type trustStore
junczhu Jan 15, 2024
35a2894
feat: basic function local test passed
junczhu Jan 16, 2024
1fa8177
feat: basic function support back compatibility
junczhu Jan 17, 2024
69b4a2b
chore: fix golint
junczhu Jan 17, 2024
8cfe2f9
feat: basic function of backward compatibility
junczhu Jan 18, 2024
727c7bf
feat: basic function of backward compatibility 2
junczhu Jan 18, 2024
aee48ca
feat: basic function of backward compatibility3
junczhu Jan 18, 2024
dec2de8
feat: basic function of backward compatibility4
junczhu Jan 18, 2024
0ea0fee
feat: basic function of backward compatibility5
junczhu Jan 18, 2024
d412211
Merge branch 'main' into more-trust-store-types
junczhu Jan 18, 2024
f082837
refactor: simplify convertion logic and getcertificates
junczhu Jan 19, 2024
5d75d4a
fix: unit test
junczhu Jan 19, 2024
efc6466
test: updated unit test
junczhu Jan 22, 2024
c4715cc
test: updated e2e test
junczhu Jan 22, 2024
8fe9a80
test: updated e2e test2
junczhu Jan 22, 2024
e567b88
test: updated e2e test3
junczhu Jan 22, 2024
0b66f31
test: updated e2e test4
junczhu Jan 22, 2024
ab31732
chore: updated variable naming etc
junczhu Jan 23, 2024
48248d1
chore: added a sample in comment for the new structure
junczhu Jan 25, 2024
7bb6147
chore: update trustStore functions
junczhu Jan 30, 2024
e57d668
fix: update trustStore getCertificatesInternal
junczhu Jan 30, 2024
a071d22
test: update notation unit test
junczhu Jan 30, 2024
64b2b8b
chore: update some typo
junczhu Jan 31, 2024
290dba8
fix: upgrade filterValidCerts
junczhu Jan 31, 2024
85c2470
fix: upgrade e2e
junczhu Jan 31, 2024
848fec7
fix: upgrade e2e
junczhu Jan 31, 2024
2f47715
chore: Bump codecov/codecov-action from 3.1.5 to 3.1.6 (#1288)
dependabot[bot] Jan 31, 2024
5225247
fix: add missing CRD conversion methods (#1289)
binbin-li Feb 1, 2024
9127a32
fix: upgrade unit tests
junczhu Feb 1, 2024
c0ab5c0
Merge branch 'main' into more-trust-store-types
junczhu Feb 1, 2024
45c0f81
fix: fix unit tests that fail in local environment (#1292)
binbin-li Feb 1, 2024
b828468
fix: upgrade certMapping
junczhu Feb 1, 2024
d9548e6
fix: update e2e with gencert
junczhu Feb 1, 2024
8efcd28
fix: update e2e; add unit test
junczhu Feb 1, 2024
3ae1066
Merge branch 'main' into more-trust-store-types
junczhu Feb 1, 2024
efdeda7
fix: rm unused func in test
junczhu Feb 1, 2024
8b4e580
chore: rm blank lines
junczhu Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Check build
run: bin/ratify version
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
- name: Run helm lint
run: helm lint charts/ratify

Expand All @@ -75,7 +75,7 @@ jobs:
make install ratify-config install-bats
make test-e2e-cli LOCAL_REGISTRY_IMAGE=registry GOCOVERDIR=${GITHUB_WORKSPACE}/test/e2e/.cover
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6

build_test_e2e:
name: "Build and run e2e Test"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ e2e-helm-deploy-ratify-without-tls-certs:
--set image.tag=test \
--set gatekeeper.version=${GATEKEEPER_VERSION} \
--set featureFlags.RATIFY_CERT_ROTATION=${CERT_ROTATION_ENABLED} \
--set notaryCert="$$(cat ~/.config/notation/localkeys/ratify-bats-test.crt)" \
--set notationCerts[0]="$$(cat ~/.config/notation/localkeys/ratify-bats-test.crt)" \
--set cosign.key="$$(cat .staging/cosign/cosign.pub)" \
--set oras.useHttp=true \
--set-file dockerConfig="mount_config.json" \
Expand Down
11 changes: 11 additions & 0 deletions api/unversioned/store_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ type StoreSpec struct {

// Name of the store
Name string `json:"name,omitempty"`
// Version of the store plugin. Optional
Version string `json:"version,omitempty"`
// Plugin path, optional
Address string `json:"address,omitempty"`
// OCI Artifact source to download the plugin from, optional
Expand All @@ -40,6 +42,15 @@ type StoreSpec struct {
// StoreStatus defines the observed state of Store
type StoreStatus struct {
// Important: Run "make" to regenerate code after modifying this file

// Is successful in finding the plugin
IsSuccess bool `json:"issuccess"`
// Error message if operation was unsuccessful
// +optional
Error string `json:"error,omitempty"`
// Truncated error message if the message is too long
// +optional
BriefError string `json:"brieferror,omitempty"`
}

// Store is the Schema for the stores API
Expand Down
12 changes: 12 additions & 0 deletions api/unversioned/verifier_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ type VerifierSpec struct {
// Name of the verifier
Name string `json:"name,omitempty"`

// Version of the verifier plugin. Optional
Version string `json:"version,omitempty"`

// The type of artifact this verifier handles
ArtifactTypes string `json:"artifactTypes,omitempty"`

Expand All @@ -46,6 +49,15 @@ type VerifierSpec struct {
type VerifierStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Is successful in finding the plugin
IsSuccess bool `json:"issuccess"`
// Error message if operation was unsuccessful
// +optional
Error string `json:"error,omitempty"`
// Truncated error message if the message is too long
// +optional
BriefError string `json:"brieferror,omitempty"`
}

// Verifier is the Schema for the verifiers API
Expand Down
37 changes: 37 additions & 0 deletions api/v1alpha1/store_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright The Ratify Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
unversioned "github.com/deislabs/ratify/api/unversioned"
conversion "k8s.io/apimachinery/pkg/conversion"
)

// Convert unversioned StoreStatus to StoreStatus of v1alpha1.
//
//nolint:revive
func Convert_unversioned_StoreStatus_To_v1alpha1_StoreStatus(in *unversioned.StoreStatus, out *StoreStatus, _ conversion.Scope) error {
return nil
}

// Convert unversioned StoreSpec to VerifieStoreSpecrSpec of v1alpha1.
//
//nolint:revive
func Convert_unversioned_StoreSpec_To_v1alpha1_StoreSpec(spec *unversioned.StoreSpec, out *StoreSpec, _ conversion.Scope) error {
out.Parameters = spec.Parameters
return nil
}
37 changes: 37 additions & 0 deletions api/v1alpha1/verifier_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright The Ratify Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
unversioned "github.com/deislabs/ratify/api/unversioned"
conversion "k8s.io/apimachinery/pkg/conversion"
)

// Convert unversioned VerifierStatus to VerifierStatus of v1alpha1.
//
//nolint:revive
func Convert_unversioned_VerifierStatus_To_v1alpha1_VerifierStatus(status *unversioned.VerifierStatus, out *VerifierStatus, _ conversion.Scope) error {
return nil
}

// Convert unversioned VerifierSpec to VerifierSpec of v1alpha1.
//
//nolint:revive
func Convert_unversioned_VerifierSpec_To_v1alpha1_VerifierSpec(spec *unversioned.VerifierSpec, out *VerifierSpec, _ conversion.Scope) error {
out.Parameters = spec.Parameters
return nil
}
126 changes: 77 additions & 49 deletions api/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading