mirror of https://github.com/helm/helm
commit
39db9ec6e8
@ -1,12 +0,0 @@
|
|||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- '1.7.x'
|
|
||||||
|
|
||||||
go_import_path: k8s.io/helm
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- make bootstrap
|
|
||||||
|
|
||||||
script:
|
|
||||||
- make test
|
|
@ -0,0 +1,120 @@
|
|||||||
|
// Copyright 2017 The Kubernetes Authors All rights reserved.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package hapi.services.rudder;
|
||||||
|
|
||||||
|
import "hapi/release/info.proto";
|
||||||
|
import "hapi/release/release.proto";
|
||||||
|
|
||||||
|
option go_package = "rudder";
|
||||||
|
|
||||||
|
service ReleaseModuleService {
|
||||||
|
rpc Version(VersionReleaseRequest) returns (VersionReleaseResponse) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// InstallRelease requests installation of a chart as a new release.
|
||||||
|
rpc InstallRelease(InstallReleaseRequest) returns (InstallReleaseResponse) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteRelease requests deletion of a named release.
|
||||||
|
rpc DeleteRelease(DeleteReleaseRequest) returns (DeleteReleaseResponse) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// RollbackRelease rolls back a release to a previous version.
|
||||||
|
rpc RollbackRelease(RollbackReleaseRequest) returns (RollbackReleaseResponse) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpgradeRelease updates release content.
|
||||||
|
rpc UpgradeRelease(UpgradeReleaseRequest) returns (UpgradeReleaseResponse) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReleaseStatus retrieves release status.
|
||||||
|
rpc ReleaseStatus(ReleaseStatusRequest) returns (ReleaseStatusResponse) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message Result {
|
||||||
|
enum Status {
|
||||||
|
// No status set
|
||||||
|
UNKNOWN = 0;
|
||||||
|
// Operation was successful
|
||||||
|
SUCCESS = 1;
|
||||||
|
// Operation had no results (e.g. upgrade identical, rollback to same, delete non-existent)
|
||||||
|
UNCHANGED = 2;
|
||||||
|
// Operation failed
|
||||||
|
ERROR = 3;
|
||||||
|
}
|
||||||
|
string info = 1;
|
||||||
|
repeated string log = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message VersionReleaseRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
message VersionReleaseResponse {
|
||||||
|
string name = 1; // The canonical name of the release module
|
||||||
|
string version = 2; // The version of the release module
|
||||||
|
}
|
||||||
|
|
||||||
|
message InstallReleaseRequest {
|
||||||
|
hapi.release.Release release = 1;
|
||||||
|
}
|
||||||
|
message InstallReleaseResponse {
|
||||||
|
hapi.release.Release release = 1;
|
||||||
|
Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteReleaseRequest {
|
||||||
|
hapi.release.Release release = 1;
|
||||||
|
}
|
||||||
|
message DeleteReleaseResponse {
|
||||||
|
hapi.release.Release release = 1;
|
||||||
|
Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpgradeReleaseRequest{
|
||||||
|
hapi.release.Release current = 1;
|
||||||
|
hapi.release.Release target = 2;
|
||||||
|
int64 Timeout = 3;
|
||||||
|
bool Wait = 4;
|
||||||
|
bool Recreate = 5;
|
||||||
|
bool Force = 6;
|
||||||
|
}
|
||||||
|
message UpgradeReleaseResponse{
|
||||||
|
hapi.release.Release release = 1;
|
||||||
|
Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RollbackReleaseRequest{
|
||||||
|
hapi.release.Release current = 1;
|
||||||
|
hapi.release.Release target = 2;
|
||||||
|
int64 Timeout = 3;
|
||||||
|
bool Wait = 4;
|
||||||
|
bool Recreate = 5;
|
||||||
|
bool Force = 6;
|
||||||
|
}
|
||||||
|
message RollbackReleaseResponse{
|
||||||
|
hapi.release.Release release = 1;
|
||||||
|
Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ReleaseStatusRequest{
|
||||||
|
hapi.release.Release release = 1;
|
||||||
|
}
|
||||||
|
message ReleaseStatusResponse{
|
||||||
|
hapi.release.Release release = 1;
|
||||||
|
hapi.release.Info info = 2;
|
||||||
|
}
|
@ -0,0 +1,113 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors All rights reserved.
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"k8s.io/helm/pkg/helm/helmpath"
|
||||||
|
"k8s.io/helm/pkg/plugin"
|
||||||
|
"k8s.io/helm/pkg/plugin/installer"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
type pluginUpdateCmd struct {
|
||||||
|
names []string
|
||||||
|
home helmpath.Home
|
||||||
|
out io.Writer
|
||||||
|
}
|
||||||
|
|
||||||
|
func newPluginUpdateCmd(out io.Writer) *cobra.Command {
|
||||||
|
pcmd := &pluginUpdateCmd{out: out}
|
||||||
|
cmd := &cobra.Command{
|
||||||
|
Use: "update <plugin>...",
|
||||||
|
Short: "update one or more Helm plugins",
|
||||||
|
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
return pcmd.complete(args)
|
||||||
|
},
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
return pcmd.run()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
func (pcmd *pluginUpdateCmd) complete(args []string) error {
|
||||||
|
if len(args) == 0 {
|
||||||
|
return errors.New("please provide plugin name to update")
|
||||||
|
}
|
||||||
|
pcmd.names = args
|
||||||
|
pcmd.home = settings.Home
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (pcmd *pluginUpdateCmd) run() error {
|
||||||
|
installer.Debug = settings.Debug
|
||||||
|
debug("loading installed plugins from %s", settings.PluginDirs())
|
||||||
|
plugins, err := findPlugins(settings.PluginDirs())
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var errorPlugins []string
|
||||||
|
|
||||||
|
for _, name := range pcmd.names {
|
||||||
|
if found := findPlugin(plugins, name); found != nil {
|
||||||
|
if err := updatePlugin(found, pcmd.home); err != nil {
|
||||||
|
errorPlugins = append(errorPlugins, fmt.Sprintf("Failed to update plugin %s, got error (%v)", name, err))
|
||||||
|
} else {
|
||||||
|
fmt.Fprintf(pcmd.out, "Updated plugin: %s\n", name)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
errorPlugins = append(errorPlugins, fmt.Sprintf("Plugin: %s not found", name))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(errorPlugins) > 0 {
|
||||||
|
return fmt.Errorf(strings.Join(errorPlugins, "\n"))
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func updatePlugin(p *plugin.Plugin, home helmpath.Home) error {
|
||||||
|
exactLocation, err := filepath.EvalSymlinks(p.Dir)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
absExactLocation, err := filepath.Abs(exactLocation)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
i, err := installer.FindSource(absExactLocation, home)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := installer.Update(i); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
debug("loading plugin from %s", i.Path())
|
||||||
|
updatedPlugin, err := plugin.LoadDir(i.Path())
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return runHook(updatedPlugin, plugin.Update, home)
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"k8s.io/helm/pkg/proto/hapi/release"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestReleaseTesting(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
args []string
|
||||||
|
flags []string
|
||||||
|
responses map[string]release.TestRun_Status
|
||||||
|
fail bool
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "basic test",
|
||||||
|
args: []string{"example-release"},
|
||||||
|
flags: []string{},
|
||||||
|
responses: map[string]release.TestRun_Status{"PASSED: green lights everywhere": release.TestRun_SUCCESS},
|
||||||
|
fail: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "test failure",
|
||||||
|
args: []string{"example-fail"},
|
||||||
|
flags: []string{},
|
||||||
|
responses: map[string]release.TestRun_Status{"FAILURE: red lights everywhere": release.TestRun_FAILURE},
|
||||||
|
fail: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "test unknown",
|
||||||
|
args: []string{"example-unknown"},
|
||||||
|
flags: []string{},
|
||||||
|
responses: map[string]release.TestRun_Status{"UNKNOWN: yellow lights everywhere": release.TestRun_UNKNOWN},
|
||||||
|
fail: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "test error",
|
||||||
|
args: []string{"example-error"},
|
||||||
|
flags: []string{},
|
||||||
|
responses: map[string]release.TestRun_Status{"ERROR: yellow lights everywhere": release.TestRun_FAILURE},
|
||||||
|
fail: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "test running",
|
||||||
|
args: []string{"example-running"},
|
||||||
|
flags: []string{},
|
||||||
|
responses: map[string]release.TestRun_Status{"RUNNING: things are happpeningggg": release.TestRun_RUNNING},
|
||||||
|
fail: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "multiple tests example",
|
||||||
|
args: []string{"example-suite"},
|
||||||
|
flags: []string{},
|
||||||
|
responses: map[string]release.TestRun_Status{
|
||||||
|
"RUNNING: things are happpeningggg": release.TestRun_RUNNING,
|
||||||
|
"PASSED: party time": release.TestRun_SUCCESS,
|
||||||
|
"RUNNING: things are happening again": release.TestRun_RUNNING,
|
||||||
|
"FAILURE: good thing u checked :)": release.TestRun_FAILURE,
|
||||||
|
"RUNNING: things are happpeningggg yet again": release.TestRun_RUNNING,
|
||||||
|
"PASSED: feel free to party again": release.TestRun_SUCCESS},
|
||||||
|
fail: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
c := &fakeReleaseClient{responses: tt.responses}
|
||||||
|
|
||||||
|
buf := bytes.NewBuffer(nil)
|
||||||
|
cmd := newReleaseTestCmd(c, buf)
|
||||||
|
cmd.ParseFlags(tt.flags)
|
||||||
|
|
||||||
|
err := cmd.RunE(cmd, tt.args)
|
||||||
|
if err == nil && tt.fail {
|
||||||
|
t.Errorf("%q did not fail but should have failed", tt.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
if tt.fail {
|
||||||
|
continue
|
||||||
|
} else {
|
||||||
|
t.Errorf("%q reported error: %s", tt.name, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
@ -0,0 +1,3 @@
|
|||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
name: chart-missing-deps
|
||||||
|
version: 0.1.0
|
@ -0,0 +1,21 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
@ -0,0 +1,3 @@
|
|||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
name: reqsubchart
|
||||||
|
version: 0.1.0
|
@ -0,0 +1,4 @@
|
|||||||
|
# Default values for reqsubchart.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare name/value pairs to be passed into your templates.
|
||||||
|
# name: value
|
@ -0,0 +1,4 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: reqsubchart
|
||||||
|
version: 0.1.0
|
||||||
|
repository: "https://example.com/charts"
|
@ -0,0 +1,4 @@
|
|||||||
|
# Default values for reqtest.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare name/value pairs to be passed into your templates.
|
||||||
|
# name: value
|
@ -0,0 +1,139 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"fmt"
|
||||||
|
"net"
|
||||||
|
|
||||||
|
"golang.org/x/net/context"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/grpclog"
|
||||||
|
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
|
||||||
|
|
||||||
|
"k8s.io/helm/pkg/kube"
|
||||||
|
rudderAPI "k8s.io/helm/pkg/proto/hapi/rudder"
|
||||||
|
"k8s.io/helm/pkg/rudder"
|
||||||
|
"k8s.io/helm/pkg/tiller"
|
||||||
|
"k8s.io/helm/pkg/version"
|
||||||
|
)
|
||||||
|
|
||||||
|
var kubeClient *kube.Client
|
||||||
|
var clientset internalclientset.Interface
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
var err error
|
||||||
|
kubeClient = kube.New(nil)
|
||||||
|
clientset, err = kubeClient.ClientSet()
|
||||||
|
if err != nil {
|
||||||
|
grpclog.Fatalf("Cannot initialize Kubernetes connection: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
lis, err := net.Listen("tcp", fmt.Sprintf(":%d", rudder.GrpcPort))
|
||||||
|
if err != nil {
|
||||||
|
grpclog.Fatalf("failed to listen: %v", err)
|
||||||
|
}
|
||||||
|
grpcServer := grpc.NewServer()
|
||||||
|
rudderAPI.RegisterReleaseModuleServiceServer(grpcServer, &ReleaseModuleServiceServer{})
|
||||||
|
|
||||||
|
grpclog.Print("Server starting")
|
||||||
|
grpcServer.Serve(lis)
|
||||||
|
grpclog.Print("Server started")
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReleaseModuleServiceServer provides implementation for rudderAPI.ReleaseModuleServiceServer
|
||||||
|
type ReleaseModuleServiceServer struct{}
|
||||||
|
|
||||||
|
// Version returns Rudder version based on helm version
|
||||||
|
func (r *ReleaseModuleServiceServer) Version(ctx context.Context, in *rudderAPI.VersionReleaseRequest) (*rudderAPI.VersionReleaseResponse, error) {
|
||||||
|
grpclog.Print("version")
|
||||||
|
return &rudderAPI.VersionReleaseResponse{
|
||||||
|
Name: "helm-rudder-native",
|
||||||
|
Version: version.Version,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// InstallRelease creates a release using kubeClient.Create
|
||||||
|
func (r *ReleaseModuleServiceServer) InstallRelease(ctx context.Context, in *rudderAPI.InstallReleaseRequest) (*rudderAPI.InstallReleaseResponse, error) {
|
||||||
|
grpclog.Print("install")
|
||||||
|
b := bytes.NewBufferString(in.Release.Manifest)
|
||||||
|
err := kubeClient.Create(in.Release.Namespace, b, 500, false)
|
||||||
|
if err != nil {
|
||||||
|
grpclog.Printf("error when creating release: %v", err)
|
||||||
|
}
|
||||||
|
return &rudderAPI.InstallReleaseResponse{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteRelease deletes a provided release
|
||||||
|
func (r *ReleaseModuleServiceServer) DeleteRelease(ctx context.Context, in *rudderAPI.DeleteReleaseRequest) (*rudderAPI.DeleteReleaseResponse, error) {
|
||||||
|
grpclog.Print("delete")
|
||||||
|
|
||||||
|
resp := &rudderAPI.DeleteReleaseResponse{}
|
||||||
|
rel := in.Release
|
||||||
|
vs, err := tiller.GetVersionSet(clientset.Discovery())
|
||||||
|
if err != nil {
|
||||||
|
return resp, fmt.Errorf("Could not get apiVersions from Kubernetes: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
kept, errs := tiller.DeleteRelease(rel, vs, kubeClient)
|
||||||
|
rel.Manifest = kept
|
||||||
|
|
||||||
|
allErrors := ""
|
||||||
|
for _, e := range errs {
|
||||||
|
allErrors = allErrors + "\n" + e.Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(allErrors) > 0 {
|
||||||
|
err = fmt.Errorf(allErrors)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &rudderAPI.DeleteReleaseResponse{
|
||||||
|
Release: rel,
|
||||||
|
}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// RollbackRelease rolls back the release
|
||||||
|
func (r *ReleaseModuleServiceServer) RollbackRelease(ctx context.Context, in *rudderAPI.RollbackReleaseRequest) (*rudderAPI.RollbackReleaseResponse, error) {
|
||||||
|
grpclog.Print("rollback")
|
||||||
|
c := bytes.NewBufferString(in.Current.Manifest)
|
||||||
|
t := bytes.NewBufferString(in.Target.Manifest)
|
||||||
|
err := kubeClient.Update(in.Target.Namespace, c, t, in.Force, in.Recreate, in.Timeout, in.Wait)
|
||||||
|
return &rudderAPI.RollbackReleaseResponse{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpgradeRelease upgrades manifests using kubernetes client
|
||||||
|
func (r *ReleaseModuleServiceServer) UpgradeRelease(ctx context.Context, in *rudderAPI.UpgradeReleaseRequest) (*rudderAPI.UpgradeReleaseResponse, error) {
|
||||||
|
grpclog.Print("upgrade")
|
||||||
|
c := bytes.NewBufferString(in.Current.Manifest)
|
||||||
|
t := bytes.NewBufferString(in.Target.Manifest)
|
||||||
|
err := kubeClient.Update(in.Target.Namespace, c, t, in.Force, in.Recreate, in.Timeout, in.Wait)
|
||||||
|
// upgrade response object should be changed to include status
|
||||||
|
return &rudderAPI.UpgradeReleaseResponse{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReleaseStatus retrieves release status
|
||||||
|
func (r *ReleaseModuleServiceServer) ReleaseStatus(ctx context.Context, in *rudderAPI.ReleaseStatusRequest) (*rudderAPI.ReleaseStatusResponse, error) {
|
||||||
|
grpclog.Print("status")
|
||||||
|
|
||||||
|
resp, err := kubeClient.Get(in.Release.Namespace, bytes.NewBufferString(in.Release.Manifest))
|
||||||
|
in.Release.Info.Status.Resources = resp
|
||||||
|
return &rudderAPI.ReleaseStatusResponse{
|
||||||
|
Release: in.Release,
|
||||||
|
Info: in.Release.Info,
|
||||||
|
}, err
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
# Chart Repositories: Frequently Asked Questions
|
||||||
|
|
||||||
|
This section tracks some of the more frequently encountered issues with using chart repositories.
|
||||||
|
|
||||||
|
**We'd love your help** making this document better. To add, correct, or remove
|
||||||
|
information, [file an issue](https://github.com/kubernetes/helm/issues) or
|
||||||
|
send us a pull request.
|
||||||
|
|
||||||
|
## Fetching
|
||||||
|
|
||||||
|
**Q: Why do I get a `unsupported protocol scheme ""` error when trying to fetch a chart from my custom repo?**
|
||||||
|
|
||||||
|
A: (Helm < 2.5.0) This is likely caused by you creating your chart repo index without specifying the `--url` flag.
|
||||||
|
Try recreating your `index.yaml` file with a command like `heml repo index --url http://my-repo/charts .`,
|
||||||
|
and then re-uploading it to your custom charts repo.
|
||||||
|
|
||||||
|
This behavior was changed in Helm 2.5.0.
|
@ -0,0 +1,27 @@
|
|||||||
|
## helm plugin update
|
||||||
|
|
||||||
|
update one or more Helm plugins
|
||||||
|
|
||||||
|
### Synopsis
|
||||||
|
|
||||||
|
|
||||||
|
update one or more Helm plugins
|
||||||
|
|
||||||
|
```
|
||||||
|
helm plugin update <plugin>...
|
||||||
|
```
|
||||||
|
|
||||||
|
### Options inherited from parent commands
|
||||||
|
|
||||||
|
```
|
||||||
|
--debug enable verbose output
|
||||||
|
--home string location of your Helm config. Overrides $HELM_HOME (default "$HOME/.helm")
|
||||||
|
--host string address of tiller. Overrides $HELM_HOST
|
||||||
|
--kube-context string name of the kubeconfig context to use
|
||||||
|
--tiller-namespace string namespace of tiller (default "kube-system")
|
||||||
|
```
|
||||||
|
|
||||||
|
### SEE ALSO
|
||||||
|
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
|
||||||
|
|
||||||
|
###### Auto generated by spf13/cobra on 29-May-2017
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue