Documentation ¶
Index ¶
- Constants
- Variables
- func BuildOrGetIndex(dir string) (*repo.IndexFile, error)
- func DecodeValuesInDir(dir string) ([]map[interface{}]interface{}, error)
- func DecodeValuesInTgz(path string) ([]map[interface{}]interface{}, error)
- func IsChartDir(dirName string) (bool, error)
- func LoadMetadata(path string) (*chart.Metadata, error)
- func PickImagesFromValuesMap(imagesSet map[string]map[string]bool, values map[interface{}]interface{}, ...) error
- type Chart
- type ChartRepoType
- type OsType
- type Questions
Constants ¶
const ( RepoTypeDefault = iota RepoTypeSystem )
const ChartfileName = "Chart.yaml"
const RancherVersionAnnotationKey = "catalog.cattle.io/rancher-version"
Variables ¶
var ( ChartsToCheckConstraints = map[string]bool{} SystemChartsToCheckConstraints = map[string]bool{ "rancher-monitoring": true, } )
chartsToCheckConstraints and *ChartsToCheckConstraints define which charts and system charts should be checked for images and added to imageSet based on whether the given Rancher version/tag satisfies the chart's Rancher version constraints to allow support for multiple version lines of a chart in airgap setups. If a chart is not defined here, only the latest version of it will be checked for images. INFO: CRD charts need to be added as well.
var IgnoreChartImages = map[string]bool{ "rancher/mirrored-sig-storage-csi-attacher:latest": true, "rancher/mirrored-sig-storage-csi-node-driver-registrar:latest": true, "rancher/mirrored-sig-storage-csi-provisioner:latest": true, "rancher/mirrored-sig-storage-csi-resizer:latest": true, "rancher/mirrored-sig-storage-livenessprobe:latest": true, "rancher/mirrored-cloud-provider-vsphere-csi-release-syncer:latest": true, "rancher/mirrored-cloud-provider-vsphere-csi-release-driver:latest": true, "rancher/mirrored-cloud-provider-vsphere-cpi-release-manager:latest": true, }
Some latest tag chart images does not exists.
Functions ¶
func BuildOrGetIndex ¶
BuildOrGetIndex builds or get index from local chart repo directory
func DecodeValuesInDir ¶ added in v1.5.0
DecodeValuesInDir reads directory and returns a slice of values corresponding to values.yaml files found inside of it.
func DecodeValuesInTgz ¶ added in v1.5.0
DecodeValuesInTgz reads tarball and returns a slice of values corresponding to values.yaml files found inside of it.
func IsChartDir ¶ added in v1.5.0
IsChartDir validate a chart directory.
Checks for a valid Chart.yaml.
func LoadMetadata ¶
LoadMetadata loads chart metadata from chart directory (not tgz file)
Types ¶
type Chart ¶
type Chart struct { RancherVersion string OS OsType Type ChartRepoType // chart type: default, system, etc... Path string URL string CloneBaseDir string // directory to clone Branch string // git branch if in URL mode InsecureSkipTLS bool ImageSet map[string]map[string]bool // map[image]map[source] }
type ChartRepoType ¶
type ChartRepoType int
func (*ChartRepoType) String ¶
func (t *ChartRepoType) String() string