pluginmodel

package
v0.12.8 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServerFlags

type APIServerFlags []CommandLineFlag

type APIServerVolume

type APIServerVolume struct {
	// Name is translated to both a volume mount's and volume's name
	Name string `yaml:"name,omitempty"`
	// Path is translated to both a volume mount's mountPath and a volume's hostPath
	Path     string `yaml:"path,omitempty"`
	ReadOnly bool   `yaml:"readOnly,omitempty"`
}

type APIServerVolumes

type APIServerVolumes []APIServerVolume

type Append

type Append struct {
	Contents `yaml:",inline"`
}

type CloudFormation

type CloudFormation struct {
	Stacks `yaml:"stacks,omitempty"`
}

CloudFormation represents customizations to CloudFormation-related settings and configurations

type CommandLineFlag added in v0.12.0

type CommandLineFlag struct {
	// Name is the name of a command-line flag passed to the k8s apiserver and controller-manager.
	// For example, a name 	is "oidc-issuer-url" for the flag `--oidc-issuer-url`.
	Name string `yaml:"name,omitempty"`
	// Value is a golang text template resulting to the value of a command-line flag passed to the k8s apiserver
	Value string `yaml:"value,omitempty"`
}

type CommonNodeConfig

type CommonNodeConfig struct {
	Storage `yaml:"storage,omitempty"`
	IAM     `yaml:"iam,omitempty"`
	Systemd `yaml:"systemd,omitempty"`
}

type Configuration

type Configuration struct {
	// Values represents the values available in templates
	Values `yaml:"values,omitempty"`
	// CloudFormation represents customizations to CloudFormation-related settings and configurations
	CloudFormation `yaml:"cloudformation,omitempty"`
	// Helm represents what are injected into the resulting K8S cluster via Helm - a package manager for K8S
	Helm `yaml:"helm,omitempty"`
	// Kubernetes represents what are injected into the resulting K8S
	Kubernetes `yaml:"kubernetes,omitempty"`
	// Node represents what are injected into each node managed by kube-aws
	Node `yaml:"node,omitempty"`
}

Configuration is the configuration part of a plugin which is used to append arbitrary configs into various resources managed by kube-aws

type Contents

type Contents struct {
	Inline string `yaml:"inline,omitempty"`
	Source `yaml:"source,omitempty"`
	// TODO Better naming
	UnknownKeys map[string]interface{} `yaml:",inline"`
}

type Controller

type Controller struct {
	CommonNodeConfig `yaml:",inline"`
	Kubelet          `yaml:"kubelet,omitempty"`
}

type ControllerFlags added in v0.12.0

type ControllerFlags []CommandLineFlag

type Etcd

type Etcd struct {
	CommonNodeConfig `yaml:",inline"`
}

type FeatureGates

type FeatureGates map[string]string

type File

type File struct {
	Path     string `yaml:"path,omitempty"`
	Contents `yaml:"contents,omitempty"`
	//Mode     string `yaml:"mode,omitempty"`
	Permissions uint `yaml:"permissions,omitempty"`
}

type Files

type Files []File

type Helm

type Helm struct {
	// Releases is a list of helm releases to be maintained on the cluster.
	// Note that the list is sorted by their names by kube-aws so that it won't result in unnecessarily node replacements.
	Releases HelmReleases `yaml:"releases,omitempty"`
}

func (*Helm) UnmarshalYAML

func (k *Helm) UnmarshalYAML(unmarshal func(interface{}) error) error

type HelmRelease

type HelmRelease struct {
	Name    string `yaml:"name,omitempty"`
	Chart   string `yaml:"chart,omitempty"`
	Version string `yaml:"version,omitempty"`
	Values  Values `yaml:"values,omitempty"`
}

type HelmReleases

type HelmReleases []HelmRelease

type IAM

type IAM struct {
	Policy model.IAMPolicy `yaml:"policy,omitempty"`
}

type Kubelet

type Kubelet struct {
	FeatureGates FeatureGates `yaml:"featureGates,omitempty"`
	NodeLabels   NodeLabels   `yaml:"nodeLabels,omitempty"`
}

Kubelet represents a set of customizations to kubelets running on the nodes Keys must be included in: nodeLabels, featureGates, etc kubelet can be configured per-node-pool-basic hence a part of WorkerSettings

type Kubernetes

type Kubernetes struct {
	APIServer         KubernetesAPIServer         `yaml:"apiserver,omitempty"`
	ControllerManager KubernetesControllerManager `yaml:"controller-manager,omitempty"`
	// Manifests is a list of manifests to be installed to the cluster.
	// Note that the list is sorted by their names by kube-aws so that it won't result in unnecessarily node replacements.
	Manifests KubernetesManifests `yaml:"manifests,omitempty"`
}

func (*Kubernetes) UnmarshalYAML

func (k *Kubernetes) UnmarshalYAML(unmarshal func(interface{}) error) error

type KubernetesAPIServer

type KubernetesAPIServer struct {
	Flags   APIServerFlags   `yaml:"flags,omitempty"`
	Volumes APIServerVolumes `yaml:"volumes,omitempty"`
}

type KubernetesControllerManager added in v0.12.0

type KubernetesControllerManager struct {
	Flags ControllerFlags `yaml:"flags,omitempty"`
}

type KubernetesManifest

type KubernetesManifest struct {
	Name     string `yaml:"name,omitempty"`
	Contents `yaml:"contents,omitempty"`
}

type KubernetesManifests

type KubernetesManifests []KubernetesManifest

type Metadata

type Metadata struct {
	Name        string `yaml:"name"`
	Version     string `yaml:"version"`
	Description string `yaml:"description"`
	// ClusterSettingsKey is the key in the root of cluster.yaml used for configuring this plugin cluster-wide
	ClusterSettingsKey string `yaml:"clusterSettingsKey,omitempty"`
	// NodePoolSettingsKey is the key in the root of a node pool settings in cluster.yaml used for configuring this plugin only for a node pool
	NodePoolSettingsKey string `yaml:"nodePoolSettingKey,omitempty"`
}

Metadata is the metadata of a kube-aws plugin consists of various settings specific to the plugin itself Metadata never affects what are injected into K8S clusters, node, other CFN resources managed by kube-aws.

func (Metadata) Validate

func (m Metadata) Validate() error

type Node

type Node struct {
	Roles NodeRoles `yaml:"roles,omitempty"`
}

type NodeLabels

type NodeLabels map[string]string

type NodeRoles

type NodeRoles struct {
	Controller `yaml:"controller,omitempty"`
	Etcd       `yaml:"etcd,omitempty"`
	Worker     `yaml:"worker,omitempty"`
}

type Outputs

type Outputs struct {
	Append `yaml:"append,omitempty"`
}

type Plugin

type Plugin struct {
	Metadata `yaml:"metadata,omitempty"`
	Spec     `yaml:"spec,omitempty"`
}

A plugin consists of two parts: a set of metadata and a spec

func (Plugin) EnabledIn

func (p Plugin) EnabledIn(plugins model.PluginConfigs) (bool, *model.PluginConfig)

func (Plugin) SettingKey

func (p Plugin) SettingKey() string

func (Plugin) Validate

func (p Plugin) Validate() error

type Resources

type Resources struct {
	Append `yaml:"append,omitempty"`
}

type Source

type Source struct {
	Path string `yaml:"path,omitempty"`
}

type Spec

type Spec struct {
	// Configuration is the configuration part of a plugin which is used to append arbitrary configs into various resources managed by kube-aws
	Configuration `yaml:"configuration,omitempty"`
}

Spec is the specification of a kube-aws plugin A spec consists of two parts: Configuration and Command

type Stack

type Stack struct {
	Resources `yaml:"resources,omitempty"`
	Outputs   `yaml:"outputs,omitempty"`
}

Stack represents a set of customizations to a CloudFormation stack template Top-level keys should be one of: Resources, Outputs Second-level keys should be cfn resource names

type Stacks

type Stacks struct {
	Root         Stack `yaml:"root,omitempty"`
	Network      Stack `yaml:"network,omitempty"`
	ControlPlane Stack `yaml:"controlPlane,omitempty"`
	Etcd         Stack `yaml:"etcd,omitempty"`
	NodePool     Stack `yaml:"nodePool,omitempty"`
}

type Storage

type Storage struct {
	Files `yaml:"files,omitempty"`
}

type Systemd

type Systemd struct {
	// Units is a list of systemd units installed on the nodes
	Units SystemdUnits `yaml:"units,omitempty"`
}

type SystemdUnit

type SystemdUnit struct {
	Name string `yaml:"name,omitempty"`
	// Contents must be a valid go text template producing a valid systemd unit definition
	Contents `yaml:"contents,omitempty"`
}

type SystemdUnits

type SystemdUnits []SystemdUnit

type Values

type Values map[string]interface{}

type Worker

type Worker struct {
	CommonNodeConfig `yaml:",inline"`
	Kubelet          `yaml:"kubelet,omitempty"`
}

Jump to

Keyboard shortcuts

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