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 ConfirmInstallation()
- func CreateRandomProject(userID string, cred types.Credentials) string
- func DiscoverPlatform(kubeconfig *string) string
- func GetAgentDetails(mode string, pid string, c types.Credentials, kubeconfig *string) (types.Agent, error)
- func GetModeType() string
- func GetPlatformName(kubeconfig *string) string
- func GetProjectID(u apis.ProjectDetails) string
- func IsAWSPlatform(kubeconfig *string) (bool, error)
- func IsGKEPlatform(kubeconfig *string) (bool, error)
- func IsOpenshiftPlatform(kubeconfig *string) (bool, error)
- func Summary(agent types.Agent, kubeconfig *string)
- func ValidateSAPermissions(namespace string, mode string, kubeconfig *string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfirmInstallation ¶
func ConfirmInstallation()
func CreateRandomProject ¶
func CreateRandomProject(userID string, cred types.Credentials) string
func DiscoverPlatform ¶
discoverPlatform determines the host platform and returns it
func GetAgentDetails ¶
func GetAgentDetails(mode string, pid string, c types.Credentials, kubeconfig *string) (types.Agent, error)
GetAgentDetails take details of chaos delegate as input
func GetModeType ¶
func GetModeType() string
GetModeType gets mode of chaos delegate installation as input
func GetPlatformName ¶
- Entering any character other than numbers returns 0. Input validation need to be done. - If input is given as "123abc", "abc" will be used for next user input. Buffer need to be read completely. - String literals like "AWS" are used at multiple places. Need to be changed to constants.
func GetProjectID ¶
func GetProjectID(u apis.ProjectDetails) string
GetProjectID display list of projects and returns the project id based on input
func IsAWSPlatform ¶
IsAWSPlatform determines if the host platform is AWS by checking the ProviderID inside node spec
Sample node custom resource of an AWS node
{ "apiVersion": "v1", "kind": "Node", .... "spec": { "providerID": "aws:///us-east-2b/i-0bf24d83f4b993738" } } }
func IsGKEPlatform ¶
IsGKEPlatform determines if the host platform is GKE by checking the ProviderID inside node spec
Sample node custom resource of an GKE node
{ "apiVersion": "v1", "kind": "Node", .... "spec": { "providerID": "" } } }
func IsOpenshiftPlatform ¶
IsOpenshiftPlatform determines if the host platform is Openshift by checking "node.openshift.io/os_id" label on the nodes
Sample node custom resource of an Openshift node
{ "apiVersion": "v1", "kind": "Node", "metadata": { "labels": { "node.openshift.io/os_id": "rhcos" } } .... }
func ValidateSAPermissions ¶
Types ¶
This section is empty.