github.com/Racer159/helm-experiment@v0.0.0-20230822001441-1eb31183f614/src/get.go (about)

     1  /*
     2  Copyright The Helm Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package cmd
    18  
    19  import (
    20  	"io"
    21  
    22  	"github.com/spf13/cobra"
    23  
    24  	"helm.sh/helm/v3/cmd/helm/require"
    25  	"helm.sh/helm/v3/pkg/action"
    26  )
    27  
    28  var getHelp = `
    29  This command consists of multiple subcommands which can be used to
    30  get extended information about the release, including:
    31  
    32  - The values used to generate the release
    33  - The generated manifest file
    34  - The notes provided by the chart of the release
    35  - The hooks associated with the release
    36  `
    37  
    38  func newGetCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
    39  	cmd := &cobra.Command{
    40  		Use:   "get",
    41  		Short: "download extended information of a named release",
    42  		Long:  getHelp,
    43  		Args:  require.NoArgs,
    44  	}
    45  
    46  	cmd.AddCommand(newGetAllCmd(cfg, out))
    47  	cmd.AddCommand(newGetValuesCmd(cfg, out))
    48  	cmd.AddCommand(newGetManifestCmd(cfg, out))
    49  	cmd.AddCommand(newGetHooksCmd(cfg, out))
    50  	cmd.AddCommand(newGetNotesCmd(cfg, out))
    51  
    52  	return cmd
    53  }