Documentation ¶
Overview ¶
Copyright 2020 IBM Corporation
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 ¶
- Variables
- func ChangeKubeContextToDefaultUser(framework *Framework, namespace, expected string) error
- func ChangeKubeContextToKubeAdmin() error
- func CheckConfigMap(framework *Framework, namespace, expected string) error
- func CheckEventNoSignature(framework *Framework, namespace, expected string) error
- func CheckIVResources(framework *Framework, kind, namespace, expected string) error
- func CheckPodStatus(framework *Framework, namespace, expected string) error
- func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
- func GetPodName(framework *Framework, namespace, expected string) string
- func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
- func GetSecretName(framework *Framework, namespace, expected string) (string, error)
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodReadyConditionTrue(status corev1.PodStatus) bool
- func IsTargetPodReadyConditionTrue(pods *corev1.PodList, expected string) (found, ready bool)
- func Kubectl(args ...string) error
- func KubectlOut(args ...string) (error, string)
- func Load(data []byte) (*clientcmdapi.Config, error)
- func LoadConfig(config, context string) (*rest.Config, error)
- func LoadConfigMap(framework *Framework, namespace, expected string) (error, *corev1.ConfigMap)
- func LoadFromFile(filename string) (*clientcmdapi.Config, error)
- func RestclientConfig(config, context string) (*clientcmdapi.Config, error)
- type Framework
Constants ¶
This section is empty.
Variables ¶
var (
DefaultSignPolicyCRName = "sign-policy"
)
Functions ¶
func ChangeKubeContextToKubeAdmin ¶
func ChangeKubeContextToKubeAdmin() error
func CheckConfigMap ¶
func CheckEventNoSignature ¶
func CheckIVResources ¶
func CheckPodStatus ¶
func GetPodCondition ¶
func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func GetPodName ¶
func GetPodReadyCondition ¶
func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
func GetSecretName ¶
func IsPodReady ¶
IsPodReady returns true if a pod is ready; false otherwise.
func IsPodReadyConditionTrue ¶
IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.
func KubectlOut ¶
func LoadConfigMap ¶
func LoadFromFile ¶
func LoadFromFile(filename string) (*clientcmdapi.Config, error)
func RestclientConfig ¶
func RestclientConfig(config, context string) (*clientcmdapi.Config, error)
Types ¶
type Framework ¶
type Framework struct { BaseName string KubeConfig string KubeContext string Kubectl string // KubeClientConfig which was used to create the connection. KubeClientConfig *rest.Config // Kubernetes API clientsets KubeClientSet kubernetes.Interface APIExtensionsClientSet apiextcs.Interface RSPClient rspclient.ApisV1alpha1Interface SignPolicyClient spclient.ApisV1alpha1Interface VerifierConfigClient vcclient.ApisV1alpha1Interface // Namespace in which all test resources should reside Namespace *v1.Namespace }