utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependencyInformation

type DependencyInformation struct {
	Object       metav1.Object
	Type         meta.Type
	Requirements []string
}

func GetDependencyInformation

func GetDependencyInformation(object metav1.Object, typed meta.Type) *DependencyInformation

* * This script is designed to accept a []metav1.Object and send back a []*DependencyInformation * (essentially it is the metav1.Object wrapped up with extra dependency information) *

func (*DependencyInformation) AnalyseCommonDependencies

func (d *DependencyInformation) AnalyseCommonDependencies()

* * Common Dependencies: * * For every resource with a namespace, the namespace must exist. *

func (*DependencyInformation) AnalyseDeploymentDependencies

func (d *DependencyInformation) AnalyseDeploymentDependencies(deployment *appsv1.Deployment)

* * Deployment: * * A deployment's pod spec may have a key 'volumes', within which there could be a reference to a * PersistentVolumeClaim if a volume's VolumeSource.PersistentVolumeClaim is non-nil. * We therefore require a PVC in the default namespace if the deployment's namespace is left unspecified * or in the same namespace as the deployment. *

func (*DependencyInformation) AnalyseRoleBindingDependencies

func (d *DependencyInformation) AnalyseRoleBindingDependencies(roleBinding *rbacV1beta1.RoleBinding)

* * RoleBinding: * * roleRef.name refers to an existing Role, so a Role by this name must exist. * * subects[i].kind and name should refer to a resource in the namespace of the RoleBinding resource *

func (*DependencyInformation) AnalyseServiceDependencies

func (d *DependencyInformation) AnalyseServiceDependencies(service *v1.Service)

* * Service: * * A service.spec.selector is a map of key/value pairs, these key/value pairs must be present * somewhere else. either a deployment or a stateful set. *

func (*DependencyInformation) AnalyseStatefulSetDependencies

func (d *DependencyInformation) AnalyseStatefulSetDependencies(statefulSet *appsv1.StatefulSet)

* * StatefulSet: * * Same as deployment *

type ResourceInfo

type ResourceInfo struct {
	Namespace string
	Kind      string
	Name      string
	Origin    map[interface{}]interface{}
	FileName  string
	Labels    map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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