tiller

package
v2.16.0-rc.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: Apache-2.0 Imports: 35 Imported by: 615

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListDefaultLimit int64 = 512

ListDefaultLimit is the default limit for number of items returned in a list.

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 DefaultServerOpts

func DefaultServerOpts() []grpc.ServerOption

DefaultServerOpts returns the set of default grpc ServerOption's that Tiller requires.

func DeleteRelease

func DeleteRelease(rel *release.Release, vs chartutil.VersionSet, kubeClient environment.KubeClient) (kept string, errs []error)

DeleteRelease is a helper that allows Rudder to delete a release without exposing most of Tiller inner functions

func GetAllVersionSet

func GetAllVersionSet(client discovery.ServerResourcesInterface) (chartutil.VersionSet, error)

GetAllVersionSet retrieves a set of available k8s API versions and objects

This is a different function from GetVersionSet because the signature changed. To keep compatibility through the public functions this needed to be a new function.GetAllVersionSet TODO(mattfarina): In Helm v3 merge with GetVersionSet

func GetVersionSet

func GetVersionSet(client discovery.ServerGroupsInterface) (chartutil.VersionSet, error)

GetVersionSet retrieves a set of available k8s API versions

func NewServer

func NewServer(opts ...grpc.ServerOption) *grpc.Server

NewServer creates a new grpc server.

Types

type LocalReleaseModule

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

LocalReleaseModule is a local implementation of ReleaseModule

func (*LocalReleaseModule) Create

Create creates a release via kubeclient from provided environment

func (*LocalReleaseModule) Delete

Delete deletes the release and returns manifests that were kept in the deletion process

func (*LocalReleaseModule) Rollback

Rollback performs a rollback from current to target release

func (*LocalReleaseModule) Status

Status returns kubectl-like formatted status of release objects

func (*LocalReleaseModule) Update

Update performs an update from current to target release

type Manifest

type Manifest = manifest.Manifest

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

func SortByKind

func SortByKind(manifests []Manifest) []Manifest

SortByKind sorts manifests in InstallOrder

type ReleaseModule

ReleaseModule is an interface that allows ReleaseServer to run operations on release via either local implementation or Rudder service

type ReleaseServer

type ReleaseServer struct {
	ReleaseModule

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

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

func NewReleaseServer

func NewReleaseServer(env *environment.Environment, clientset kubernetes.Interface, useRemote bool) *ReleaseServer

NewReleaseServer creates a new release server.

func (*ReleaseServer) GetHistory

GetHistory gets the history for a given release.

func (*ReleaseServer) GetReleaseContent

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) GetVersion

GetVersion sends the server version.

func (*ReleaseServer) InstallRelease

InstallRelease installs a release and stores the release record.

func (*ReleaseServer) ListReleases

ListReleases lists the releases found by the server.

func (*ReleaseServer) RollbackRelease

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

func (*ReleaseServer) RunReleaseTest

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 DELETED.

func (*ReleaseServer) UpdateRelease

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

type RemoteReleaseModule

type RemoteReleaseModule struct{}

RemoteReleaseModule is a ReleaseModule which calls Rudder service to operate on a release

func (*RemoteReleaseModule) Create

Create calls rudder.InstallRelease

func (*RemoteReleaseModule) Delete

Delete calls rudder.DeleteRelease

func (*RemoteReleaseModule) Rollback

Rollback calls rudder.Rollback

func (*RemoteReleaseModule) Status

Status returns status retrieved from rudder.ReleaseStatus

func (*RemoteReleaseModule) Update

Update calls rudder.UpgradeRelease

type SortOrder

type SortOrder []string

SortOrder is an ordering of Kinds.

var InstallOrder SortOrder = []string{
	"Namespace",
	"NetworkPolicy",
	"ResourceQuota",
	"LimitRange",
	"PodSecurityPolicy",
	"PodDisruptionBudget",
	"Secret",
	"ConfigMap",
	"StorageClass",
	"PersistentVolume",
	"PersistentVolumeClaim",
	"ServiceAccount",
	"CustomResourceDefinition",
	"ClusterRole",
	"ClusterRoleList",
	"ClusterRoleBinding",
	"ClusterRoleBindingList",
	"Role",
	"RoleList",
	"RoleBinding",
	"RoleBindingList",
	"Service",
	"DaemonSet",
	"Pod",
	"ReplicationController",
	"ReplicaSet",
	"Deployment",
	"HorizontalPodAutoscaler",
	"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",
	"HorizontalPodAutoscaler",
	"Deployment",
	"ReplicaSet",
	"ReplicationController",
	"Pod",
	"DaemonSet",
	"RoleBindingList",
	"RoleBinding",
	"RoleList",
	"Role",
	"ClusterRoleBindingList",
	"ClusterRoleBinding",
	"ClusterRoleList",
	"ClusterRole",
	"CustomResourceDefinition",
	"ServiceAccount",
	"PersistentVolumeClaim",
	"PersistentVolume",
	"StorageClass",
	"ConfigMap",
	"Secret",
	"PodDisruptionBudget",
	"PodSecurityPolicy",
	"LimitRange",
	"ResourceQuota",
	"NetworkPolicy",
	"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