resource

package
v0.10.0-m1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the Submariner project.

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.

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the Submariner project.

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.

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the Submariner project.

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 (
	InvalidScheduling schedulingType = iota
	GatewayNode
	NonGatewayNode
	CustomNode
)
View Source
const (
	HostNetworking networkingType = true
	PodNetworking  networkingType = false
)

Variables

This section is empty.

Functions

func ExecWithOptions

func ExecWithOptions(config ExecConfig, options ExecOptions) (string, string, error)

ExecWithOptions executes a command in the specified container, returning stdout, stderr and error. `options` allowed for additional parameters to be passed.

func SchedulePodAwaitCompletion

func SchedulePodAwaitCompletion(config *PodConfig) (string, error)

Types

type ExecConfig

type ExecConfig struct {
	RestConfig *rest.Config
	ClientSet  kubernetes.Interface
}

type ExecOptions

type ExecOptions struct {
	Command       []string
	Namespace     string
	PodName       string
	ContainerName string
	Stdin         io.Reader
	CaptureStdout bool
	CaptureStderr bool
	// If false, whitespace in std{err,out} will be removed.
	PreserveWhitespace bool
	Quiet              bool
}

Following are sourced from:

https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/exec_util.go

func ExecOptionsFromPod

func ExecOptionsFromPod(pod *v1.Pod) ExecOptions

type NetworkPod

type NetworkPod struct {
	Pod       *v1.Pod
	Config    *PodConfig
	PodOutput string
}

func SchedulePod

func SchedulePod(config *PodConfig) (*NetworkPod, error)

func (*NetworkPod) AwaitPodCompletion

func (np *NetworkPod) AwaitPodCompletion() error

func (*NetworkPod) DeletePod

func (np *NetworkPod) DeletePod()

type PodConfig

type PodConfig struct {
	Name       string
	ClientSet  *kubernetes.Clientset
	Scheduling PodScheduling
	Namespace  string
	Command    string
	Timeout    uint
}

type PodScheduling

type PodScheduling struct {
	ScheduleOn schedulingType
	NodeName   string
	Networking networkingType
}

Jump to

Keyboard shortcuts

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