openshift

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("not found")
	ErrAlreadyExists = errors.New("already exists")
)

Functions

func AddSchemes

func AddSchemes(scheme *apiruntime.Scheme) error

func GetOpenshiftClusterVersion

func GetOpenshiftClusterVersion() (runtime.OpenshiftClusterVersion, error)

Types

type CatalogSourceData

type CatalogSourceData struct {
	Name    string
	Image   string
	Secrets []string
}

type Client

type Client interface {
	CreateNamespace(ctx context.Context, name string) (*corev1.Namespace, error)
	DeleteNamespace(ctx context.Context, name string) error
	GetNamespace(ctx context.Context, name string) (*corev1.Namespace, error)
	CreateSecret(ctx context.Context, name string, content map[string]string, secretType corev1.SecretType, namespace string) (*corev1.Secret, error)
	DeleteSecret(ctx context.Context, name string, namespace string) error
	GetSecret(ctx context.Context, name string, namespace string) (*corev1.Secret, error)
	CreateOperatorGroup(ctx context.Context, data OperatorGroupData, namespace string) (*operatorsv1.OperatorGroup, error)
	DeleteOperatorGroup(ctx context.Context, name string, namespace string) error
	GetOperatorGroup(ctx context.Context, name string, namespace string) (*operatorsv1.OperatorGroup, error)
	CreateCatalogSource(ctx context.Context, data CatalogSourceData, namespace string) (*operatorsv1alpha1.CatalogSource, error)
	DeleteCatalogSource(ctx context.Context, name string, namespace string) error
	GetCatalogSource(ctx context.Context, name string, namespace string) (*operatorsv1alpha1.CatalogSource, error)
	CreateSubscription(ctx context.Context, data SubscriptionData, namespace string) (*operatorsv1alpha1.Subscription, error)
	DeleteSubscription(ctx context.Context, name string, namespace string) error
	GetSubscription(ctx context.Context, name string, namespace string) (*operatorsv1alpha1.Subscription, error)
	GetCSV(ctx context.Context, name string, namespace string) (*operatorsv1alpha1.ClusterServiceVersion, error)
	GetImages(ctx context.Context) (map[string]struct{}, error)
	CreateRoleBinding(ctx context.Context, data RoleBindingData, namespace string) (*rbacv1.RoleBinding, error)
	GetRoleBinding(ctx context.Context, name string, namespace string) (*rbacv1.RoleBinding, error)
	DeleteRoleBinding(ctx context.Context, name string, namespace string) error
}

func NewClient

func NewClient(client crclient.Client) Client

NewClient provides a wrapper around the passed in client in order to present convenience functions for each of the object types that are interacted with.

type OperatorGroupData

type OperatorGroupData struct {
	Name             string
	TargetNamespaces []string
}

type RoleBindingData

type RoleBindingData struct {
	Name      string
	Subjects  []string
	Role      string
	Namespace string
}

type SubscriptionData

type SubscriptionData struct {
	Name                   string
	Channel                string
	CatalogSource          string
	CatalogSourceNamespace string
	Package                string
}

Jump to

Keyboard shortcuts

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