k8s

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const ResyncPeriod = 5 * time.Minute

Variables

This section is empty.

Functions

func Encode

func Encode(w io.Writer, objects ...runtime.Object) error

Types

type Client

type Client interface {
	Kube() kubernetes.Interface
	Vince() versioned.Interface
	Site() SiteAPI
}

func New

func New(masterURL, kubeConfig string) Client

type Mock

type Mock struct {
	// contains filtered or unexported fields
}

func NewMock

func NewMock(path string) (*Mock, error)

func (*Mock) Kube

func (m *Mock) Kube() kubernetes.Interface

func (*Mock) Site

func (m *Mock) Site() SiteAPI

func (*Mock) Vince

func (m *Mock) Vince() versioned.Interface

type ResourceFilter

type ResourceFilter struct {
	// contains filtered or unexported fields
}

ResourceFilter holds resource filtering rules.

func NewResourceFilter

func NewResourceFilter(opts ...ResourceFilterOption) *ResourceFilter

NewResourceFilter creates a new ResourceFilter, configured with the given options.

func (*ResourceFilter) IsIgnored

func (f *ResourceFilter) IsIgnored(obj interface{}) bool

IsIgnored returns true if the resource should be ignored.

type ResourceFilterOption

type ResourceFilterOption func(filter *ResourceFilter)

ResourceFilterOption adds a filtering rule to the given ResourceFilter.

func IgnoreNamespaces

func IgnoreNamespaces(namespaces ...string) ResourceFilterOption

IgnoreNamespaces adds the given namespaces to the list of namespaces to ignore.

func WatchNamespaces

func WatchNamespaces(namespaces ...string) ResourceFilterOption

WatchNamespaces add the given namespaces to the list of namespaces to watch.

type Retry

type Retry struct {
	// contains filtered or unexported fields
}

func NewRetry

func NewRetry() *Retry

func (*Retry) CreateSecret

func (r *Retry) CreateSecret(ctx context.Context, clients Client, secret *v1.Secret) error

func (*Retry) CreateService

func (r *Retry) CreateService(ctx context.Context, clients Client, service *v1.Service) error

func (*Retry) CreateStatefulSet

func (r *Retry) CreateStatefulSet(ctx context.Context, clients Client, set *appsv1.StatefulSet) error

func (*Retry) DeleteSecret

func (r *Retry) DeleteSecret(ctx context.Context, clients Client, secret *v1.Secret) error

func (*Retry) DeleteService

func (r *Retry) DeleteService(ctx context.Context, clients Client, service *v1.Service) error

func (*Retry) DeleteStatefulSet

func (r *Retry) DeleteStatefulSet(ctx context.Context, clients Client, set *appsv1.StatefulSet) error

func (*Retry) UpdateService

func (r *Retry) UpdateService(ctx context.Context, clients Client, service *v1.Service) error

func (*Retry) UpdateStatefulSet

func (r *Retry) UpdateStatefulSet(ctx context.Context, clients Client, set *appsv1.StatefulSet) error

func (*Retry) UpdateVinceStatus

func (r *Retry) UpdateVinceStatus(ctx context.Context, clients Client, set *v1alpha1.Vince) error

type SiteAPI

type SiteAPI interface {
	Create(ctx context.Context, secret *v1.Secret, domain string, public bool) error
	Delete(ctx context.Context, secret *v1.Secret, domain string) error
}

Jump to

Keyboard shortcuts

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