Documentation ¶
Index ¶
- Variables
- func DefaultServerOpts() []grpc.ServerOption
- func DeleteRelease(rel *release.Release, vs chartutil.VersionSet, ...) (kept string, errs []error)
- func GetVersionSet(client discovery.ServerGroupsInterface) (chartutil.VersionSet, error)
- func NewServer(opts ...grpc.ServerOption) *grpc.Server
- type LocalReleaseModule
- func (m *LocalReleaseModule) Create(r *release.Release, req *services.InstallReleaseRequest, ...) error
- func (m *LocalReleaseModule) Delete(rel *release.Release, req *services.UninstallReleaseRequest, ...) (kept string, errs []error)
- func (m *LocalReleaseModule) Rollback(current, target *release.Release, req *services.RollbackReleaseRequest, ...) error
- func (m *LocalReleaseModule) Status(r *release.Release, req *services.GetReleaseStatusRequest, ...) (string, error)
- func (m *LocalReleaseModule) Update(current, target *release.Release, req *services.UpdateReleaseRequest, ...) error
- type Manifest
- type ReleaseModule
- type ReleaseServer
- func (s *ReleaseServer) GetHistory(ctx context.Context, req *tpb.GetHistoryRequest) (*tpb.GetHistoryResponse, error)
- func (s *ReleaseServer) GetReleaseContent(c ctx.Context, req *services.GetReleaseContentRequest) (*services.GetReleaseContentResponse, error)
- func (s *ReleaseServer) GetReleaseStatus(c ctx.Context, req *services.GetReleaseStatusRequest) (*services.GetReleaseStatusResponse, error)
- func (s *ReleaseServer) GetVersion(c ctx.Context, req *services.GetVersionRequest) (*services.GetVersionResponse, error)
- func (s *ReleaseServer) InstallRelease(c ctx.Context, req *services.InstallReleaseRequest) (*services.InstallReleaseResponse, error)
- func (s *ReleaseServer) ListReleases(req *services.ListReleasesRequest, ...) error
- func (s *ReleaseServer) RollbackRelease(c ctx.Context, req *services.RollbackReleaseRequest) (*services.RollbackReleaseResponse, error)
- func (s *ReleaseServer) RunReleaseTest(req *services.TestReleaseRequest, ...) error
- func (s *ReleaseServer) UninstallRelease(c ctx.Context, req *services.UninstallReleaseRequest) (*services.UninstallReleaseResponse, error)
- func (s *ReleaseServer) UpdateRelease(c ctx.Context, req *services.UpdateReleaseRequest) (*services.UpdateReleaseResponse, error)
- type RemoteReleaseModule
- func (m *RemoteReleaseModule) Create(r *release.Release, req *services.InstallReleaseRequest, ...) error
- func (m *RemoteReleaseModule) Delete(r *release.Release, req *services.UninstallReleaseRequest, ...) (string, []error)
- func (m *RemoteReleaseModule) Rollback(current, target *release.Release, req *services.RollbackReleaseRequest, ...) error
- func (m *RemoteReleaseModule) Status(r *release.Release, req *services.GetReleaseStatusRequest, ...) (string, error)
- func (m *RemoteReleaseModule) Update(current, target *release.Release, req *services.UpdateReleaseRequest, ...) error
- type SortOrder
Constants ¶
This section is empty.
Variables ¶
var ListDefaultLimit int64 = 512
ListDefaultLimit is the default limit for number of items returned in a list.
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 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 ¶
func (m *LocalReleaseModule) Create(r *release.Release, req *services.InstallReleaseRequest, env *environment.Environment) error
Create creates a release via kubeclient from provided environment
func (*LocalReleaseModule) Delete ¶
func (m *LocalReleaseModule) Delete(rel *release.Release, req *services.UninstallReleaseRequest, env *environment.Environment) (kept string, errs []error)
Delete deletes the release and returns manifests that were kept in the deletion process
func (*LocalReleaseModule) Rollback ¶
func (m *LocalReleaseModule) Rollback(current, target *release.Release, req *services.RollbackReleaseRequest, env *environment.Environment) error
Rollback performs a rollback from current to target release
func (*LocalReleaseModule) Status ¶
func (m *LocalReleaseModule) Status(r *release.Release, req *services.GetReleaseStatusRequest, env *environment.Environment) (string, error)
Status returns kubectl-like formatted status of release objects
func (*LocalReleaseModule) Update ¶
func (m *LocalReleaseModule) Update(current, target *release.Release, req *services.UpdateReleaseRequest, env *environment.Environment) error
Update performs an update from current to target release
type Manifest ¶
Manifest represents a manifest file, which has a name and some content.
type ReleaseModule ¶
type ReleaseModule interface { Create(r *release.Release, req *services.InstallReleaseRequest, env *environment.Environment) error Update(current, target *release.Release, req *services.UpdateReleaseRequest, env *environment.Environment) error Rollback(current, target *release.Release, req *services.RollbackReleaseRequest, env *environment.Environment) error Status(r *release.Release, req *services.GetReleaseStatusRequest, env *environment.Environment) (string, error) Delete(r *release.Release, req *services.UninstallReleaseRequest, env *environment.Environment) (string, []error) }
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 ¶
func (s *ReleaseServer) GetHistory(ctx context.Context, req *tpb.GetHistoryRequest) (*tpb.GetHistoryResponse, error)
GetHistory gets the history for a given release.
func (*ReleaseServer) GetReleaseContent ¶
func (s *ReleaseServer) GetReleaseContent(c ctx.Context, req *services.GetReleaseContentRequest) (*services.GetReleaseContentResponse, error)
GetReleaseContent gets all of the stored information for the given release.
func (*ReleaseServer) GetReleaseStatus ¶
func (s *ReleaseServer) GetReleaseStatus(c ctx.Context, req *services.GetReleaseStatusRequest) (*services.GetReleaseStatusResponse, error)
GetReleaseStatus gets the status information for a named release.
func (*ReleaseServer) GetVersion ¶
func (s *ReleaseServer) GetVersion(c ctx.Context, req *services.GetVersionRequest) (*services.GetVersionResponse, error)
GetVersion sends the server version.
func (*ReleaseServer) InstallRelease ¶
func (s *ReleaseServer) InstallRelease(c ctx.Context, req *services.InstallReleaseRequest) (*services.InstallReleaseResponse, error)
InstallRelease installs a release and stores the release record.
func (*ReleaseServer) ListReleases ¶
func (s *ReleaseServer) ListReleases(req *services.ListReleasesRequest, stream services.ReleaseService_ListReleasesServer) error
ListReleases lists the releases found by the server.
func (*ReleaseServer) RollbackRelease ¶
func (s *ReleaseServer) RollbackRelease(c ctx.Context, req *services.RollbackReleaseRequest) (*services.RollbackReleaseResponse, error)
RollbackRelease rolls back to a previous version of the given release.
func (*ReleaseServer) RunReleaseTest ¶
func (s *ReleaseServer) RunReleaseTest(req *services.TestReleaseRequest, stream services.ReleaseService_RunReleaseTestServer) error
RunReleaseTest runs pre-defined tests stored as hooks on a given release
func (*ReleaseServer) UninstallRelease ¶
func (s *ReleaseServer) UninstallRelease(c ctx.Context, req *services.UninstallReleaseRequest) (*services.UninstallReleaseResponse, error)
UninstallRelease deletes all of the resources associated with this release, and marks the release DELETED.
func (*ReleaseServer) UpdateRelease ¶
func (s *ReleaseServer) UpdateRelease(c ctx.Context, req *services.UpdateReleaseRequest) (*services.UpdateReleaseResponse, error)
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 ¶
func (m *RemoteReleaseModule) Create(r *release.Release, req *services.InstallReleaseRequest, env *environment.Environment) error
Create calls rudder.InstallRelease
func (*RemoteReleaseModule) Delete ¶
func (m *RemoteReleaseModule) Delete(r *release.Release, req *services.UninstallReleaseRequest, env *environment.Environment) (string, []error)
Delete calls rudder.DeleteRelease
func (*RemoteReleaseModule) Rollback ¶
func (m *RemoteReleaseModule) Rollback(current, target *release.Release, req *services.RollbackReleaseRequest, env *environment.Environment) error
Rollback calls rudder.Rollback
func (*RemoteReleaseModule) Status ¶
func (m *RemoteReleaseModule) Status(r *release.Release, req *services.GetReleaseStatusRequest, env *environment.Environment) (string, error)
Status returns status retrieved from rudder.ReleaseStatus
func (*RemoteReleaseModule) Update ¶
func (m *RemoteReleaseModule) Update(current, target *release.Release, req *services.UpdateReleaseRequest, env *environment.Environment) error
Update calls rudder.UpgradeRelease
type SortOrder ¶
type SortOrder []string
SortOrder is an ordering of Kinds.
var InstallOrder SortOrder = []string{
"Namespace",
"ResourceQuota",
"LimitRange",
"PodSecurityPolicy",
"PodDisruptionBudget",
"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",
"PodDisruptionBudget",
"PodSecurityPolicy",
"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.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package environment describes the operating environment for Tiller.
|
Package environment describes the operating environment for Tiller. |