Skip to content

Commit

Permalink
update llmproviderpolicy -> llmsecuritypolicy
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Choo <[email protected]>
  • Loading branch information
aabchoo committed Dec 13, 2024
1 parent 7e9315c commit 57e0fa1
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 165 deletions.
22 changes: 9 additions & 13 deletions api/v1alpha1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const (
LLMModelHeaderKey = "x-envoy-ai-gateway-llm-model"
)

// LLMProviderType specifies the type of the LLMProviderPolicy.
// LLMProviderType specifies the type of the LLMSecurityPolicy.
type LLMProviderType string

const (
Expand All @@ -154,15 +154,15 @@ const (

// +kubebuilder:object:root=true

// LLMProviderPolicy specifies the provider specific configuration.
type LLMProviderPolicy struct {
// LLMSecurityPolicy specifies the provider specific configuration.
type LLMSecurityPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LLMProviderPolicySpec `json:"spec,omitempty"`
Spec LLMSecurityPolicySpec `json:"spec,omitempty"`
}

// LLMProviderPolicySpec specifies a provider (e.g.AWS Bedrock, Azure etc.) specific-configuration like auth
type LLMProviderPolicySpec struct {
// LLMSecurityPolicySpec specifies a provider (e.g.AWS Bedrock, Azure etc.) specific-configuration like auth
type LLMSecurityPolicySpec struct {
// BackendRefs lists the LLMBackends that this provider policy will apply
// The namespace is "local", i.e. the same namespace as the LLMRoute.
//
Expand All @@ -180,11 +180,11 @@ type LLMProviderPolicySpec struct {

// +kubebuilder:object:root=true

// LLMProviderPolicyList contains a list of LLMProviderPolicy
type LLMProviderPolicyList struct {
// LLMSecurityPolicyList contains a list of LLMSecurityPolicy
type LLMSecurityPolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LLMProviderPolicy `json:"items"`
Items []LLMSecurityPolicy `json:"items"`
}

// LLMProviderAPIKey specifies the API key.
Expand All @@ -207,10 +207,6 @@ type LLMProviderAPIKey struct {
//
// +optional
Inline *string `json:"inline,omitempty"`

// BackendRefs lists the LLMBackends that this API Key will apply
//
BackendRefs []egv1a1.BackendRef `json:"backendRefs"`
}

// LLMProviderAPIKeyType specifies the type of LLMProviderAPIKey.
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
func init() {
SchemeBuilder.Register(&LLMRoute{}, &LLMRouteList{})
SchemeBuilder.Register(&LLMBackend{}, &LLMBackendList{})
SchemeBuilder.Register(&LLMProviderPolicy{}, &LLMProviderPolicyList{})
SchemeBuilder.Register(&LLMSecurityPolicy{}, &LLMSecurityPolicyList{})
}

const GroupName = "aigateway.envoyproxy.io"
Expand Down
95 changes: 44 additions & 51 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Loading

0 comments on commit 57e0fa1

Please sign in to comment.