upgrade

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(service service) http.Handler

Handler handles an upgrade request swagger:operation PUT /clusters/{cluster}/namespaces/{namespace}/releases/{release_name} release upgradeOperation

--- summary: Upgrade a helm release deployed at the specified cluster and namespace consumes: - application/json produces: - application/json parameters:

  • name: cluster in: path required: true default: minikube type: string format: string
  • name: namespace in: path required: true default: default type: string format: string
  • name: release_name in: path required: true type: string format: string default: mysql-final
  • name: Body in: body required: true schema: "$ref": "#/definitions/upgradeRequestBody"

schemes: - http responses:

'200':
 "$ref": "#/responses/upgradeResponse"
'400':
 description: "Invalid request"
'500':
 "$ref": "#/responses/upgradeResponse"

Types

type Flags

type Flags struct {
	// example: false
	DryRun bool `json:"dry_run"`
	// example: 1
	Version string `json:"version"`
	// example: true
	Install bool `json:"install"`
	flags.GlobalFlags
}

Flags additional flags supported while upgrading a release swagger:model upgradeFlags

type Release

type Release struct {
	// example: mysql-5.7
	Name string `json:"name"`
	// example: default
	Namespace string `json:"namespace"`
	// example: 2
	Version int `json:"version"`
	// example: 2021-03-24T12:24:18.450869+05:30
	Updated time.Time `json:"updated_at,omitempty"`
	// example: deployed
	Status release.Status `json:"status"`
	// example: mysql
	Chart string `json:"chart"`
	// example: 5.7.30
	AppVersion string `json:"app_version"`
}

Release wrapper for helm release swagger:model upgradeReleaseBody

type Request

type Request struct {

	// example: stable/mysql
	Chart string `json:"chart"`
	// example: {"replicaCount": 1}
	Values map[string]interface{} `json:"values"`
	// Deprecated field
	// example: {"cluster": "minikube", "namespace":"default"}
	Flags Flags `json:"flags"`
	// contains filtered or unexported fields
}

Request is the body for upgrading a release swagger:model upgradeRequestBody

type Response

type Response struct {
	// Error field is available only when the response status code is non 2xx
	Error string `json:"error,omitempty"`
	// example: deployed
	Status  string `json:"status,omitempty"`
	Data    string `json:"data,omitempty"`
	Release `json:"-"`
}

Response represents the api response for upgrade request.

type Service

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

func NewService

func NewService(cli helmcli.Client) Service

func (Service) Upgrade

func (s Service) Upgrade(ctx context.Context, req Request) (Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL