Commit 7ce60018 authored by Adam Reese's avatar Adam Reese Committed by GitHub

Merge pull request #1496 from adieu/master

Separate tiller into pkg and cmd so we can use tiller as a library.
parents 4fd029a4 c0850efe
......@@ -25,9 +25,11 @@ import (
"github.com/spf13/cobra"
"google.golang.org/grpc"
"k8s.io/helm/cmd/tiller/environment"
"k8s.io/helm/pkg/proto/hapi/services"
"k8s.io/helm/pkg/storage"
"k8s.io/helm/pkg/storage/driver"
"k8s.io/helm/pkg/tiller"
"k8s.io/helm/pkg/tiller/environment"
)
const (
......@@ -104,6 +106,8 @@ func start(c *cobra.Command, args []string) {
srvErrCh := make(chan error)
probeErrCh := make(chan error)
go func() {
svc := tiller.NewReleaseServer(env)
services.RegisterReleaseServiceServer(rootServer, svc)
if err := rootServer.Serve(lstn); err != nil {
srvErrCh <- err
}
......
......@@ -19,8 +19,8 @@ package main
import (
"testing"
"k8s.io/helm/cmd/tiller/environment"
"k8s.io/helm/pkg/engine"
"k8s.io/helm/pkg/tiller/environment"
)
// These are canary tests to make sure that the default server actually
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package main
package tiller
import (
"fmt"
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package main
package tiller
import (
"testing"
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package main
package tiller
import (
"sort"
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package main
package tiller
import (
"testing"
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package main
package tiller
import (
"golang.org/x/net/context"
......@@ -22,7 +22,7 @@ import (
relutil "k8s.io/helm/pkg/releaseutil"
)
func (s *releaseServer) GetHistory(ctx context.Context, req *tpb.GetHistoryRequest) (*tpb.GetHistoryResponse, error) {
func (s *ReleaseServer) GetHistory(ctx context.Context, req *tpb.GetHistoryRequest) (*tpb.GetHistoryResponse, error) {
if !checkClientVersion(ctx) {
return nil, errIncompatibleVersion
}
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package main
package tiller
import (
"reflect"
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package main
package tiller
import (
"errors"
......@@ -29,13 +29,13 @@ import (
"golang.org/x/net/context"
"google.golang.org/grpc/metadata"
"k8s.io/helm/cmd/tiller/environment"
"k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/chart"
"k8s.io/helm/pkg/proto/hapi/release"
"k8s.io/helm/pkg/proto/hapi/services"
"k8s.io/helm/pkg/storage"
"k8s.io/helm/pkg/storage/driver"
"k8s.io/helm/pkg/tiller/environment"
)
const notesText = "my notes here"
......@@ -70,8 +70,8 @@ data:
name: value
`
func rsFixture() *releaseServer {
return &releaseServer{
func rsFixture() *ReleaseServer {
return &ReleaseServer{
env: mockEnvironment(),
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment