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 ¶
const ( InvalidScheduling schedulingType = iota GatewayNode NonGatewayNode CustomNode )
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.
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 ¶
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 }