|
|
@ -2,8 +2,8 @@ package environment
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"github.com/deis/tiller/pkg/engine"
|
|
|
|
"github.com/deis/tiller/pkg/engine"
|
|
|
|
"github.com/deis/tiller/pkg/hapi"
|
|
|
|
|
|
|
|
"github.com/deis/tiller/pkg/proto/hapi/chart"
|
|
|
|
"github.com/deis/tiller/pkg/proto/hapi/chart"
|
|
|
|
|
|
|
|
"github.com/deis/tiller/pkg/proto/hapi/release"
|
|
|
|
"github.com/deis/tiller/pkg/storage"
|
|
|
|
"github.com/deis/tiller/pkg/storage"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -65,14 +65,14 @@ type ReleaseStorage interface {
|
|
|
|
// If a release with the same name exists, this returns an error.
|
|
|
|
// If a release with the same name exists, this returns an error.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// It may return other errors in cases where it cannot write to storage.
|
|
|
|
// It may return other errors in cases where it cannot write to storage.
|
|
|
|
Create(*hapi.Release) error
|
|
|
|
Create(*release.Release) error
|
|
|
|
// Read takes a name and returns a release that has that name.
|
|
|
|
// Read takes a name and returns a release that has that name.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// It will only return releases that are not deleted and not superseded.
|
|
|
|
// It will only return releases that are not deleted and not superseded.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// It will return an error if no relevant release can be found, or if storage
|
|
|
|
// It will return an error if no relevant release can be found, or if storage
|
|
|
|
// is not properly functioning.
|
|
|
|
// is not properly functioning.
|
|
|
|
Read(name string) (*hapi.Release, error)
|
|
|
|
Read(name string) (*release.Release, error)
|
|
|
|
|
|
|
|
|
|
|
|
// Update looks for a release with the same name and updates it with the
|
|
|
|
// Update looks for a release with the same name and updates it with the
|
|
|
|
// present release contents.
|
|
|
|
// present release contents.
|
|
|
@ -82,24 +82,24 @@ type ReleaseStorage interface {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// It will return an error if a previous release is not found. It may also
|
|
|
|
// It will return an error if a previous release is not found. It may also
|
|
|
|
// return an error if the storage backend encounters an error.
|
|
|
|
// return an error if the storage backend encounters an error.
|
|
|
|
Update(*hapi.Release) error
|
|
|
|
Update(*release.Release) error
|
|
|
|
|
|
|
|
|
|
|
|
// Delete marks a Release as deleted.
|
|
|
|
// Delete marks a Release as deleted.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// It returns the deleted record. If the record is not found or if the
|
|
|
|
// It returns the deleted record. If the record is not found or if the
|
|
|
|
// underlying storage encounters an error, this will return an error.
|
|
|
|
// underlying storage encounters an error, this will return an error.
|
|
|
|
Delete(name string) (*hapi.Release, error)
|
|
|
|
Delete(name string) (*release.Release, error)
|
|
|
|
|
|
|
|
|
|
|
|
// List lists all active (non-deleted, non-superseded) releases.
|
|
|
|
// List lists all active (non-deleted, non-superseded) releases.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// To get deleted or superseded releases, use Query.
|
|
|
|
// To get deleted or superseded releases, use Query.
|
|
|
|
List() ([]*hapi.Release, error)
|
|
|
|
List() ([]*release.Release, error)
|
|
|
|
|
|
|
|
|
|
|
|
// Query takes a map of labels and returns any releases that match.
|
|
|
|
// Query takes a map of labels and returns any releases that match.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Query will search all releases, including deleted and superseded ones.
|
|
|
|
// Query will search all releases, including deleted and superseded ones.
|
|
|
|
// The provided map will be used to filter results.
|
|
|
|
// The provided map will be used to filter results.
|
|
|
|
Query(map[string]string) ([]*hapi.Release, error)
|
|
|
|
Query(map[string]string) ([]*release.Release, error)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// KubeClient represents a client capable of communicating with the Kubernetes API.
|
|
|
|
// KubeClient represents a client capable of communicating with the Kubernetes API.
|
|
|
|