Documentation ¶
Overview ¶
Copyright © 2021 The LitmusChaos Authors
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 © 2021 The LitmusChaos Authors ¶
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 ¶
- func ApplyYaml(params ApplyYamlPrams, kubeconfig string, isLocal bool) (output string, err error)
- func CheckSAPermissions(params CheckSAPermissionsParams, kubeconfig *string) (bool, error)
- func ClientSet(kubeconfig *string) (*kubernetes.Clientset, error)
- func GetConfigMap(c context.Context, name string, namespace string) (map[string]string, error)
- func NsExists(namespace string, kubeconfig *string) (bool, error)
- func SAExists(params SAExistsParams, kubeconfig *string) bool
- func ValidNs(mode string, label string, kubeconfig *string) (string, bool)
- func ValidSA(namespace string, kubeconfig *string) (string, bool)
- func WatchPod(params WatchPodParams, kubeconfig *string)
- type ApplyYamlPrams
- type CanIOptions
- type CheckSAPermissionsParams
- type PodList
- type SAExistsParams
- type WatchPodParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyYaml ¶
func ApplyYaml(params ApplyYamlPrams, kubeconfig string, isLocal bool) (output string, err error)
func CheckSAPermissions ¶
func CheckSAPermissions(params CheckSAPermissionsParams, kubeconfig *string) (bool, error)
func ClientSet ¶
func ClientSet(kubeconfig *string) (*kubernetes.Clientset, error)
Returns a new kubernetes client set
func GetConfigMap ¶
GetConfigMap returns config map for a given name and namespace
func SAExists ¶
func SAExists(params SAExistsParams, kubeconfig *string) bool
SAExists checks if the given service account exists in the given namespace
func WatchPod ¶
func WatchPod(params WatchPodParams, kubeconfig *string)
WatchPod watches for the pod status
Types ¶
type ApplyYamlPrams ¶
Token: Authorization token EndPoint: Endpoint in .chaosconfig YamlPath: Path of yaml file
type CanIOptions ¶
type CanIOptions struct { NoHeaders bool Namespace string AuthClient authorizationv1client.AuthorizationV1Interface DiscoveryClient discovery.DiscoveryInterface Verb string Resource schema.GroupVersionResource Subresource string ResourceName string }