Documentation ¶
Index ¶
- Constants
- type AppProjectManager
- func (m *AppProjectManager) ClearIgnored()
- func (m *AppProjectManager) ClearManaged()
- func (m *AppProjectManager) Create(ctx context.Context, project *v1alpha1.AppProject) (*v1alpha1.AppProject, error)
- func (m *AppProjectManager) Delete(ctx context.Context, namespace string, incoming *v1alpha1.AppProject, ...) error
- func (m *AppProjectManager) IgnoreChange(projectName string, version string) error
- func (m *AppProjectManager) IsChangeIgnored(projectName string, version string) bool
- func (m *AppProjectManager) IsManaged(projectName string) bool
- func (m *AppProjectManager) Manage(projectName string) error
- func (m *AppProjectManager) RemoveFinalizers(ctx context.Context, incoming *v1alpha1.AppProject) (*v1alpha1.AppProject, error)
- func (m *AppProjectManager) StartBackend(ctx context.Context)
- func (m *AppProjectManager) UnignoreChange(projectName string) error
- func (m *AppProjectManager) Unmanage(projectName string) error
- func (m *AppProjectManager) UpdateAppProject(ctx context.Context, incoming *v1alpha1.AppProject) (*v1alpha1.AppProject, error)
- type AppProjectManagerOption
Constants ¶
const LastUpdatedAnnotation = "argocd-agent.argoproj.io/last-updated"
LastUpdatedAnnotation is a label put on AppProject which contains the time when an update was last received for this AppProject
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppProjectManager ¶
type AppProjectManager struct {
// contains filtered or unexported fields
}
AppProjectManager manages Argo CD AppProject resources on a given backend.
It provides primitives to create, update, upsert and delete AppProjects.
func NewAppProjectManager ¶
func NewAppProjectManager(be backend.AppProject, namespace string, opts ...AppProjectManagerOption) (*AppProjectManager, error)
NewAppProjectManager initializes and returns a new Manager with the given backend and options.
func (*AppProjectManager) ClearIgnored ¶
func (m *AppProjectManager) ClearIgnored()
func (*AppProjectManager) ClearManaged ¶
func (m *AppProjectManager) ClearManaged()
ClearManaged clears the managed apps
func (*AppProjectManager) Create ¶
func (m *AppProjectManager) Create(ctx context.Context, project *v1alpha1.AppProject) (*v1alpha1.AppProject, error)
Create creates the AppProject using the Manager's AppProject backend.
func (*AppProjectManager) Delete ¶
func (m *AppProjectManager) Delete(ctx context.Context, namespace string, incoming *v1alpha1.AppProject, deletionPropagation *backend.DeletionPropagation) error
Delete will delete an AppProject resource. If Delete is called by the principal, any existing finalizers will be removed before deletion is attempted. 'deletionPropagation' follows the corresponding K8s behaviour, defaulting to Foreground if nil.
func (*AppProjectManager) IgnoreChange ¶
func (m *AppProjectManager) IgnoreChange(projectName string, version string) error
IgnoreChange adds a particular version for the app-project named projectName to list of changes to ignore.
func (*AppProjectManager) IsChangeIgnored ¶
func (m *AppProjectManager) IsChangeIgnored(projectName string, version string) bool
IsChangeIgnored returns true if the version for projectName is already being ignored.
func (*AppProjectManager) IsManaged ¶
func (m *AppProjectManager) IsManaged(projectName string) bool
IsManaged returns whether the app projectName is currently managed by this agent
func (*AppProjectManager) Manage ¶
func (m *AppProjectManager) Manage(projectName string) error
Manage marks the app projectName as being managed by this agent
func (*AppProjectManager) RemoveFinalizers ¶
func (m *AppProjectManager) RemoveFinalizers(ctx context.Context, incoming *v1alpha1.AppProject) (*v1alpha1.AppProject, error)
RemoveFinalizers will remove finalizers on an existing app project.
func (*AppProjectManager) StartBackend ¶
func (m *AppProjectManager) StartBackend(ctx context.Context)
StartBackend informs the backend to run startup logic, which usually means beginning to listen for events. For example, in the case of the Kubernetes backend, the shared informer is started, which will listen for AppProject events from the watch api of the K8s cluster.
func (*AppProjectManager) UnignoreChange ¶
func (m *AppProjectManager) UnignoreChange(projectName string) error
func (*AppProjectManager) Unmanage ¶
func (m *AppProjectManager) Unmanage(projectName string) error
Unmanage marks the app projectName as not being managed by this agent
func (*AppProjectManager) UpdateAppProject ¶
func (m *AppProjectManager) UpdateAppProject(ctx context.Context, incoming *v1alpha1.AppProject) (*v1alpha1.AppProject, error)
UpdateAppProject updates the AppProject resource on the agent's backend.
The AppProject on the agent will inherit labels and annotations as well as the spec of the incoming AppProject.
type AppProjectManagerOption ¶
type AppProjectManagerOption func(*AppProjectManager)
AppProjectManagerOption is a callback function to set an option to the AppProject manager
func WithAllowUpsert ¶
func WithAllowUpsert(upsert bool) AppProjectManagerOption
WithAllowUpsert sets the upsert operations allowed flag
func WithMetrics ¶
func WithMetrics(m *metrics.AppProjectClientMetrics) AppProjectManagerOption
WithMetrics sets the metrics provider for the Manager
func WithMode ¶
func WithMode(mode manager.ManagerMode) AppProjectManagerOption
WithMode sets the mode of the AppProject manager
func WithRole ¶
func WithRole(role manager.ManagerRole) AppProjectManagerOption
WithRole sets the role of the AppProject manager