k8s

package
v0.0.1-alpha.0...-ef4a7fd Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

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

Options to pass to all the methods

func GetOpts

func GetOpts(context *rest.Config, ns string) (*Options, error)

GetOpts generates required options

func (*Options) CreateJob

func (kOpts *Options) CreateJob(job *batchv1.Job) (result *batchv1.Job, err error)

CreateJob method to create a pvc

func (*Options) CreateRBinding

func (kOpts *Options) CreateRBinding(rBinding *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error)

CreateRBinding method creates a rolebinding

func (*Options) CreateRole

func (kOpts *Options) CreateRole(role *rbacv1.Role) (result *rbacv1.Role, err error)

CreateRole method creates a role

func (*Options) CreateSA

func (kOpts *Options) CreateSA(sa *v1.ServiceAccount) (result *v1.ServiceAccount, err error)

CreateSA method to create a SA

func (*Options) DeleteJob

func (kOpts *Options) DeleteJob(name string) (err error)

DeleteJob method to delete a job with the name

func (*Options) DeleteRBinding

func (kOpts *Options) DeleteRBinding(name string) (err error)

DeleteRBinding method deletes a rolebindings with the given name

func (*Options) DeleteRole

func (kOpts *Options) DeleteRole(name string) (err error)

DeleteRole method deletes a role based on the name provided

func (*Options) DeleteSA

func (kOpts *Options) DeleteSA(name string) (err error)

DeleteSA method to delete a sa with the name

func (*Options) GetJob

func (kOpts *Options) GetJob() (result *batchv1.JobList, err error)

GetJob returns all the jobs in the given namespace and clientset

func (*Options) GetRoleBindings

func (kOpts *Options) GetRoleBindings() (result *rbacv1.RoleBindingList, err error)

GetRoleBindings returns all the RoleBindings in the given namespace and clientset

func (*Options) GetRoles

func (kOpts *Options) GetRoles() (result *rbacv1.RoleList, err error)

GetRoles returns all the Roles in the given namespace and clientset

func (*Options) GetSA

func (kOpts *Options) GetSA() (result *v1.ServiceAccountList, err error)

GetSA returns all the Service accounts in the given namespace and clientset

Jump to

Keyboard shortcuts

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