config

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: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInventory

type ClusterInventory struct {
	Namespace string `json:"namespace"`
	ConfigMap string `json:"configmap"`
}

ClusterInventory points to a ConfigMap holding information about the cluster that can be referenced in the values of a play

type Config

type Config struct {
	Inventory []*Entry `json:"inventory"`
}

Config holds the list of entries that can serve as targets for application deployments. It is the root of the actual inventory

func NewConfig

func NewConfig() *Config

NewConfig returns an empty inventory config

func NewConfigFromMap

func NewConfigFromMap(data *map[string]interface{}) (*Config, error)

NewConfigFromMap takes raw config data and parses it into an inventory config

type Entry

type Entry struct {
	// Name to uniquely identify the entry
	Name string `json:"name"`
	// Groups is a "least specific to most specific" ordered list of
	// groups associated with this entry, used to compile the "values"
	// for this entry and as selector to target entries in specific groups.
	// Each entry is always part of the "all" group and a group
	// with the name of the entry.
	Groups []string `json:"groups"`
	// Location of the "Cluster Inventory"
	ClusterInventory ClusterInventory `json:"cluster_inventory"`
	// Kubeconfig holds the kubeconfig loader configuration
	Kubeconfig Kubeconfig `json:"kubeconfig"`
}

Entry is a single inventory entry representing a possible deploy target.

type Kubeconfig

type Kubeconfig struct {
	Backend string `json:"backend"`
	Params  Params `json:"params"`
}

Kubeconfig holds information on how / where to retrieve / generate the Kubeconfig for an entry in the inventory

type Params

type Params map[string]interface{}

Params holds the parameters used by a kubeconfig backend to retrieve / generate a kubeconfig. The exact fields depend on the kubeconfig loader.

Jump to

Keyboard shortcuts

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