github.com/x-helm/helm@v3.0.0-beta.3+incompatible/pkg/release/release.go (about) 1 /* 2 Copyright The Helm Authors. 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 */ 15 16 package release 17 18 import "helm.sh/helm/pkg/chart" 19 20 // Release describes a deployment of a chart, together with the chart 21 // and the variables used to deploy that chart. 22 type Release struct { 23 // Name is the name of the release 24 Name string `json:"name,omitempty"` 25 // Info provides information about a release 26 Info *Info `json:"info,omitempty"` 27 // Chart is the chart that was released. 28 Chart *chart.Chart `json:"chart,omitempty"` 29 // Config is the set of extra Values added to the chart. 30 // These values override the default values inside of the chart. 31 Config map[string]interface{} `json:"config,omitempty"` 32 // Manifest is the string representation of the rendered template. 33 Manifest string `json:"manifest,omitempty"` 34 // Hooks are all of the hooks declared for this release. 35 Hooks []*Hook `json:"hooks,omitempty"` 36 // Version is an int which represents the version of the release. 37 Version int `json:"version,omitempty"` 38 // Namespace is the kubernetes namespace of the release. 39 Namespace string `json:"namespace,omitempty"` 40 } 41 42 // SetStatus is a helper for setting the status on a release. 43 func (r *Release) SetStatus(status Status, msg string) { 44 r.Info.Status = status 45 r.Info.Description = msg 46 }