Skip to content

Commit

Permalink
chore(deps): update dependency kubernetes-sigs/controller-tools to v0…
Browse files Browse the repository at this point in the history
….16.1 (#497)

* chore(deps): update dependency kubernetes-sigs/controller-tools to v0.16.1

* chore: regenerate

* fix: use uniform apigroup for events in kubebuilder codemarkers

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Patryk Małek <patryk.malek@konghq.com>
  • Loading branch information
renovate[bot] and pmalek authored Aug 15, 2024
1 parent 3a90c59 commit 6b9a627
Show file tree
Hide file tree
Showing 10 changed files with 121 additions and 1,191 deletions.
2 changes: 1 addition & 1 deletion .tools_versions.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# renovate: datasource=github-tags depName=kubernetes/code-generator
code-generator: "0.30.3"
# renovate: datasource=github-releases depName=kubernetes-sigs/controller-tools
controller-tools: "0.15.0"
controller-tools: "0.16.1"
# renovate: datasource=github-releases depName=kubernetes-sigs/kustomize
kustomize: "5.4.3"
# renovate: datasource=github-releases depName=golangci/golangci-lint
Expand Down
73 changes: 9 additions & 64 deletions config/crd/bases/gateway-operator.konghq.com_aigateways.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.1
name: aigateways.gateway-operator.konghq.com
spec:
group: gateway-operator.konghq.com
Expand All @@ -26,47 +26,39 @@ spec:
AIGateway is a network Gateway enabling access and management for AI &
Machine Learning models such as Large Language Models (LLM).
The underlying technology for the AIGateway is the Kong Gateway configured
with a variety of plugins which provide the the AI featureset.
This is a list of the plugins, which are available in Kong Gateway v3.6.x+:
- ai-proxy (https://github.com/kong/kong/tree/master/kong/plugins/ai-proxy)
- ai-request-transformer (https://github.com/kong/kong/tree/master/kong/plugins/ai-request-transformer)
- ai-response-transformers (https://github.com/kong/kong/tree/master/kong/plugins/ai-response-transformer)
- ai-prompt-template (https://github.com/kong/kong/tree/master/kong/plugins/ai-prompt-template)
- ai-prompt-guard-plugin (https://github.com/kong/kong/tree/master/kong/plugins/ai-prompt-guard)
- ai-prompt-decorator-plugin (https://github.com/kong/kong/tree/master/kong/plugins/ai-prompt-decorator)
So effectively the AIGateway resource provides a bespoke Gateway resource
(which it owns and manages) with the gateway, consumers and plugin
configurations automated and configurable via Kubernetes APIs.
The current iteration only supports the proxy itself, but the API is being
built with room for future growth in several dimensions. For instance:
- Supporting auxiliary functions (e.g. decorator, guard, templater, token-rate-limit)
- Supporting request/response transformers
- Supporting more than just LLMs (e.g. CCNs, GANs, e.t.c.)
- Supporting more hosting options for LLMs (e.g. self hosted)
- Supporting more AI cloud providers
- Supporting more AI cloud provider features
The validation rules throughout are set up to ensure at least one
cloud-provider-based LLM is specified, but in the future when we have more
model types and more hosting options for those types so we may want to look
into using CEL validation to ensure that at least one model configuration is
provided. We may also want to use CEL to validate things like identifier
unique-ness, e.t.c.
See: https://kubernetes.io/docs/reference/using-api/cel/
properties:
apiVersion:
Expand Down Expand Up @@ -95,14 +87,12 @@ spec:
Secret) which contains the credentials needed to access the APIs of
cloud providers.
This is the global configuration that will be used by DEFAULT for all
model configurations. A secret configured this way MAY include any number
of key-value pairs equal to the number of providers you have, but used
this way the keys MUST be named according to their providers (e.g.
"openai", "azure", "cohere", e.t.c.). For example:
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -113,16 +103,13 @@ spec:
azure: *****************
cohere: *****************
See AICloudProviderName for a list of known and valid cloud providers.
Note that the keys are NOT case-sensitive (e.g. "OpenAI", "openai", and
"openAI" are all valid and considered the same keys) but if there are
duplicates endpoints failures conditions will be emitted and endpoints
will not be configured until the duplicates are resolved.
This is currently considered required, but in future iterations will be
optional as we do things like enable configuring credentials at the model
level.
Expand All @@ -131,7 +118,6 @@ spec:
description: |-
Kind is the API object kind
If not specified, it will be assumed to be "Secret". If a Secret is used
as the Kind, the secret must contain a single key-value pair where the
value is the secret API token. The key can be named anything, as long as
Expand All @@ -144,7 +130,6 @@ spec:
description: |-
Namespace is the namespace of the reference object.
If not specified, it will be assumed to be the same namespace as the
object which references it.
type: string
Expand All @@ -161,15 +146,13 @@ spec:
LargeLanguageModels is a list of Large Language Models (LLMs) to be
managed by the AI Gateway.
This is a required field because we only support LLMs at the moment. In
future iterations we may support other model types.
properties:
cloudHosted:
description: |-
CloudHosted configures LLMs hosted and served by cloud providers.
This is currently a required field, requiring at least one cloud-hosted
LLM be specified, however in future iterations we may add other hosting
options such as self-hosted LLMs as separate fields.
Expand Down Expand Up @@ -200,7 +183,6 @@ spec:
DefaultPromptParams configures the parameters which will be sent with
any and every inference request.
If this is set, there is currently no way to override these parameters
at the individual prompt level. This is an expected feature from later
releases of our AI plugins.
Expand Down Expand Up @@ -257,11 +239,9 @@ spec:
description: |-
LLMPrompt is a text prompt that includes parameters, a role and content.
This is intended for situations like when you need to provide roles in a
prompt to an LLM in order to influence its behavior and responses.
For example, you might want to provide a "system" role and tell the LLM
something like "you are a helpful assistant who responds in the style of
Sherlock Holmes".
Expand All @@ -276,7 +256,6 @@ spec:
prompt's purpose, such as "system" or "user" and can influence the
behavior of the LLM.
If not specified, "user" will be used as the default.
enum:
- user
Expand All @@ -299,7 +278,6 @@ spec:
description: |-
Model is the model name of the LLM (e.g. gpt-3.5-turbo, phi-2, e.t.c.).
If not specified, whatever the cloud provider specifies as the default
model will be used.
type: string
Expand All @@ -309,18 +287,15 @@ spec:
PromptType is the type of prompt to be used for inference requests to
the LLM (e.g. "chat", "completions").
If "chat" is specified, prompts sent by the user will be interactive,
contextual and stateful. The LLM will dynamically answer questions and
simulate a dialogue, while also keeping track of the conversation to
provide contextually relevant responses.
If "completions" is specified, prompts sent by the user will be
stateless and "one-shot". The LLM will provide a single response to the
prompt, without any context from previous prompts.
If not specified, "completions" will be used as the default.
enum:
- chat
Expand All @@ -340,7 +315,9 @@ spec:
- message: At least one class of LLMs has been configured
rule: (self.cloudHosted.size() != 0)
required:
- cloudProviderCredentials
- gatewayClassName
- largeLanguageModels
type: object
x-kubernetes-validations:
- message: At least one type of LLM has been specified
Expand All @@ -358,24 +335,14 @@ spec:
description: |-
Conditions describe the current conditions of the AIGateway.
Known condition types are:
- "Accepted"
- "Provisioning"
- "EndpointsReady"
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -416,12 +383,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down Expand Up @@ -455,25 +417,13 @@ spec:
description: |-
Conditions describe the current conditions of the AIGatewayEndpoint.
Known condition types are:
- "Provisioning"
- "EndpointReady"
items:
description: "Condition contains details for one aspect of
the current state of this API Resource.\n---\nThis struct
is intended for direct use as an array at the field path
.status.conditions. For example,\n\n\n\ttype FooStatus
struct{\n\t // Represents the observations of a foo's
current state.\n\t // Known .status.conditions.type are:
\"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t //
+listType=map\n\t // +listMapKey=type\n\t Conditions
[]metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\"
patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of
the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -515,12 +465,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
Loading

0 comments on commit 6b9a627

Please sign in to comment.