services

package
v0.0.0-...-88d0870 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2024 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PagerDutyGetEndpointList

func PagerDutyGetEndpointList() map[string]models.PagerDutyEndpoint

func PagerDutySetEndpointList

func PagerDutySetEndpointList(list map[string]models.PagerDutyEndpoint)

func PagerDutySetStaticEndpoints

func PagerDutySetStaticEndpoints(config models.AppConfig)

func PagerDutyUpdateEndpointList

func PagerDutyUpdateEndpointList(ctx context.Context, config models.AppConfig)

Types

type Kubernetes

type Kubernetes struct {
	Config models.AppConfig

	Filter struct {
		Namespace models.AppConfigFilter
	}
	// contains filtered or unexported fields
}

func (*Kubernetes) Client

func (k *Kubernetes) Client() (clientset *kubernetes.Clientset)

Create cached kubernetes client

func (*Kubernetes) ClusterRoleBindingUser

func (k *Kubernetes) ClusterRoleBindingUser(username, userid, roleName string) (roleBinding *rbacV1.ClusterRoleBinding, error error)

Create cluster rolebinding for user for general access

func (*Kubernetes) DiscoveryClient

func (k *Kubernetes) DiscoveryClient() (discoveryClient *discovery.DiscoveryClient)

Create cached kubernetes client

func (*Kubernetes) DynClient

func (k *Kubernetes) DynClient() (clientset dynamic.Interface)

Create cached kubernetes client

func (*Kubernetes) EnsureResourceInNamespace

func (k *Kubernetes) EnsureResourceInNamespace(namespace string, resource *runtime.Object) (err error)

func (*Kubernetes) NamespaceCount

func (k *Kubernetes) NamespaceCount(regexp *regexp.Regexp) (count int, err error)

Returns count of namespaces

func (*Kubernetes) NamespaceCreate

func (k *Kubernetes) NamespaceCreate(namespace coreV1.Namespace) (*coreV1.Namespace, error)

Create one namespace

func (*Kubernetes) NamespaceDelete

func (k *Kubernetes) NamespaceDelete(namespace string) error

Delete one namespace

func (*Kubernetes) NamespaceGet

func (k *Kubernetes) NamespaceGet(namespace string) (*coreV1.Namespace, error)

Returns one namespace

func (*Kubernetes) NamespaceList

func (k *Kubernetes) NamespaceList() (nsList map[string]coreV1.Namespace, err error)

Returns list of (filtered) namespaces

func (*Kubernetes) NamespacePodCount

func (k *Kubernetes) NamespacePodCount(namespace string) (podcount *int64)

func (*Kubernetes) NamespaceUpdate

func (k *Kubernetes) NamespaceUpdate(namespace *coreV1.Namespace) (*coreV1.Namespace, error)

Updates namespace

func (*Kubernetes) Nodes

func (k *Kubernetes) Nodes() (*coreV1.NodeList, error)

Returns list of nodes

func (*Kubernetes) RoleBindingCreateNamespaceGroup

func (k *Kubernetes) RoleBindingCreateNamespaceGroup(namespace, group, roleName string) (roleBinding *rbacV1.RoleBinding, error error)

Create rolebinding for group to gain access to namespace

func (*Kubernetes) RoleBindingCreateNamespaceServiceAccount

func (k *Kubernetes) RoleBindingCreateNamespaceServiceAccount(namespace, serviceaccount, roleName string) (roleBinding *rbacV1.RoleBinding, error error)

Create rolebinding for group to gain access to namespace

func (*Kubernetes) RoleBindingCreateNamespaceTeam

func (k *Kubernetes) RoleBindingCreateNamespaceTeam(namespace string, team *models.AppConfigTeam) (roleBinding *rbacV1.RoleBinding, error error)

Create rolebinding for group to gain access to namespace

func (*Kubernetes) RoleBindingCreateNamespaceUser

func (k *Kubernetes) RoleBindingCreateNamespaceUser(namespace, username, userid, roleName string) (roleBinding *rbacV1.RoleBinding, error error)

Create rolebinding for user to gain access to namespace

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL