Skip to content

Commit

Permalink
update documentation and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aabchoo committed Dec 16, 2024
1 parent bc0dadd commit 19c1337
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
8 changes: 5 additions & 3 deletions api/v1alpha1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ type LLMBackendSpec struct {
// +kubebuilder:validation:Required
BackendRef egv1a1.BackendRef `json:"backendRef"`

// LLMSecurityPolicyName list the LLMSecurityPolicy that this backend will depend on
// SecurityPolicyName list the LLMSecurityPolicy that this backend will depend on.
//
LLMSecurityPolicyName *string `json:"llmSecurityPolicyName,omitempty"`
// A SecurityPolicy specifies authentication, JWT, and API Key.
//
SecurityPolicyName *string `json:"securityPolicyName,omitempty"`
}

// LLMAPISchema defines the API schema of either LLMRoute (the input) or LLMBackend (the output).
Expand Down Expand Up @@ -158,7 +160,7 @@ const (

// +kubebuilder:object:root=true

// LLMSecurityPolicy specifies the provider specific configuration.
// LLMSecurityPolicy specifies the provider specific configuration like authorization, JWT, and API Key.
type LLMSecurityPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ spec:
- message: Must have port for Service reference
rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port)
: true'
llmSecurityPolicyName:
description: LLMSecurityPolicyName list the LLMSecurityPolicy that
this backend will depend on
type: string
outputSchema:
description: |-
APISchema specifies the API schema of the output format of requests from
Expand All @@ -156,6 +152,12 @@ spec:
required:
- schema
type: object
securityPolicyName:
description: |-
SecurityPolicyName list the LLMSecurityPolicy that this backend will depend on.
A SecurityPolicy specifies authentication, JWT, and API Key.
type: string
required:
- backendRef
- outputSchema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: LLMSecurityPolicy specifies the provider specific configuration.
description: LLMSecurityPolicy specifies the provider specific configuration
like authorization, JWT, and API Key.
properties:
apiVersion:
description: |-
Expand Down

0 comments on commit 19c1337

Please sign in to comment.