Documentation ¶
Index ¶
- Constants
- Variables
- func Etcd() (etcd.Client, error)
- func GetEtcdVersion(ec EtcdConfig) (string, string, error)
- func GetSecretData(secretName, namespace string) (map[string][]byte, error)
- func InitEtcdConfig(config EtcdConfig)
- type CRD
- type EtcdConfig
- type KubernetesClient
- func (k KubernetesClient) CreateRoleBinding(roleBindingName string, rbacSubjects []rbac.Subject, namespace string, ...) error
- func (k KubernetesClient) CreateServiceAccount(podName string, namespace string) error
- func (k KubernetesClient) DeleteExtractedCredentialSecret(instanceID, ns string) error
- func (k KubernetesClient) DeleteRoleBinding(roleBindingName string, namespace string) error
- func (k KubernetesClient) GetExtractedCredentialSecretData(instanceID, ns string) (map[string]interface{}, error)
- func (k KubernetesClient) GetPodStatus(podName, namespace string) (*apiv1.PodStatus, error)
- func (k KubernetesClient) GetSecretData(secretName, namespace string) (map[string][]byte, error)
- func (k KubernetesClient) SaveExtractedCredentialSecret(instanceID, ns string, extCreds map[string]interface{}, ...) error
- func (k KubernetesClient) UpdateExtractedCredentialSecret(instanceID, ns string, extCreds map[string]interface{}, ...) error
- type OpenshiftClient
- func (o OpenshiftClient) GetClusterNetworkPlugin() (string, error)
- func (o OpenshiftClient) GetNetNamespace(nsName string) (*networkoapi.NetNamespace, error)
- func (o OpenshiftClient) Image() imagev1.ImageV1Interface
- func (o OpenshiftClient) IsolateNamespacesNetworks(netns *networkoapi.NetNamespace, targetNS string) (*networkoapi.NetNamespace, error)
- func (o OpenshiftClient) JoinNamespacesNetworks(netns *networkoapi.NetNamespace, targetNS string) (*networkoapi.NetNamespace, error)
- func (o OpenshiftClient) ListRegistryImages() (*v1.ImageList, error)
- func (o OpenshiftClient) Route() routev1.RouteV1Interface
- func (o OpenshiftClient) SubjectRulesReview(user string, groups []string, scopes []string, namespace string) (result []authoapi.PolicyRule, err error)
Constants ¶
const ( // ChangePodNetworkAnnotation - Annotation used for changing a pod // network, used to join networks together. ChangePodNetworkAnnotation = "pod.network.openshift.io/multitenant.change-network" )
Variables ¶
var ( // ErrCredentialsNotFound - Will be the return if extracted credentials can not be found ErrCredentialsNotFound = errors.New("credentials not found") )
Functions ¶
func GetEtcdVersion ¶
func GetEtcdVersion(ec EtcdConfig) (string, string, error)
GetEtcdVersion - Connects to ETCD cluster and retrieves server/version info
func GetSecretData ¶
GetSecretData - Returns the data inside of a given secret.
func InitEtcdConfig ¶
func InitEtcdConfig(config EtcdConfig)
InitEtcdConfig - Initialize the configuration for etcd.
Types ¶
type EtcdConfig ¶
type EtcdConfig struct { EtcdHost string `yaml:"etcd_host"` EtcdCaFile string `yaml:"etcd_ca_file"` EtcdClientCert string `yaml:"etcd_client_cert"` EtcdClientKey string `yaml:"etcd_client_key"` EtcdPort int `yaml:"etcd_port"` }
EtcdConfig - Etcd configuration
type KubernetesClient ¶
KubernetesClient - Client to interact with Kubernetes API
func Kubernetes ¶
func Kubernetes() (*KubernetesClient, error)
Kubernetes - Create a new kubernetes client if needed, returns reference
func (KubernetesClient) CreateRoleBinding ¶
func (k KubernetesClient) CreateRoleBinding( roleBindingName string, rbacSubjects []rbac.Subject, namespace string, targetNamespace string, roleRef rbac.RoleRef) error
CreateRoleBinding - Create a Role Binding
func (KubernetesClient) CreateServiceAccount ¶
func (k KubernetesClient) CreateServiceAccount(podName string, namespace string) error
CreateServiceAccount - Create a service account
func (KubernetesClient) DeleteExtractedCredentialSecret ¶
func (k KubernetesClient) DeleteExtractedCredentialSecret(instanceID, ns string) error
DeleteExtractedCredentialSecret - delete extracted credentials secret
func (KubernetesClient) DeleteRoleBinding ¶
func (k KubernetesClient) DeleteRoleBinding(roleBindingName string, namespace string) error
DeleteRoleBinding - Delete a Role Binding
func (KubernetesClient) GetExtractedCredentialSecretData ¶
func (k KubernetesClient) GetExtractedCredentialSecretData(instanceID, ns string) (map[string]interface{}, error)
GetExtractedCredentialSecretData - Get extracted credentials secret data
func (KubernetesClient) GetPodStatus ¶
func (k KubernetesClient) GetPodStatus(podName, namespace string) (*apiv1.PodStatus, error)
GetPodStatus - Returns the current status of a pod in a specified namespace
func (KubernetesClient) GetSecretData ¶
func (k KubernetesClient) GetSecretData(secretName, namespace string) (map[string][]byte, error)
GetSecretData - Returns the data inside of a given secret
func (KubernetesClient) SaveExtractedCredentialSecret ¶
func (k KubernetesClient) SaveExtractedCredentialSecret(instanceID, ns string, extCreds map[string]interface{}, labels map[string]string) error
SaveExtractedCredentialSecret - Save the extCreds as a secret
func (KubernetesClient) UpdateExtractedCredentialSecret ¶
func (k KubernetesClient) UpdateExtractedCredentialSecret(instanceID, ns string, extCreds map[string]interface{}, labels map[string]string) error
UpdateExtractedCredentialSecret - Updates the extCreds in a secret
type OpenshiftClient ¶
type OpenshiftClient struct {
// contains filtered or unexported fields
}
OpenshiftClient - Client to interact with openshift api
func Openshift ¶
func Openshift() (*OpenshiftClient, error)
Openshift - Create a new openshift client if needed, returns reference
func (OpenshiftClient) GetClusterNetworkPlugin ¶
func (o OpenshiftClient) GetClusterNetworkPlugin() (string, error)
GetClusterNetworkPlugin - Get cluster network
func (OpenshiftClient) GetNetNamespace ¶
func (o OpenshiftClient) GetNetNamespace(nsName string) (*networkoapi.NetNamespace, error)
GetNetNamespace - Get Net Namespace.
func (OpenshiftClient) Image ¶
func (o OpenshiftClient) Image() imagev1.ImageV1Interface
Image - Returns a V1Image Interface
func (OpenshiftClient) IsolateNamespacesNetworks ¶
func (o OpenshiftClient) IsolateNamespacesNetworks(netns *networkoapi.NetNamespace, targetNS string, ) (*networkoapi.NetNamespace, error)
IsolateNamespacesNetworks - Will take the net namespace to be added to a network, and the namespace ID of the network that is being added to..
func (OpenshiftClient) JoinNamespacesNetworks ¶
func (o OpenshiftClient) JoinNamespacesNetworks(netns *networkoapi.NetNamespace, targetNS string, ) (*networkoapi.NetNamespace, error)
JoinNamespacesNetworks - Will take the net namespace to be added to a network, and the namespace ID of the network that is being added to.
func (OpenshiftClient) ListRegistryImages ¶
func (o OpenshiftClient) ListRegistryImages() (*v1.ImageList, error)
ListRegistryImages - List images in internal OpenShift registry
func (OpenshiftClient) Route ¶
func (o OpenshiftClient) Route() routev1.RouteV1Interface
Route - Returns a V1Route Interface
func (OpenshiftClient) SubjectRulesReview ¶
func (o OpenshiftClient) SubjectRulesReview(user string, groups []string, scopes []string, namespace string) (result []authoapi.PolicyRule, err error)
SubjectRulesReview - create and run a OpenShift Subject Rules Review