koperator

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManipulateResource

func ManipulateResource(x interface{})

ManipulateResource helps to manipulate resources

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) CreateConfigMap

func (kOpts *Options) CreateConfigMap(configmap *corev1.ConfigMap) (result *corev1.ConfigMap, err error)

CreateConfigMap is a method to create a configmap

func (*Options) CreateDeployment

func (kOpts *Options) CreateDeployment(deployment *appv1.Deployment) (result *appv1.Deployment, err error)

CreateDeployment method to create a deployment

func (*Options) CreateIngress

func (kOpts *Options) CreateIngress(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error)

CreateIngress method to create an ingress

func (*Options) CreateJob

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

CreateJob method to create a pvc

func (*Options) CreateNS

func (kOpts *Options) CreateNS(namespace *v1.Namespace) (result *corev1.Namespace, err error)

CreateNS method to delete a namespace

func (*Options) CreatePVC

func (kOpts *Options) CreatePVC(pvc *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error)

CreatePVC 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) CreateSVC

func (kOpts *Options) CreateSVC(service *corev1.Service) (result *corev1.Service, err error)

CreateSVC method to create a svc

func (*Options) CreateSecret

func (kOpts *Options) CreateSecret(secret *corev1.Secret) (result *corev1.Secret, err error)

CreateSecret method creates a secret

func (*Options) DeleteConfigMap

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

DeleteConfigMap is a method to delete a provided configmap name

func (*Options) DeleteDeployment

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

DeleteDeployment is a method to delete a provided deployment name

func (*Options) DeleteIngress

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

DeleteIngress method deletes an ingress with the given name

func (*Options) DeleteJob

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

DeleteJob method to delete a job with the name

func (*Options) DeleteNS

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

DeleteNS method to delete a namespace

func (*Options) DeletePVC

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

DeletePVC method to delete a pvc 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) DeleteSVC

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

DeleteSVC method to delete a svc with the name

func (*Options) DeleteSecret

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

DeleteSecret method deletes a secret with the name

func (*Options) GetConfigMaps

func (kOpts *Options) GetConfigMaps() (result *corev1.ConfigMapList, err error)

GetConfigMaps returns all the Configmaps in the given namespace and clientset

func (*Options) GetDeployments

func (kOpts *Options) GetDeployments() (result *appv1.DeploymentList, err error)

GetDeployments returns all the Deployments in the given namespace and clientset

func (*Options) GetIngress

func (kOpts *Options) GetIngress() (result *v1beta1.IngressList, err error)

GetIngress returns all the Ingresses in the given namespace and clientset

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) GetNS

func (kOpts *Options) GetNS() (result *corev1.Namespace, err error)

GetNS validates if the namespace exists or not

func (*Options) GetPVC

func (kOpts *Options) GetPVC() (result *corev1.PersistentVolumeClaimList, err error)

GetPVC returns all the pvc 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) GetSVC

func (kOpts *Options) GetSVC() (result *corev1.ServiceList, err error)

GetSVC returns all the Services in the given namespace and clientset

func (*Options) GetSecrets

func (kOpts *Options) GetSecrets() (result *corev1.SecretList, err error)

GetSecrets returns all the Secrets in the given namespace and clientset

Jump to

Keyboard shortcuts

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