tiller

package
v0.0.0-...-eef33a9 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidName = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$")

ValidName is a regular expression for names.

According to the Kubernetes help text, the regular expression it uses is:

(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?

We modified that. First, we added start and end delimiters. Second, we changed the final ? to + to require that the pattern match at least once. This modification prevents an empty string from matching.

Functions

func GetVersionSet

GetVersionSet retrieves a set of available k8s API versions

Types

type Engine

type Engine interface {
	// Render renders a chart.
	//
	// It receives a chart, a config, and a map of overrides to the config.
	// Overrides are assumed to be passed from the system, not the user.
	Render(*chart.Chart, chartutil.Values) (map[string]string, error)
}

Engine represents a template engine that can render templates.

For some engines, "rendering" includes both compiling and executing. (Other engines do not distinguish between phases.)

The engine returns a map where the key is the named output entity (usually a file name) and the value is the rendered content of the template.

An Engine must be capable of executing multiple concurrent requests, but without tainting one request's environment with data from another request.

type Manifest

type Manifest struct {
	Name    string
	Content string
	Head    *util.SimpleHead
}

Manifest represents a manifest file, which has a name and some content.

func SortByKind

func SortByKind(manifests []Manifest) []Manifest

SortByKind sorts manifests in InstallOrder

func SortManifests

func SortManifests(files map[string]string, apis chartutil.VersionSet, sort SortOrder) ([]*release.Hook, []Manifest, error)

SortManifests takes a map of filename/YAML contents, splits the file by manifest entries, and sorts the entries into hook types.

The resulting hooks struct will be populated with all of the generated hooks. Any file that does not declare one of the hook types will be placed in the 'generic' bucket.

Files that do not parse into the expected format are simply placed into a map and returned.

type ReleaseServer

type ReleaseServer struct {

	// Releases stores records of releases.
	Releases *storage.Storage
	// KubeClient is a Kubernetes API client.
	KubeClient environment.KubeClient

	Log func(string, ...interface{})
	// contains filtered or unexported fields
}

ReleaseServer implements the server-side gRPC endpoint for the HAPI services.

func NewReleaseServer

func NewReleaseServer(discovery discovery.DiscoveryInterface, kubeClient environment.KubeClient) *ReleaseServer

NewReleaseServer creates a new release server.

func (*ReleaseServer) GetHistory

func (s *ReleaseServer) GetHistory(req *hapi.GetHistoryRequest) ([]*release.Release, error)

GetHistory gets the history for a given release.

func (*ReleaseServer) GetReleaseContent

func (s *ReleaseServer) GetReleaseContent(req *hapi.GetReleaseContentRequest) (*release.Release, error)

GetReleaseContent gets all of the stored information for the given release.

func (*ReleaseServer) GetReleaseStatus

GetReleaseStatus gets the status information for a named release.

func (*ReleaseServer) InstallRelease

func (s *ReleaseServer) InstallRelease(req *hapi.InstallReleaseRequest) (*release.Release, error)

InstallRelease installs a release and stores the release record.

func (*ReleaseServer) RollbackRelease

func (s *ReleaseServer) RollbackRelease(req *hapi.RollbackReleaseRequest) (*release.Release, error)

RollbackRelease rolls back to a previous version of the given release.

func (*ReleaseServer) RunReleaseTest

func (s *ReleaseServer) RunReleaseTest(req *hapi.TestReleaseRequest) (<-chan *hapi.TestReleaseResponse, <-chan error)

RunReleaseTest runs pre-defined tests stored as hooks on a given release

func (*ReleaseServer) UninstallRelease

UninstallRelease deletes all of the resources associated with this release, and marks the release UNINSTALLED.

func (*ReleaseServer) UpdateRelease

func (s *ReleaseServer) UpdateRelease(req *hapi.UpdateReleaseRequest) (*release.Release, error)

UpdateRelease takes an existing release and new information, and upgrades the release.

type SortOrder

type SortOrder []string

SortOrder is an ordering of Kinds.

var InstallOrder SortOrder = []string{
	"Namespace",
	"ResourceQuota",
	"LimitRange",
	"Secret",
	"ConfigMap",
	"StorageClass",
	"PersistentVolume",
	"PersistentVolumeClaim",
	"ServiceAccount",
	"CustomResourceDefinition",
	"ClusterRole",
	"ClusterRoleBinding",
	"Role",
	"RoleBinding",
	"Service",
	"DaemonSet",
	"Pod",
	"ReplicationController",
	"ReplicaSet",
	"Deployment",
	"StatefulSet",
	"Job",
	"CronJob",
	"Ingress",
	"APIService",
}

InstallOrder is the order in which manifests should be installed (by Kind).

Those occurring earlier in the list get installed before those occurring later in the list.

var UninstallOrder SortOrder = []string{
	"APIService",
	"Ingress",
	"Service",
	"CronJob",
	"Job",
	"StatefulSet",
	"Deployment",
	"ReplicaSet",
	"ReplicationController",
	"Pod",
	"DaemonSet",
	"RoleBinding",
	"Role",
	"ClusterRoleBinding",
	"ClusterRole",
	"CustomResourceDefinition",
	"ServiceAccount",
	"PersistentVolumeClaim",
	"PersistentVolume",
	"StorageClass",
	"ConfigMap",
	"Secret",
	"LimitRange",
	"ResourceQuota",
	"Namespace",
}

UninstallOrder is the order in which manifests should be uninstalled (by Kind).

Those occurring earlier in the list get uninstalled before those occurring later in the list.

Directories

Path Synopsis
Package environment describes the operating environment for Tiller.
Package environment describes the operating environment for Tiller.

Jump to

Keyboard shortcuts

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