kubepug

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverResourceName

func DiscoverResourceName(client *discovery.DiscoveryClient, group, version, kind string) string

DiscoverResourceName provides a Resource Name based in its Group, Version and Kind This is necessary when you're listing all the existing resources in the cluster as you've to pass group/version/name (and not group/version/kind) to client.resource.List

func DownloadSwaggerFile

func DownloadSwaggerFile(version, swaggerdir string, force bool) (filename string, err error)

DownloadSwaggerFile checks wether a swagger.json file needs to be downloaded and returns the file location to be used

Types

type DeletedAPI added in v1.0.0

type DeletedAPI struct {
	Group   string `json,yaml:"group,omitempty"`
	Kind    string `json,yaml:"kind,omitempty"`
	Version string `json,yaml:"version,omitempty"`
	Name    string `json,yaml:"name,omitempty"`
	// TODO: What is this boolean for? All APIs here aren't already marked as Deleted?
	Deleted bool             `json,yaml:"deleted,omitempty"`
	Items   []DeprecatedItem `json,yaml:"deleted_items,omitempty"`
}

DeletedAPI definition of an API

type DeprecatedAPI

type DeprecatedAPI struct {
	Description string `json,yaml:"description,omitempty"`
	Group       string `json,yaml:"group,omitempty"`
	Kind        string `json,yaml:"kind,omitempty"`
	Version     string `json,yaml:"version,omitempty"`
	Name        string `json,yaml:"name,omitempty"`
	// TODO: What is this boolean for? All APIs here aren't already marked as Deprecated?
	Deprecated bool             `json,yaml:"deprecated,omitempty"`
	Items      []DeprecatedItem `json,yaml:"deprecated_items,omitempty"`
}

DeprecatedAPI definition of an API

type DeprecatedItem added in v1.0.0

type DeprecatedItem struct {
	Scope      string `json,yaml:"scope,omitempty"`
	ObjectName string `json,yaml:"objectname,omitempty"`
	Namespace  string `json,yaml:"namespace,omitempty"`
}

DeprecatedItem definition of the Items inside a deprecated API

type KubeAPI added in v0.1.0

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

KubeAPI represents a Kubernetes API defined in swagger.json

type KubernetesAPIs added in v0.2.5

type KubernetesAPIs map[string]KubeAPI

KubernetesAPIs is a map of KubeAPI objects

func (KubernetesAPIs) ListDeprecated added in v0.2.5

func (KubeAPIs KubernetesAPIs) ListDeprecated(config *rest.Config, showDescription bool) (deprecated []DeprecatedAPI)

ListDeprecated receives the Map of Deprecated API and List the existent Deprecated Objects in the Cluster

func (KubernetesAPIs) PopulateKubeAPIMap added in v0.2.5

func (KubeAPIs KubernetesAPIs) PopulateKubeAPIMap(config *rest.Config, swaggerfile string) (err error)

PopulateKubeAPIMap Converts an API Definition into a map of KubeAPIs["group/version/name"]

func (KubernetesAPIs) WalkObjects added in v0.2.5

func (KubernetesAPIs KubernetesAPIs) WalkObjects(config *rest.Config) (deleted []DeletedAPI)

WalkObjects walk through Kubernetes API and verifies which Resources doesn't exists anymore in swagger.json

type Result added in v1.0.0

type Result struct {
	DeprecatedAPIs []DeprecatedAPI `json,yaml:"deprecated_apis,omitempty"`
	DeletedAPIs    []DeletedAPI    `json,yaml:"deleted_apis,omitempty"`
}

Result to show final user

Jump to

Keyboard shortcuts

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