Documentation ¶
Index ¶
- Constants
- func AddClusterIDLabel(data map[string][]Application, appName, clusterID string, ...)
- func DeleteK8sClusterFromRegistrationFile(cluster *Argock8sRegister, clusterName string, filePath string) error
- func ReadArgoApplicationFile(appsFile []byte) (map[string][]Application, error)
- func RemoveClusterIDLabel(data map[string][]Application, appName, clusterID string, ...)
- func UpdateK8sClusterRegistrationFile(cluster *Argock8sRegister, newCluster ArgocdClusterRegisterParameters, ...) error
- type ApiClient
- type Application
- type ArgocdClusterLabels
- type ArgocdClusterRegisterParameters
- type Argock8sRegister
- type Client
- type Connection
- type Helm
- type IgnoreDifference
- type Labels
- type NoOpClient
Constants ¶
View Source
const ( // DefaultTimeout is the default timeout for waiting for an application to be healthy. DefaultTimeout = 420 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func AddClusterIDLabel ¶ added in v0.84.0
func AddClusterIDLabel(data map[string][]Application, appName, clusterID string, logger log.FieldLogger)
func DeleteK8sClusterFromRegistrationFile ¶
func DeleteK8sClusterFromRegistrationFile(cluster *Argock8sRegister, clusterName string, filePath string) error
DeleteK8sClusterFromRegistrationFile take a argocd cluster file and delete Cluster from spec
func ReadArgoApplicationFile ¶ added in v0.84.0
func ReadArgoApplicationFile(appsFile []byte) (map[string][]Application, error)
ReadArgoApplicationFile take a argocd application file and load it into Application struct
func RemoveClusterIDLabel ¶ added in v0.84.0
func RemoveClusterIDLabel(data map[string][]Application, appName, clusterID string, logger log.FieldLogger)
func UpdateK8sClusterRegistrationFile ¶
func UpdateK8sClusterRegistrationFile(cluster *Argock8sRegister, newCluster ArgocdClusterRegisterParameters, filePath string) error
UpdateK8sClusterRegistrationFile take a argocd cluster file and Add new Cluster spec
Types ¶
type ApiClient ¶ added in v0.84.0
type ApiClient struct {
// contains filtered or unexported fields
}
func NewClient ¶ added in v0.84.0
func NewClient(c *Connection, logger log.FieldLogger) (*ApiClient, error)
func (*ApiClient) SyncApplication ¶ added in v0.84.0
func (c *ApiClient) SyncApplication(gitopsAppName string) (*argoappv1.Application, error)
func (*ApiClient) WaitForAppHealthy ¶ added in v0.84.0
type Application ¶ added in v0.84.0
type Application struct { Name string `yaml:"name"` Namespace string `yaml:"namespace"` Repo string `yaml:"repo"` Path string `yaml:"path"` Revision string `yaml:"revision"` Helm Helm `yaml:"helm"` ServerSideApply bool `yaml:"serverSideApply,omitempty"` Replace bool `yaml:"replace,omitempty"` IgnoreDifferences []IgnoreDifference `yaml:"ignoreDifferences,omitempty"` ClusterLabels []Labels `yaml:"cluster_labels"` }
type ArgocdClusterLabels ¶
type ArgocdClusterRegisterParameters ¶
type ArgocdClusterRegisterParameters struct { Name string `yaml:"name"` Type string `yaml:"type"` Labels ArgocdClusterLabels `yaml:"labels"` APIServer string `yaml:"api_server"` ArgoCDRoleARN string `yaml:"argoCDRoleARN,omitempty"` ClusterName string `yaml:"clusterName,omitempty"` CertData string `yaml:"certData,omitempty"` CaData string `yaml:"caData,omitempty"` KeyData string `yaml:"keyData,omitempty"` }
type Argock8sRegister ¶
type Argock8sRegister struct {
Clusters []ArgocdClusterRegisterParameters `yaml:"clusters"`
}
func ReadArgoK8sRegistrationFile ¶
func ReadArgoK8sRegistrationFile(clusterFile []byte) (*Argock8sRegister, error)
ReadArgoK8sRegistrationFile take a argocd cluster file and load it into Argock8sRegister struct
type Connection ¶ added in v0.84.0
type IgnoreDifference ¶ added in v0.88.0
type NoOpClient ¶ added in v0.84.0
type NoOpClient struct{}
func (*NoOpClient) SyncApplication ¶ added in v0.84.0
func (n *NoOpClient) SyncApplication(gitopsAppName string) (*argoappv1.Application, error)
func (*NoOpClient) WaitForAppHealthy ¶ added in v0.84.0
func (n *NoOpClient) WaitForAppHealthy(appName string) error
Click to show internal directories.
Click to hide internal directories.