Documentation ¶
Index ¶
- Constants
- Variables
- func AddBundlePart(baseDir string, filename string, content []byte) error
- func FindHelmChartArchiveInRelease(upstreamFiles []upstreamtypes.UpstreamFile, ...) ([]byte, error)
- func FindObjectsWithImages(b *Base) []k8sdoc.K8sDoc
- func NewConfigContextTemplateBuilder(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (*template.Builder, map[string]template.ItemValue, error)
- func RenderUpstream(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (base *Base, helmBases []Base, renderedKotsKinds map[string][]byte, err error)
- type Base
- type BaseFile
- type Document
- type FindPrivateImagesOptions
- type FindPrivateImagesResult
- type HelmChartDependencies
- type HelmChartDependency
- type HelmSubCharts
- type OverlySimpleGVK
- type OverlySimpleMetadata
- type ParseError
- type RenderOptions
- type RewriteImageOptions
- type RewriteImagesResult
- type SkippedFile
- type SkippedFilesIndex
- type WriteOptions
Constants ¶
const NamespaceTemplateConst = "repl{{ Namespace}}"
Variables ¶
var (
HelmV3ManifestNameRegex = regexp.MustCompile("^# Source: (.+)")
)
Functions ¶
func FindHelmChartArchiveInRelease ¶ added in v1.99.0
func FindHelmChartArchiveInRelease(upstreamFiles []upstreamtypes.UpstreamFile, kotsHelmChart helmchart.HelmChartInterface) ([]byte, error)
FindHelmChartArchiveInRelease iterates through all files in the release (upstreamFiles), looking for a helm chart archive that matches the chart name and version specified in the kotsHelmChart parameter
func FindObjectsWithImages ¶
func NewConfigContextTemplateBuilder ¶
func NewConfigContextTemplateBuilder(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (*template.Builder, map[string]template.ItemValue, error)
func RenderUpstream ¶
func RenderUpstream(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (base *Base, helmBases []Base, renderedKotsKinds map[string][]byte, err error)
RenderUpstream is responsible for any conversions or transpilation steps are required to take an upstream and make it a valid kubernetes base
Types ¶
type Base ¶
type Base struct { Path string Namespace string Files []BaseFile ErrorFiles []BaseFile AdditionalFiles []BaseFile Bases []Base }
func RenderHelm ¶
func RenderHelm(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (*Base, error)
func (*Base) DeepCopyInto ¶
func (Base) ListErrorFiles ¶
func (*Base) SetNamespace ¶
func (*Base) WriteBase ¶
func (b *Base) WriteBase(options WriteOptions) error
type BaseFile ¶
func PrependBaseFilesPath ¶
func (*BaseFile) DeepCopyInto ¶
func (BaseFile) IsKotsKind ¶
func (BaseFile) ShouldBeIncludedInBaseKustomization ¶
ShouldBeIncludedInBaseKustomization attempts to determine if this is a valid Kubernetes manifest. It accomplished this by trying to unmarshal the YAML and looking for a apiVersion and Kind
type FindPrivateImagesOptions ¶
type FindPrivateImagesOptions struct { BaseDir string AppSlug string ReplicatedRegistry registrytypes.RegistryOptions DockerHubRegistry registrytypes.RegistryOptions Installation *kotsv1beta1.Installation AllImagesPrivate bool HelmChartPath string UseHelmInstall map[string]bool KotsKindsImages []string }
type FindPrivateImagesResult ¶
type FindPrivateImagesResult struct { Images []kustomizeimage.Image // images to be rewritten Docs []k8sdoc.K8sDoc // docs that have rewritten images CheckedImages []kotsv1beta1.InstallationImage // all images found in the installation }
func FindPrivateImages ¶
func FindPrivateImages(options FindPrivateImagesOptions) (*FindPrivateImagesResult, error)
type HelmChartDependencies ¶
type HelmChartDependencies struct {
Dependencies []HelmChartDependency `yaml:"dependencies"`
}
type HelmChartDependency ¶
type HelmSubCharts ¶
func FindHelmSubChartsFromBase ¶
func FindHelmSubChartsFromBase(baseDir, parentChartName string) (*HelmSubCharts, error)
Returns a list of HelmSubCharts, each of which contains the name of the parent chart and a list of subcharts Each item in the subcharts list is a string of repeating terms the form "charts/<chart name>". The first item is just the top level chart (TODO: this should be removed) For example:
- top-level-chart
- charts/top-level-chart
- charts/top-level-chart/charts/cool-sub-chart
type OverlySimpleGVK ¶
type OverlySimpleGVK struct { APIVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Metadata OverlySimpleMetadata `yaml:"metadata"` }
func GetGVKWithNameAndNs ¶
func GetGVKWithNameAndNs(content []byte, baseNS string) (string, OverlySimpleGVK)
type OverlySimpleMetadata ¶
type ParseError ¶
type ParseError struct {
Err error
}
func (ParseError) Error ¶
func (e ParseError) Error() string
type RenderOptions ¶
type RenderOptions struct { SplitMultiDocYAML bool Namespace string HelmVersion string HelmValues map[string]interface{} LocalRegistryHost string LocalRegistryNamespace string LocalRegistryUsername string LocalRegistryPassword string LocalRegistryIsReadOnly bool ExcludeKotsKinds bool AppSlug string Sequence int64 IsAirgap bool UseHelmInstall bool Log *logger.CLILogger }
type RewriteImageOptions ¶ added in v1.82.0
type RewriteImageOptions struct { BaseDir string AppSlug string SourceRegistry registrytypes.RegistryOptions DestRegistry registrytypes.RegistryOptions DockerHubRegistry registrytypes.RegistryOptions CopyImages bool IsAirgap bool Log *logger.CLILogger ReportWriter io.Writer KotsKinds *kotsutil.KotsKinds }
type RewriteImagesResult ¶ added in v1.82.0
type RewriteImagesResult struct { Images []kustomizeimage.Image // images to be rewritten CheckedImages []kotsv1beta1.InstallationImage // all images found in the installation }
func RewriteImages ¶ added in v1.82.0
func RewriteImages(options RewriteImageOptions) (*RewriteImagesResult, error)
type SkippedFile ¶
type SkippedFilesIndex ¶
type SkippedFilesIndex struct {
SkippedFiles []SkippedFile `yaml:"skippedFiles"`
}