utils

package
v0.0.0-...-390ffc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeMaps

func MergeMaps(dst, src map[string]interface{}) map[string]interface{}

MergeMaps deeply merges 2 maps. If there is conflict, the value from dst will be used.

Types

type ChartHelper

type ChartHelper interface {
	// GetAnnotationsFromChart returns the annotations for a given chart
	GetAnnotationsFromChart(ctx context.Context, c client.Client, source dpuservicev1.ApplicationSource) (map[string]string, error)
}

func NewChartHelper

func NewChartHelper() ChartHelper

NewChartHelper returns a ChartHelper that is able to do operations with charts. It is able to authenticate to registries using secrets that conform with the ArgoCD way of providing credentials for registries.

type FakeChartHelper

type FakeChartHelper struct {
	// contains filtered or unexported fields
}

func NewFakeChartHelper

func NewFakeChartHelper() *FakeChartHelper

NewFakeChartHelper returns a fake chart helper used in tests

func (*FakeChartHelper) GetAnnotationsFromChart

func (f *FakeChartHelper) GetAnnotationsFromChart(ctx context.Context, c client.Client, source dpuservicev1.ApplicationSource) (map[string]string, error)

GetAnnotationsFromChart returns the annotations found in the specified chart by pulling the chart locally

func (*FakeChartHelper) Reset

func (f *FakeChartHelper) Reset()

Reset resets the FakeChartHelper

func (*FakeChartHelper) ReturnErrorForChart

func (f *FakeChartHelper) ReturnErrorForChart(source dpuservicev1.ApplicationSource)

ReturnErrorForChart returns error when GetAnnotationsFromChart is called for a given chart

func (*FakeChartHelper) SetAnnotationsForChart

func (f *FakeChartHelper) SetAnnotationsForChart(source dpuservicev1.ApplicationSource, annotations map[string]string)

SetAnnotationsForChart sets annotations for a chart

type HelmRegistryChart

type HelmRegistryChart struct {
	Name        string            `json:"name"`
	Version     string            `json:"version"`
	Annotations map[string]string `json:"annotations"`
}

type HelmRegistryIndex

type HelmRegistryIndex struct {
	Entries map[string][]HelmRegistryChart `json:"entries"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL