Documentation
¶
Index ¶
- Variables
- func AddBasicAuthRepository(name, url, username, password string) error
- func AddConditionForHelmRequest(condition *appv1.HelmRequestCondition, hr *appv1.HelmRequest, ...) error
- func DeepHashObject(hasher hash.Hash, objectToWrite interface{})
- func GenHashStr(data interface{}) string
- func GenUniqueHash(hr *appv1.HelmRequest) string
- func GetChartsForRepo(name string) (*repo.IndexFile, error)
- func GetReleaseName(hr *appv1.HelmRequest) string
- func IsHelmRequestSynced(hr *appv1.HelmRequest) bool
- func PrintRelease(out io.Writer, rel *release.Release)
- func RemoveRepository(name string) error
- func SouceToChartRepo(name, dir, path string) error
- func UpdateHelmRequestStatus(client clientset.Interface, request *appv1.HelmRequest) error
- type ChartSourceType
- type Deploy
- type Downloader
- type IndexSyncer
- type RbacClient
- type Values
Constants ¶
This section is empty.
Variables ¶
var (
ChartsDir = "/tmp/helm-charts"
)
Functions ¶
func AddBasicAuthRepository ¶ added in v0.9.0
AddBasicAuthRepository add a repo with basic auth
func AddConditionForHelmRequest ¶ added in v1.4.0
func AddConditionForHelmRequest(condition *appv1.HelmRequestCondition, hr *appv1.HelmRequest, client clientset.Interface) error
AddConditionForHelmRequest ... Note: this function will modify the hr object, this is not a good solution
func DeepHashObject ¶ added in v1.4.0
DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.
func GenHashStr ¶ added in v1.4.0
func GenHashStr(data interface{}) string
GenHashStr ... This is a very stupid function, need to learn from kubernetes at how to generate pod name for deployment
func GenUniqueHash ¶ added in v0.9.8
func GenUniqueHash(hr *appv1.HelmRequest) string
GenUniqueHash generate a unique hash for a HelmRequest
func GetChartsForRepo ¶ added in v0.9.2
GetChartsForRepo retrieve charts info from a repo cache index Check: can we use the generated time to do compare?
func GetReleaseName ¶ added in v1.2.0
func GetReleaseName(hr *appv1.HelmRequest) string
GetReleaseName get release name
func IsHelmRequestSynced ¶
func IsHelmRequestSynced(hr *appv1.HelmRequest) bool
IsHelmRequestSynced check if a HelmRequest is synced only if hash is equal and not install to all clusters First version: only hash .spec Second version: hash .spec and .metadata.annotations
func PrintRelease ¶ added in v1.4.0
PrintRelease prints info about a release
func RemoveRepository ¶ added in v0.9.0
RemoveRepository remove a repo from helm
func SouceToChartRepo ¶ added in v1.0.0
SouceToChartRepo load vcs source to charts and upload them to chart repo
func UpdateHelmRequestStatus ¶ added in v1.4.0
func UpdateHelmRequestStatus(client clientset.Interface, request *appv1.HelmRequest) error
UpdateHelmRequestStatus update a helmrequest status This works simliar to the origin version in controller sync loop, the diff is: 1. no deletion helmrequest related resource when not found 2. more simple TODO: merge this two functions
Types ¶
type ChartSourceType ¶ added in v1.5.0
type ChartSourceType string
const ( ChartSourceHTTP ChartSourceType = "http" ChartSourceOCI ChartSourceType = "oci" ChartSourceChart ChartSourceType = "chart" )
type Deploy ¶ added in v0.9.5
type Deploy struct { // logger Log logr.Logger // is this chart has deployed release Deployed bool // the global cluster info InCluster *cluster.Info // target cluster info Cluster *cluster.Info // system namespace for chartrepo SystemNamespace string // all the charts info HelmRequest *appv1.HelmRequest // Client is the crd client for hr Client clientset.Interface // Releases stores records of releases. Releases *storage.Storage // contains filtered or unexported fields }
Deploy contains info about one chart deploy
func (*Deploy) GetCurrentReleases ¶ added in v1.4.0
type Downloader ¶ added in v0.9.5
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶ added in v0.9.5
type IndexSyncer ¶
type IndexSyncer struct {
// contains filtered or unexported fields
}
IndexSyncer sync helm repo index repeatedly
func NewDefaultIndexSyncer ¶
func NewDefaultIndexSyncer() *IndexSyncer
NewDefaultIndexSyncer create a new IndexSyncer
func (*IndexSyncer) Start ¶
func (i *IndexSyncer) Start(stop <-chan struct{}) error
Start will refresh the repo index periodically
type RbacClient ¶ added in v1.4.0
type RbacClient struct {
// contains filtered or unexported fields
}