pod

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright 2019 kubeflow.org.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 kubeflow.org.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	GkeAcceleratorNodeSelector = "cloud.google.com/gke-accelerator"
	NvidiaGPUTaintValue        = "present"
)

These constants are used for detecting and applying GPU selectors

View Source
const (
	LoggerContainerName            = "inferenceservice-logger"
	LoggerConfigMapKeyName         = "logger"
	PodKnativeServiceLabel         = "serving.knative.dev/service"
	LoggerArgumentLogUrl           = "--log-url"
	LoggerArgumentSourceUri        = "--source-uri"
	LoggerArgumentMode             = "--log-mode"
	LoggerArgumentInferenceService = "--inference-service"
	LoggerArgumentNamespace        = "--namespace"
	LoggerArgumentEndpoint         = "--endpoint"
)
View Source
const (
	StorageInitializerContainerName         = "storage-initializer"
	StorageInitializerConfigMapKeyName      = "storageInitializer"
	StorageInitializerVolumeName            = "kfserving-provision-location"
	StorageInitializerContainerImage        = "gcr.io/kfserving/storage-initializer"
	StorageInitializerContainerImageVersion = "latest"
	PvcURIPrefix                            = "pvc://"
	PvcSourceMountName                      = "kfserving-pvc-source"
	PvcSourceMountPath                      = "/mnt/pvc"
)

Variables

This section is empty.

Functions

func InjectGKEAcceleratorSelector

func InjectGKEAcceleratorSelector(pod *v1.Pod) error

Types

type LoggerConfig

type LoggerConfig struct {
	Image         string `json:"image"`
	CpuRequest    string `json:"cpuRequest"`
	CpuLimit      string `json:"cpuLimit"`
	MemoryRequest string `json:"memoryRequest"`
	MemoryLimit   string `json:"memoryLimit"`
}

type LoggerInjector

type LoggerInjector struct {
	// contains filtered or unexported fields
}

func (*LoggerInjector) InjectLogger

func (il *LoggerInjector) InjectLogger(pod *v1.Pod) error

type Mutator

type Mutator struct {
	Client  client.Client
	Decoder *admission.Decoder
}

Mutator is a webhook that injects incoming pods

func (*Mutator) Handle

func (mutator *Mutator) Handle(ctx context.Context, req admission.Request) admission.Response

Handle decodes the incoming Pod and executes mutation logic.

func (*Mutator) InjectClient

func (mutator *Mutator) InjectClient(c client.Client) error

InjectClient injects the client.

func (*Mutator) InjectDecoder

func (mutator *Mutator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type StorageInitializerConfig

type StorageInitializerConfig struct {
	Image         string `json:"image"`
	CpuRequest    string `json:"cpuRequest"`
	CpuLimit      string `json:"cpuLimit"`
	MemoryRequest string `json:"memoryRequest"`
	MemoryLimit   string `json:"memoryLimit"`
}

type StorageInitializerInjector

type StorageInitializerInjector struct {
	// contains filtered or unexported fields
}

func (*StorageInitializerInjector) InjectStorageInitializer

func (mi *StorageInitializerInjector) InjectStorageInitializer(pod *v1.Pod) error

InjectStorageInitializer injects an init container to provision model data for the serving container in a unified way across storage tech by injecting a provisioning INIT container. This is a work around because KNative does not support INIT containers: https://github.com/knative/serving/issues/4307

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL