Documentation
¶
Index ¶
- func DiscoverResourceName(client *discovery.DiscoveryClient, group, version, kind string) string
- func DownloadSwaggerFile(version, swaggerdir string, force bool) (filename string, err error)
- type DeletedAPI
- type DeprecatedAPI
- type DeprecatedItem
- type KubeAPI
- type KubernetesAPIs
- func (KubeAPIs KubernetesAPIs) ListDeprecated(config *rest.Config, showDescription bool) (deprecated []DeprecatedAPI)
- func (KubeAPIs KubernetesAPIs) PopulateKubeAPIMap(config *rest.Config, swaggerfile string) (err error)
- func (KubernetesAPIs KubernetesAPIs) WalkObjects(config *rest.Config) (deleted []DeletedAPI)
- type Result
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
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
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