Documentation ¶
Index ¶
- Constants
- Variables
- func AddBundlePart(baseDir string, filename string, content []byte) error
- func FindHelmChartArchiveInRelease(upstreamFiles []upstreamtypes.UpstreamFile, ...) ([]byte, error)
- func FindImages(b *Base) ([]string, []k8sdoc.K8sDoc, error)
- func NewConfigContextTemplateBuilder(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (*template.Builder, map[string]template.ItemValue, error)
- func RenderKotsKinds(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (map[string][]byte, error)
- func RenderUpstream(u *upstreamtypes.Upstream, renderOptions *RenderOptions, ...) (base *Base, helmBases []Base, err error)
- func RewriteImages(images []string, destRegistry dockerregistrytypes.RegistryOptions) ([]kustomizetypes.Image, error)
- func RewritePrivateImages(images []string, kotsKinds *kotsutil.KotsKinds, license *kotsv1beta1.License) ([]kustomizetypes.Image, error)
- type Base
- type BaseFile
- type Document
- type HelmChartDependencies
- type HelmChartDependency
- type OverlySimpleGVK
- type OverlySimpleMetadata
- type ParseError
- type RenderOptions
- 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 NewConfigContextTemplateBuilder ¶
func NewConfigContextTemplateBuilder(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (*template.Builder, map[string]template.ItemValue, error)
func RenderKotsKinds ¶ added in v1.105.0
func RenderKotsKinds(u *upstreamtypes.Upstream, renderOptions *RenderOptions) (map[string][]byte, error)
RenderKotsKinds is responsible for rendering KOTS custom resources
func RenderUpstream ¶
func RenderUpstream(u *upstreamtypes.Upstream, renderOptions *RenderOptions, renderedKotsKinds *kotsutil.KotsKinds) (base *Base, helmBases []Base, err error)
RenderUpstream is responsible for any conversions or transpilation steps are required to take an upstream and make it a valid kubernetes base
func RewriteImages ¶ added in v1.82.0
func RewriteImages(images []string, destRegistry dockerregistrytypes.RegistryOptions) ([]kustomizetypes.Image, error)
RewriteImages rewrites all images to point to the configured destination registry.
func RewritePrivateImages ¶ added in v1.106.0
func RewritePrivateImages(images []string, kotsKinds *kotsutil.KotsKinds, license *kotsv1beta1.License) ([]kustomizetypes.Image, error)
RewritePrivateImages rewrites private images to be proxied through proxy.replicated.com, and rewrites replicated registry images to use the custom registry domain if configured
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 HelmChartDependencies ¶
type HelmChartDependencies struct {
Dependencies []HelmChartDependency `yaml:"dependencies"`
}
type HelmChartDependency ¶
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 SkippedFile ¶
type SkippedFilesIndex ¶
type SkippedFilesIndex struct {
SkippedFiles []SkippedFile `yaml:"skippedFiles"`
}