Documentation
¶
Index ¶
- func GetObjectFromYaml(yamlText string) (obj *unstructured.Unstructured, err error)
- func InterfaceToMap(value interface{}) (map[string]interface{}, error)
- func SetNestedField(obj map[string]interface{}, value interface{}, fields ...string) error
- type ApplicationReconciler
- func (r *ApplicationReconciler) DeleteArgoApp(app *v1alpha1.Application, argoApp *unstructured.Unstructured) (err error)
- func (r *ApplicationReconciler) GetGroupName() string
- func (r *ApplicationReconciler) GetName() string
- func (r *ApplicationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
- func (r *ApplicationReconciler) RemoveAppFinalizer(app *v1alpha1.Application) (err error)
- func (r *ApplicationReconciler) SetupWithManager(mgr ctrl.Manager) error
- type ApplicationStatusReconciler
- func (r *ApplicationStatusReconciler) GetGroupName() string
- func (r *ApplicationStatusReconciler) GetName() string
- func (r *ApplicationStatusReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
- func (r *ApplicationStatusReconciler) SetupWithManager(mgr ctrl.Manager) error
- type ClusterConfig
- type GitRepositoryController
- type ImageUpdaterReconciler
- type MultiClusterReconciler
- type Reconciler
- type TLSClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetObjectFromYaml ¶
func GetObjectFromYaml(yamlText string) (obj *unstructured.Unstructured, err error)
GetObjectFromYaml returns the Unstructured object from a YAML
func InterfaceToMap ¶
InterfaceToMap converts value to map, which type of key is string and type of value is interface{} (Actually it is map[string]interface{}). The type of value must be struct. Any other types will lead an error.
func SetNestedField ¶
SetNestedField sets nested field into the object with map type. The type of field value must be struct. Any other types will lead to an error.
Types ¶
type ApplicationReconciler ¶
ApplicationReconciler is the reconciler of the Application
func (*ApplicationReconciler) DeleteArgoApp ¶
func (r *ApplicationReconciler) DeleteArgoApp(app *v1alpha1.Application, argoApp *unstructured.Unstructured) (err error)
DeleteArgoApp will delete argo app, support cascade delete
func (*ApplicationReconciler) GetGroupName ¶
func (r *ApplicationReconciler) GetGroupName() string
GetGroupName returns the group name of this reconciler
func (*ApplicationReconciler) GetName ¶
func (r *ApplicationReconciler) GetName() string
GetName returns the name of this reconciler
func (*ApplicationReconciler) Reconcile ¶
func (r *ApplicationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile makes sure the Application and ArgoCD application works well Consider all the ArgoCD application need to be in one particular namespace. But the Application from this project can be in different namespaces. In order to avoid the naming conflict, we will check if the name existing the target namespace. Take the original name as the generatedName of the ArgoCD application if there is a potential conflict. In the most cases, we can keep the original name same to the ArgoCD Application name.
func (*ApplicationReconciler) RemoveAppFinalizer ¶
func (r *ApplicationReconciler) RemoveAppFinalizer(app *v1alpha1.Application) (err error)
RemoveAppFinalizer the app will be deleted after remove finalizer
func (*ApplicationReconciler) SetupWithManager ¶
func (r *ApplicationReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setups the reconciler with a manager setup the logger, recorder
type ApplicationStatusReconciler ¶
ApplicationStatusReconciler represents a controller to sync cluster to ArgoCD cluster
func (*ApplicationStatusReconciler) GetGroupName ¶
func (r *ApplicationStatusReconciler) GetGroupName() string
GetGroupName returns the group name of this controller
func (*ApplicationStatusReconciler) GetName ¶
func (r *ApplicationStatusReconciler) GetName() string
GetName returns the name of this controller
func (*ApplicationStatusReconciler) Reconcile ¶
func (r *ApplicationStatusReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile is the entrypoint of the controller
func (*ApplicationStatusReconciler) SetupWithManager ¶
func (r *ApplicationStatusReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager init the logger, recorder and filters
type ClusterConfig ¶
type ClusterConfig struct { // Server requires Basic authentication Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` // Server requires Bearer authentication. This client will not attempt to use // refresh tokens for an OAuth2 flow. // TODO: demonstrate an OAuth2 compatible client. BearerToken string `json:"bearerToken,omitempty"` // TLSClientConfig contains settings to enable transport layer security TLSClientConfig `json:"tlsClientConfig"` }
ClusterConfig is the configuration attributes. This structure is subset of the go-client rest.Config with annotations added for marshalling.
type GitRepositoryController ¶
type GitRepositoryController struct { client.Client // ArgoNamespace is the namespace of the ArgoCD instance ArgoNamespace string // contains filtered or unexported fields }
GitRepositoryController is the reconciler of the GitRepository
func (*GitRepositoryController) GetGroupName ¶
func (c *GitRepositoryController) GetGroupName() string
GetGroupName returns the group name of this reconciler
func (*GitRepositoryController) GetName ¶
func (c *GitRepositoryController) GetName() string
GetName returns the name of this reconciler
func (*GitRepositoryController) Reconcile ¶
func (c *GitRepositoryController) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile maintains the Argo CD git repository secrets against to the GitRepository
func (*GitRepositoryController) SetupWithManager ¶
func (c *GitRepositoryController) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setups the reconciler with a manager setup the logger, recorder
type ImageUpdaterReconciler ¶
ImageUpdaterReconciler is the reconciler of the ImageUpdater
func (*ImageUpdaterReconciler) GetGroupName ¶
func (r *ImageUpdaterReconciler) GetGroupName() string
GetGroupName returns the group name of this controller
func (*ImageUpdaterReconciler) GetName ¶
func (r *ImageUpdaterReconciler) GetName() string
GetName returns the name of this controller
func (*ImageUpdaterReconciler) Reconcile ¶
func (r *ImageUpdaterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile makes sure the Application has the expected annotations
func (*ImageUpdaterReconciler) SetupWithManager ¶
func (r *ImageUpdaterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setups the log and recorder
type MultiClusterReconciler ¶
MultiClusterReconciler represents a controller to sync cluster to ArgoCD cluster
func (*MultiClusterReconciler) GetGroupName ¶
func (r *MultiClusterReconciler) GetGroupName() string
GetGroupName returns the group name of this controller
func (*MultiClusterReconciler) GetName ¶
func (r *MultiClusterReconciler) GetName() string
GetName returns the name of this controller
func (*MultiClusterReconciler) Reconcile ¶
func (r *MultiClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile is the entrypoint of the controller
func (*MultiClusterReconciler) SetupWithManager ¶
func (r *MultiClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager init the logger, recorder and filters
type Reconciler ¶
type Reconciler struct { client.Client ArgoNamespace string // contains filtered or unexported fields }
Reconciler is the reconciler of the DevOpsProject with Argo AppProject
func (*Reconciler) GetGroupName ¶
func (r *Reconciler) GetGroupName() string
GetGroupName returns the group name
func (*Reconciler) GetName ¶
func (r *Reconciler) GetName() string
GetName returns the name of this reconciler
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile makes sure the ArgoAppProject can be maintained which comes from the DevOpsProject
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setups the reconciler with a manager
type TLSClientConfig ¶
type TLSClientConfig struct { // Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only. Insecure bool `json:"insecure"` // ServerName is passed to the server for SNI and is used in the client to check server // certificates against. If ServerName is empty, the hostname used to contact the // server is used. ServerName string `json:"serverName,omitempty"` // CertData holds PEM-encoded bytes (typically read from a client certificate file). // CertData takes precedence over CertFile CertData []byte `json:"certData,omitempty"` // KeyData holds PEM-encoded bytes (typically read from a client certificate key file). // KeyData takes precedence over KeyFile KeyData []byte `json:"keyData,omitempty"` // CAData holds PEM-encoded bytes (typically read from a root certificates bundle). // CAData takes precedence over CAFile CAData []byte `json:"caData,omitempty"` }
TLSClientConfig contains settings to enable transport layer security