github.com/x-helm/helm@v3.0.0-beta.3+incompatible/pkg/chart/dependency.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 chart
    17  
    18  import "time"
    19  
    20  // Dependency describes a chart upon which another chart depends.
    21  //
    22  // Dependencies can be used to express developer intent, or to capture the state
    23  // of a chart.
    24  type Dependency struct {
    25  	// Name is the name of the dependency.
    26  	//
    27  	// This must mach the name in the dependency's Chart.yaml.
    28  	Name string `json:"name"`
    29  	// Version is the version (range) of this chart.
    30  	//
    31  	// A lock file will always produce a single version, while a dependency
    32  	// may contain a semantic version range.
    33  	Version string `json:"version,omitempty"`
    34  	// The URL to the repository.
    35  	//
    36  	// Appending `index.yaml` to this string should result in a URL that can be
    37  	// used to fetch the repository index.
    38  	Repository string `json:"repository"`
    39  	// A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled )
    40  	Condition string `json:"condition,omitempty"`
    41  	// Tags can be used to group charts for enabling/disabling together
    42  	Tags []string `json:"tags,omitempty"`
    43  	// Enabled bool determines if chart should be loaded
    44  	Enabled bool `json:"enabled,omitempty"`
    45  	// ImportValues holds the mapping of source values to parent key to be imported. Each item can be a
    46  	// string or pair of child/parent sublist items.
    47  	ImportValues []interface{} `json:"import-values,omitempty"`
    48  	// Alias usable alias to be used for the chart
    49  	Alias string `json:"alias,omitempty"`
    50  }
    51  
    52  // Lock is a lock file for dependencies.
    53  //
    54  // It represents the state that the dependencies should be in.
    55  type Lock struct {
    56  	// Genderated is the date the lock file was last generated.
    57  	Generated time.Time `json:"generated"`
    58  	// Digest is a hash of the dependencies in Chart.yaml.
    59  	Digest string `json:"digest"`
    60  	// Dependencies is the list of dependencies that this lock file has locked.
    61  	Dependencies []*Dependency `json:"dependencies"`
    62  }