-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
- Loading branch information
1 parent
b26d4cd
commit 3563ba2
Showing
14 changed files
with
153 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package v1alpha1 | ||
|
||
// ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image details. | ||
type ImageRegistry struct { | ||
// Reference is image reference to a container image in the registry. | ||
// Example: ghcr.io/kyverno/kyverno:latest | ||
Reference string `json:"reference"` | ||
|
||
// ImageRegistryCredentials provides credentials that will be used for authentication with registry. | ||
ImageRegistryCredentials *ImageRegistryCredentials `json:"imageRegistryCredentials,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package v1alpha1 | ||
|
||
type ImageRegistryCredentials struct { | ||
// AllowInsecureRegistry allows insecure access to a registry. | ||
AllowInsecureRegistry bool `json:"allowInsecureRegistry,omitempty"` | ||
|
||
// Providers specifies a list of OCI Registry names, whose authentication providers are provided. | ||
// It can be of one of these values: AWS, ACR, GCP, GHCR. | ||
Providers []ImageRegistryCredentialsProvider `json:"providers,omitempty"` | ||
|
||
// Secrets specifies a list of secrets that are provided for credentials. | ||
// Secrets must live in the Kyverno namespace. | ||
Secrets []string `json:"secrets,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package v1alpha1 | ||
|
||
// ImageRegistryCredentialsProvider provides the list of credential providers required. | ||
// +kubebuilder:validation:Enum=default;amazon;azure;google;github | ||
type ImageRegistryCredentialsProvider string | ||
|
||
const ( | ||
DEFAULT ImageRegistryCredentialsProvider = "default" | ||
AWS ImageRegistryCredentialsProvider = "amazon" | ||
ACR ImageRegistryCredentialsProvider = "azure" | ||
GCP ImageRegistryCredentialsProvider = "google" | ||
GHCR ImageRegistryCredentialsProvider = "github" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package v1alpha1 | ||
|
||
type MatchResources struct { | ||
// Any allows specifying resources which will be ORed | ||
// Any allows specifying resources which will be ORed. | ||
// +optional | ||
Any ResourceFilters `json:"any,omitempty"` | ||
|
||
// All allows specifying resources which will be ANDed | ||
// All allows specifying resources which will be ANDed. | ||
// +optional | ||
All ResourceFilters `json:"all,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
package v1alpha1 | ||
|
||
type PolicySpec struct { | ||
// Rules is a list of Rule instances. A Policy contains multiple rules and | ||
// each rule can validate, mutate, or generate resources. | ||
// Rules is a list of Rule instances. A Policy contains multiple rules and each rule can validate, mutate, or generate resources. | ||
Rules []Rule `json:"rules,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package v1alpha1 | ||
|
||
// ResourceFilters is a slice of ResourceFilter | ||
// ResourceFilters is a slice of ResourceFilter. | ||
type ResourceFilters []ResourceFilter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters