Documentation
¶
Index ¶
- Variables
- func CompareIndexFiles(ctx context.Context, rootFs billy.Filesystem) error
- func IsRancherChartVersion(s string) bool
- func UpdateOCI(ctx context.Context, rootFs billy.Filesystem, ...) error
- func ValidateIcons(ctx context.Context, rootFs billy.Filesystem) error
- func ValidatePullRequest(ctx context.Context, token, prNum string, dep *lifecycle.Dependencies) error
- type Bump
- type BumpOutput
- type Command
- type ForwardPort
- type PullRequest
- type Release
Constants ¶
This section is empty.
Variables ¶
var ChartTargetsMap = map[string][]string{
"elemental": {"elemental", "elemental-crd"},
"fleet": {"fleet", "fleet-crd", "fleet-agent"},
"harvester-cloud-provider": {"harvester-cloud-provider"},
"harvester-csi-driver": {"harvester-csi-driver"},
"longhorn": {"longhorn", "longhorn-crd"},
"neuvector": {"neuvector", "neuvector-crd", "neuvector-monitor"},
"prometheus-federator": {"prometheus-federator"},
"rancher-aks-operator": {"rancher-aks-operator", "rancher-aks-operator-crd"},
"rancher-alerting-drivers": {"rancher-alerting-drivers"},
"rancher-backup": {"rancher-backup", "rancher-backup-crd"},
"rancher-cis-benchmark": {"rancher-cis-benchmark", "rancher-cis-benchmark-crd"},
"rancher-compliance": {"rancher-compliance", "rancher-compliance-crd"},
"rancher-csp-adapter": {"rancher-csp-adapter"},
"rancher-eks-operator": {"rancher-eks-operator", "rancher-eks-operator-crd"},
"rancher-gatekeeper": {"rancher-gatekeeper", "rancher-gatekeeper-crd"},
"rancher-gke-operator": {"rancher-gke-operator", "rancher-gke-operator-crd"},
"rancher-istio": {"rancher-istio"},
"rancher-logging": {"rancher-logging", "rancher-logging-crd"},
"rancher-monitoring": {"rancher-monitoring", "rancher-monitoring-crd"},
"rancher-project-monitoring": {"rancher-project-monitoring"},
"rancher-provisioning-capi": {"rancher-provisioning-capi"},
"rancher-pushprox": {"rancher-pushprox"},
"rancher-vsphere-csi": {"rancher-vsphere-csi"},
"rancher-vsphere-cpi": {"rancher-vsphere-cpi"},
"rancher-webhook": {"rancher-webhook"},
"rancher-windows-gmsa": {"rancher-windows-gmsa", "rancher-windows-gmsa-crd"},
"rancher-wins-upgrader": {"rancher-wins-upgrader"},
"sriov": {"sriov", "sriov-crd"},
"system-upgrade-controller": {"system-upgrade-controller"},
"ui-plugin-operator": {"ui-plugin-operator", "ui-plugin-operator-crd"},
"rancher-turtles": {"rancher-turtles"},
"rancher-turtles-providers": {"rancher-turtles-providers"},
"rancher-ali-operator": {"rancher-ali-operator", "rancher-ali-operator-crd"},
}
ChartTargetsMap represents all current active charts
Functions ¶
func CompareIndexFiles ¶ added in v1.0.0
func CompareIndexFiles(ctx context.Context, rootFs billy.Filesystem) error
CompareIndexFiles will load the current index.yaml file from the root filesystem and compare it with the index.yaml file from charts.rancher.io
func IsRancherChartVersion ¶ added in v1.9.5
func UpdateOCI ¶ added in v1.8.3
func UpdateOCI(ctx context.Context, rootFs billy.Filesystem, ociDNS, customPath, ociUser, ociPass string, debug bool) error
UpdateOCI pushes Helm charts to an OCI registry
func ValidateIcons ¶ added in v1.6.4
func ValidateIcons(ctx context.Context, rootFs billy.Filesystem) error
ValidateIcons will check if the icons are present in the local filesystem and if they are not, it will return an error.
func ValidatePullRequest ¶ added in v0.9.9
func ValidatePullRequest(ctx context.Context, token, prNum string, dep *lifecycle.Dependencies) error
ValidatePullRequest will execute the check a given pull request for the following:
- Checkpoint 0: release.yaml file is valid
- TODO: Checkpoint 1: Compare contents of assets/ to charts/
- TODO: Checkpoint 2: Compare assets against index.yaml
Types ¶
type Bump ¶ added in v1.1.0
type Bump struct {
// represents package/<target_chart> directory loaded options
Pkg *charts.Package
// contains filtered or unexported fields
}
Bump represents the chart bump process for a single chart (with its CRD and dependencies).
func SetupBump ¶ added in v1.1.0
func SetupBump(ctx context.Context, repoRoot, targetPackage, targetBranch string, chScriptOpts *options.ChartsScriptOptions, newChart bool) (*Bump, error)
SetupBump will load and parse all related information to the chart that should be bumped.
func (*Bump) BumpChart ¶ added in v1.1.0
func (b *Bump) BumpChart(ctx context.Context, versionOverride string, multiRCs, newChart, IsPrimeChart bool) error
BumpChart will execute a similar approach as the defined development workflow for chartowners. The main difference is that between the steps: (make prepare and make patch) we will calculate the next version to release.
type BumpOutput ¶ added in v1.5.3
type BumpOutput struct {
Charts []string `json:"charts"` // List of charts processed
NewVersion string `json:"new_version"` // The single version applied
}
BumpOutput defines the structure that will be written to config/bump.json
type Command ¶
type Command struct {
Chart string // The chart to forward-port
Version string // The version to forward-port
Command []string // The command to run to forward-port
}
Command holds the necessary information to forward-port a chart
type ForwardPort ¶
type ForwardPort struct {
VR *lifecycle.VersionRules
// contains filtered or unexported fields
}
ForwardPort holds the data and methods to forward-port charts
func CreateForwardPortStructure ¶
func CreateForwardPortStructure(ctx context.Context, ld *lifecycle.Dependencies, assetsToPort map[string][]lifecycle.Asset, forkURL string) (*ForwardPort, error)
CreateForwardPortStructure will create the ForwardPort struct with access to the necessary dependencies. It will also check if yq command is installed on the system.
func (*ForwardPort) ExecuteForwardPort ¶
func (f *ForwardPort) ExecuteForwardPort(ctx context.Context, chart string) error
ExecuteForwardPort will execute all steps to organize and create the forward-port PRs
type PullRequest ¶
type PullRequest struct {
// contains filtered or unexported fields
}
PullRequest represents a pull request to be created for each chart separately
type Release ¶ added in v0.9.6
type Release struct {
VR *lifecycle.VersionRules
AssetTgz string
AssetPath string
ChartVersion string
Chart string
ReleaseYamlPath string
ForkRemoteURL string
// contains filtered or unexported fields
}
Release holds necessary metadata to release a chart version
func InitRelease ¶ added in v0.9.6
func InitRelease(ctx context.Context, d *lifecycle.Dependencies, s *lifecycle.Status, v, c, f string) (*Release, error)
InitRelease will create the Release struct with access to the necessary dependencies.
func (*Release) PullAsset ¶ added in v0.9.6
PullAsset will execute the release porting for a chart in the repository