inventory

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Copyright © 2021 Bedag Informatik AG

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

This section is empty.

Types

type Entry

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

func NewEntryFromConfig

func NewEntryFromConfig(config *invconfig.Entry) (*Entry, error)

func NewEntryFromConfigWithDefaults

func NewEntryFromConfigWithDefaults(config *invconfig.Entry) (*Entry, error)

func (*Entry) ClusterInventory

func (e *Entry) ClusterInventory() (*map[string]interface{}, error)

func (*Entry) ClusterInventoryConfig

func (e *Entry) ClusterInventoryConfig() *invconfig.ClusterInventory

func (*Entry) Groups

func (e *Entry) Groups() []string

func (*Entry) Kubeconfig

func (e *Entry) Kubeconfig() *Kubeconfig

func (*Entry) MatchLimits

func (e *Entry) MatchLimits(limits []string) (bool, error)

MatchLimits returns true if the groups of the inventory entry satisfy all given limits, which are treated as ^$ enclosed regex

func (*Entry) Name

func (e *Entry) Name() string

func (*Entry) ValidGroups

func (e *Entry) ValidGroups(limits []string) ([]string, error)

ValidGroups returns all groups of the inventory entry that satisfy at least one limit

type Inventory

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

func NewInventory

func NewInventory(path string, ejson ejson.Settings, skipKubeconfig bool, defaulClusterInventoryConfig invconfig.ClusterInventory) (*Inventory, error)

func (*Inventory) Entries

func (i *Inventory) Entries() map[string]*Entry

func (*Inventory) EntryNames

func (i *Inventory) EntryNames(filter string, limits []string) ([]string, error)

type Kubeconfig

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

func NewKubeconfigFromConfig

func NewKubeconfigFromConfig(config *invconfig.Kubeconfig) (*Kubeconfig, error)

func NewKubeconfigFromLoader

func NewKubeconfigFromLoader(ldr loader.Loader) (*Kubeconfig, error)

func NewKubeconfigFromParams

func NewKubeconfigFromParams(backend string, params map[string]interface{}) (*Kubeconfig, error)

func (*Kubeconfig) Client

func (k *Kubeconfig) Client() (kubernetes.Interface, error)

Client returns a clientset for the current kubeconfig. If no client currently exists, a new one will be created

func (*Kubeconfig) Config

func (k *Kubeconfig) Config() (clientcmd.ClientConfig, error)

func (*Kubeconfig) Loader

func (k *Kubeconfig) Loader() loader.Loader

func (*Kubeconfig) SetClient

func (k *Kubeconfig) SetClient(clientset kubernetes.Interface)

func (*Kubeconfig) SetNamespace added in v0.1.1

func (k *Kubeconfig) SetNamespace(n string) error

func (*Kubeconfig) ToDiscoveryClient

func (k *Kubeconfig) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)

ToDiscoveryClient implements RESTClientGetter. Expects the AddFlags method to have been called. Returns a CachedDiscoveryInterface using a computed RESTConfig.

func (*Kubeconfig) ToRESTConfig

func (k *Kubeconfig) ToRESTConfig() (*rest.Config, error)

ToRESTConfig implements RESTClientGetter. Returns a REST client configuration based on a provided path to a .kubeconfig file, loading rules, and config flag overrides. Expects the AddFlags method to have been called.

func (*Kubeconfig) ToRESTMapper

func (k *Kubeconfig) ToRESTMapper() (meta.RESTMapper, error)

ToRESTMapper returns a mapper.

func (*Kubeconfig) ToRawKubeConfigLoader

func (k *Kubeconfig) ToRawKubeConfigLoader() clientcmd.ClientConfig

ToRawKubeConfigLoader implements RESTClientGetter.

func (*Kubeconfig) Yaml

func (k *Kubeconfig) Yaml() ([]byte, error)

Directories

Path Synopsis
Package config describes the config format of the kusible inventory files.
Package config describes the config format of the kusible inventory files.

Jump to

Keyboard shortcuts

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