Documentation
¶
Index ¶
- Constants
- func GetLocalCharts(ctx context.Context, client kclient.Client, namespace string) (map[string]*platformApi.ArangoPlatformChart, error)
- type ApiVersions
- type Chart
- type ChartData
- type ChartManager
- type ChartManagerRepo
- type ChartManagerRepoVersion
- type Client
- type Configuration
- type ConfigurationDriver
- type Package
- type PackageRelease
- type PackageSpec
- type Platform
- type PlatformRequirements
- type PlatformVersionDefinition
- type Release
- type ReleaseChart
- type ReleaseChartMetadata
- type ReleaseInfo
- type Resource
- type ResourceObject
- type ResourceObjectData
- type Resources
- type UninstallRelease
- type UpgradeResponse
- type Values
- type ValuesMergeMethod
Constants ¶
View Source
const (
PlatformFileName = "platform.yml"
)
Variables ¶
This section is empty.
Functions ¶
func GetLocalCharts ¶
func GetLocalCharts(ctx context.Context, client kclient.Client, namespace string) (map[string]*platformApi.ArangoPlatformChart, error)
Types ¶
type ApiVersions ¶
type ApiVersions map[schema.GroupVersionKind]meta.APIResource
type ChartManager ¶
type ChartManager interface {
Reload(ctx context.Context) error
Repositories() []string
Get(name string) (ChartManagerRepo, bool)
}
func NewChartManager ¶
type ChartManagerRepo ¶
type ChartManagerRepo interface {
Versions() []string
Get(version string) (ChartManagerRepoVersion, bool)
GetByTag(version string) (ChartManagerRepoVersion, bool)
Latest() (ChartManagerRepoVersion, bool)
}
type ChartManagerRepoVersion ¶
type Client ¶
type Client interface {
Namespace() string
Alive(ctx context.Context) error
Invalidate()
DiscoverKubernetesApiVersions(gv schema.GroupVersion) (ApiVersions, error)
DiscoverKubernetesApiVersionKind(gvk schema.GroupVersionKind) (*meta.APIResource, error)
NativeGet(ctx context.Context, reqs ...Resource) ([]ResourceObject, error)
StatusObjects(ctx context.Context, name string, mods ...util.Mod[action.Status]) (*Release, []ResourceObject, error)
Status(ctx context.Context, name string, mods ...util.Mod[action.Status]) (*Release, error)
List(ctx context.Context, mods ...util.Mod[action.List]) ([]Release, error)
Install(ctx context.Context, chart Chart, values Values, mods ...util.Mod[action.Install]) (*Release, error)
Upgrade(ctx context.Context, name string, chart Chart, values Values, mods ...util.Mod[action.Upgrade]) (*UpgradeResponse, error)
Uninstall(ctx context.Context, name string, mods ...util.Mod[action.Uninstall]) (*UninstallRelease, error)
Test(ctx context.Context, name string, mods ...util.Mod[action.ReleaseTesting]) (*Release, error)
}
func NewClient ¶
func NewClient(cfg Configuration) (Client, error)
type Configuration ¶
type Configuration struct {
Namespace string
Config *rest.Config
Driver *ConfigurationDriver
}
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
type ConfigurationDriver ¶
type ConfigurationDriver string
const ( ConfigurationDriverDefault = ConfigurationDriverSecret ConfigurationDriverConfigMap ConfigurationDriver = "configmap" ConfigurationDriverSecret ConfigurationDriver = "secret" )
func (*ConfigurationDriver) Get ¶
func (c *ConfigurationDriver) Get() ConfigurationDriver
func (*ConfigurationDriver) Validate ¶
func (c *ConfigurationDriver) Validate() error
type Package ¶
type Package struct {
Packages map[string]PackageSpec `json:"packages,omitempty"`
Releases map[string]PackageRelease `json:"releases,omitempty"`
}
func NewPackage ¶
type PackageRelease ¶
type PackageSpec ¶
type Platform ¶
type Platform struct {
Requirements PlatformRequirements `json:"requirements,omitempty"`
}
type PlatformRequirements ¶
type PlatformRequirements map[string]PlatformVersionDefinition
type PlatformVersionDefinition ¶
type PlatformVersionDefinition string
type Release ¶
type Release struct {
Name string `json:"name,omitempty"`
Info ReleaseInfo `json:"info"`
Chart *ReleaseChart `json:"chart,omitempty"`
Values Values `json:"values,omitempty"`
Version int `json:"version,omitempty"`
Namespace string `json:"namespace,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
func (*Release) GetChart ¶
func (r *Release) GetChart() *ReleaseChart
type ReleaseChart ¶
type ReleaseChart struct {
Metadata *ReleaseChartMetadata `json:"metadata,omitempty"`
}
func (*ReleaseChart) GetMetadata ¶
func (r *ReleaseChart) GetMetadata() *ReleaseChartMetadata
type ReleaseChartMetadata ¶
type ReleaseChartMetadata struct {
Version string `json:"version,omitempty"`
Name string `json:"name,omitempty"`
}
func (*ReleaseChartMetadata) GetName ¶
func (r *ReleaseChartMetadata) GetName() string
func (*ReleaseChartMetadata) GetVersion ¶
func (r *ReleaseChartMetadata) GetVersion() string
type ReleaseInfo ¶
type ReleaseInfo struct {
FirstDeployed time.Time `json:"first_deployed,omitempty"`
LastDeployed time.Time `json:"last_deployed,omitempty"`
Deleted time.Time `json:"deleted,omitempty"`
Description string `json:"description,omitempty"`
Status release.Status `json:"status,omitempty"`
Notes string `json:"notes,omitempty"`
Resources Resources `json:"resources,omitempty"`
}
type Resource ¶
type Resource struct {
schema.GroupVersionKind
Name, Namespace string
}
type ResourceObject ¶
type ResourceObject struct {
Resource
Object *ResourceObjectData
}
type ResourceObjectData ¶
type ResourceObjectData struct {
Data []byte
}
func (*ResourceObjectData) Unmarshal ¶
func (r *ResourceObjectData) Unmarshal(obj any) error
type UninstallRelease ¶
type UpgradeResponse ¶
type UpgradeResponse struct {
Before, After *Release
}
type Values ¶
type Values []byte
func NewMergeRawValues ¶
func NewMergeRawValues(opts ValuesMergeMethod, vs ...Values) (Values, error)
func NewMergeValues ¶
func NewMergeValues[T any](opts ValuesMergeMethod, vs ...T) (Values, error)
func (Values) MarshalJSON ¶
func (*Values) UnmarshalJSON ¶
type ValuesMergeMethod ¶
type ValuesMergeMethod int
const (
MergeMaps ValuesMergeMethod = 1 << iota
)
func (ValuesMergeMethod) Has ¶
func (v ValuesMergeMethod) Has(o ValuesMergeMethod) bool
Click to show internal directories.
Click to hide internal directories.