Documentation ¶
Index ¶
- func GetClientSet(useInClusterConfig bool) (*kubernetes.Clientset, error)
- type APITokenProvider
- type KeptnEndpointProvider
- type NamespaceManager
- func (a *NamespaceManager) CreateNamespace(ctx context.Context, namespace string, namespaceMetadata ...metav1.ObjectMeta) error
- func (a *NamespaceManager) ExistsNamespace(ctx context.Context, namespace string) (bool, error)
- func (a *NamespaceManager) GetKeptnManagedNamespace(ctx context.Context) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientSet ¶
func GetClientSet(useInClusterConfig bool) (*kubernetes.Clientset, error)
GetClientSet returns the kubernetes Clientset
Types ¶
type APITokenProvider ¶
type APITokenProvider struct {
// contains filtered or unexported fields
}
APITokenProvider wraps around the kubernetes interface to enhance testability
func NewAPITokenProvider ¶
func NewAPITokenProvider(useInClusterConfig bool) (*APITokenProvider, error)
NewAPITokenProvider creates new APITokenProvider
func (*APITokenProvider) GetKeptnAPITokenFromSecret ¶
func (a *APITokenProvider) GetKeptnAPITokenFromSecret(ctx context.Context, namespace string, secretName string) (string, error)
GetKeptnAPITokenFromSecret returns the `keptn-api-token` data secret from Keptn Installation
type KeptnEndpointProvider ¶
type KeptnEndpointProvider struct {
// contains filtered or unexported fields
}
KeptnEndpointProvider wraps around the kubernetes interface to enhance testability
func NewKeptnEndpointProvider ¶
func NewKeptnEndpointProvider(useInClusterConfig bool) (*KeptnEndpointProvider, error)
NewKeptnEndpointProvider creates new KeptnEndpointProvider
func (*KeptnEndpointProvider) GetKeptnEndpointFromIngress ¶
func (a *KeptnEndpointProvider) GetKeptnEndpointFromIngress(ctx context.Context, namespace string, ingressName string) (string, error)
GetKeptnEndpointFromIngress returns the host of ingress object Keptn Installation
func (*KeptnEndpointProvider) GetKeptnEndpointFromService ¶
func (a *KeptnEndpointProvider) GetKeptnEndpointFromService(ctx context.Context, namespace string, serviceName string) (string, error)
GetKeptnEndpointFromService returns the loadbalancer service IP from Keptn Installation
type NamespaceManager ¶
type NamespaceManager struct {
// contains filtered or unexported fields
}
NamespaceManager wraps around the kubernetes interface to enhance testability
func NewNamespaceManager ¶
func NewNamespaceManager(useInClusterConfig bool) (*NamespaceManager, error)
NewNamespaceManager creates new NamespaceManager
func (*NamespaceManager) CreateNamespace ¶
func (a *NamespaceManager) CreateNamespace(ctx context.Context, namespace string, namespaceMetadata ...metav1.ObjectMeta) error
CreateNamespace creates a new Kubernetes namespace with the provided name
func (*NamespaceManager) ExistsNamespace ¶
ExistsNamespace checks whether a namespace with the provided name exists
func (*NamespaceManager) GetKeptnManagedNamespace ¶
func (a *NamespaceManager) GetKeptnManagedNamespace(ctx context.Context) ([]string, error)
GetKeptnManagedNamespace returns the list of namespace with the annotation & label `keptn.sh/managed-by: keptn`