Documentation
¶
Index ¶
- Constants
- Variables
- func NewClient(logger lager.Logger, k8sclient ctrlclient.Client, cfg Config, opts ...Option) (garden.Client, error)
- func NewContainer(log lager.Logger, pod *corev1.Pod, env []string, cpuAssignment float64, ...) *container
- type Config
- type Factory
- type Option
- func WithCommandRunner(r commandrunner.CommandRunner) Option
- func WithContainerdClient(c containerd.Client) Option
- func WithEnableUserNamespaces(enable bool) Option
- func WithKubeletClient(k kubelet.Client) Option
- func WithSandboxPath(sandboxPath string) Option
- func WithUserLookupper(u users.UserLookupper) Option
- type Process
- type ZeroRootFSSizer
Constants ¶
View Source
const ( AppGUIDLabelKey = "cloudfoundry.org/app-guid" OrgGUIDLabelKey = "cloudfoundry.org/org-guid" SpaceGUIDLabelKey = "cloudfoundry.org/space-guid" WorkloadTypeKey = "cloudfoundry.org/workload-type" OwnerNameLabelKey = "cloudfoundry.org/owner-name" ContainerStateProperty = "garden.state" ContainerOwnerProperty = "executor:owner" ContainerWorkloadProperty = "network.container_workload" SpaceIDProperty = "network.space_id" OrgIDProperty = "network.org_id" AppIDProperty = "network.app_id" DefaultSandboxPath = "/var/run/containerd/io.containerd.runtime.v2.task/k8s.io" )
Variables ¶
View Source
var (
Caps = []string{"CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_FOWNER", "CAP_FSETID", "CAP_KILL", "CAP_SETGID", "CAP_SETUID", "CAP_SETPCAP", "CAP_NET_BIND_SERVICE", "CAP_NET_RAW", "CAP_SYS_CHROOT", "CAP_MKNOD", "CAP_AUDIT_WRITE", "CAP_SETFCAP"}
)
View Source
var ErrNotSupported = errors.New("not supported by the kubernetes-backed garden client")
ErrNotSupported is returned by garden.Client and garden.Container methods that the Kubernetes-backed implementation does not support.
Functions ¶
func NewContainer ¶
func NewContainer( log lager.Logger, pod *corev1.Pod, env []string, cpuAssignment float64, userLookupper users.UserLookupper, propertyManager gardener.PropertyManager, rootfsSize uint64, runningContainers map[string]containerd.RunningContainer, sandboxPath string, containerdClient containerd.Client, ) *container
Types ¶
type Factory ¶ added in v0.8.0
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
type Option ¶ added in v0.8.0
type Option func(*client)
func WithCommandRunner ¶ added in v0.8.0
func WithCommandRunner(r commandrunner.CommandRunner) Option
func WithContainerdClient ¶ added in v0.8.0
func WithContainerdClient(c containerd.Client) Option
func WithEnableUserNamespaces ¶ added in v0.8.2
func WithKubeletClient ¶ added in v0.8.0
func WithSandboxPath ¶ added in v0.8.0
func WithUserLookupper ¶ added in v0.8.0
func WithUserLookupper(u users.UserLookupper) Option
type ZeroRootFSSizer ¶ added in v0.8.0
type ZeroRootFSSizer struct{}
ZeroRootFSSizer reports a rootfs size of 0 for any path.
The Kubernetes-backed garden client already accounts for the rootfs size directly (Create subtracts it from the container's ephemeral-storage limit and BulkMetrics folds it into DiskStat.TotalBytesUsed). When the executor uses this client it must therefore be configured with a RootFSSizer that returns 0, so it does not subtract the rootfs size a second time. Wire this type into the executor's configuration for that purpose.
func (ZeroRootFSSizer) RootFSSizeFromPath ¶ added in v0.8.0
func (ZeroRootFSSizer) RootFSSizeFromPath(string) uint64
Click to show internal directories.
Click to hide internal directories.