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

Add logger to graph types #1305

Merged
merged 1 commit into from
Dec 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions operator/apis/machinelearning/v1/seldondeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,26 @@ type PredictiveUnit struct {
ModelURI string `json:"modelUri,omitempty" protobuf:"bytes,8,opt,name=modelUri"`
ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,9,opt,name=serviceAccountName"`
EnvSecretRefName string `json:"envSecretRefName,omitempty" protobuf:"bytes,10,opt,name=envSecretRefName"`
// Request/response payload logging. v2alpha1 feature that is added to v1 for backwards compatibility while v1 is the storage version.
Logger *Logger `json:"logger,omitempty"`
}

type LoggerMode string

const (
LogAll LoggerMode = "all"
LogRequest LoggerMode = "request"
LogResponse LoggerMode = "response"
)

// Logger provides optional payload logging for all endpoints
// +experimental
type Logger struct {
// URL to send request logging CloudEvents
// +optional
Url *string `json:"url,omitempty"`
// What payloads to log
Mode LoggerMode `json:"mode,omitempty"`
}

type DeploymentStatus struct {
Expand Down
25 changes: 25 additions & 0 deletions operator/apis/machinelearning/v1/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 @@ -5850,6 +5850,18 @@ spec:
type: string
implementation:
type: string
logger:
description: Request/response payload logging. v2alpha1 feature
that is added to v1 for backwards compatibility while v1
is the storage version.
properties:
mode:
description: What payloads to log
type: string
url:
description: URL to send request logging CloudEvents
type: string
type: object
methods:
items:
type: string
Expand Down
60 changes: 60 additions & 0 deletions operator/config/crd/patches/graph_children.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ spec:
type: string
type:
type: string
logger:
description: Request/response payload logging. v2alpha1 feature
that is added to v1 for backwards compatibility while v1
is the storage version.
properties:
mode:
description: What payloads to log
type: string
url:
description: URL to send request logging CloudEvents
type: string
type: object
type: object
endpoint:
properties:
Expand Down Expand Up @@ -113,6 +125,18 @@ spec:
type: string
type:
type: string
logger:
description: Request/response payload logging. v2alpha1 feature
that is added to v1 for backwards compatibility while v1
is the storage version.
properties:
mode:
description: What payloads to log
type: string
url:
description: URL to send request logging CloudEvents
type: string
type: object
type: object
endpoint:
properties:
Expand Down Expand Up @@ -151,6 +175,18 @@ spec:
type: string
type:
type: string
logger:
description: Request/response payload logging. v2alpha1 feature
that is added to v1 for backwards compatibility while v1
is the storage version.
properties:
mode:
description: What payloads to log
type: string
url:
description: URL to send request logging CloudEvents
type: string
type: object
type: object
endpoint:
properties:
Expand Down Expand Up @@ -189,6 +225,18 @@ spec:
type: string
type:
type: string
logger:
description: Request/response payload logging. v2alpha1 feature
that is added to v1 for backwards compatibility while v1
is the storage version.
properties:
mode:
description: What payloads to log
type: string
url:
description: URL to send request logging CloudEvents
type: string
type: object
type: object
endpoint:
properties:
Expand Down Expand Up @@ -227,4 +275,16 @@ spec:
type: string
type:
type: string
logger:
description: Request/response payload logging. v2alpha1 feature
that is added to v1 for backwards compatibility while v1
is the storage version.
properties:
mode:
description: What payloads to log
type: string
url:
description: URL to send request logging CloudEvents
type: string
type: object
type: object