Documentation ¶
Index ¶
- func AuthorizeAndAssignDefaults(ctx context.Context, c client.Client, gitrepo *fleet.GitRepo) (*fleet.GitRepo, error)
- func NewRole(namespace string, name string) *rbacv1.Role
- func NewRoleBinding(namespace string, name string) *rbacv1.RoleBinding
- func NewServiceAccount(namespace string, name string) *corev1.ServiceAccount
- func NewTargetsConfigMap(repo *fleet.GitRepo) (*corev1.ConfigMap, error)
- func SetCondition(status *fleet.GitRepoStatus, err error)
- func SetStatusFromBundleDeployments(ctx context.Context, c client.Client, gitrepo *fleet.GitRepo) error
- func SetStatusFromBundles(ctx context.Context, c client.Client, gitrepo *fleet.GitRepo) error
- func SetStatusFromGitjob(ctx context.Context, c client.Client, gitRepo *fleet.GitRepo, job *batchv1.Job) error
- func SetStatusFromResourceKey(ctx context.Context, c client.Client, gitrepo *fleet.GitRepo)
- func UpdateDisplayState(gitrepo *fleet.GitRepo) error
- func UpdateErrorStatus(ctx context.Context, c client.Client, req types.NamespacedName, ...) error
- func UpdateStatus(ctx context.Context, c client.Client, req types.NamespacedName, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizeAndAssignDefaults ¶
func AuthorizeAndAssignDefaults(ctx context.Context, c client.Client, gitrepo *fleet.GitRepo) (*fleet.GitRepo, error)
AuthorizeAndAssignDefaults applies restrictions and returns a new GitRepo if it passes the restrictions
func NewRoleBinding ¶
func NewRoleBinding(namespace string, name string) *rbacv1.RoleBinding
func NewServiceAccount ¶
func NewServiceAccount(namespace string, name string) *corev1.ServiceAccount
func NewTargetsConfigMap ¶
NewTargetsConfigMap builds a config map, containing the GitTarget cluster matchers, converted to BundleTargets. The BundleTargets are duplicated into TargetRestrictions. TargetRestrictions is a whilelist. A BundleDeployment will be created for a Target just if it is inside a TargetRestrictions. If it is not inside TargetRestrictions a Target is a TargetCustomization.
func SetCondition ¶
func SetCondition(status *fleet.GitRepoStatus, err error)
SetCondition sets the condition and updates the timestamp, if the condition changed
func SetStatusFromBundles ¶
func SetStatusFromGitjob ¶
func SetStatusFromGitjob(ctx context.Context, c client.Client, gitRepo *fleet.GitRepo, job *batchv1.Job) error
SetStatusFromGitjob sets the status fields relative to the given job in the gitRepo
func UpdateDisplayState ¶
func UpdateErrorStatus ¶
func UpdateErrorStatus(ctx context.Context, c client.Client, req types.NamespacedName, status fleet.GitRepoStatus, orgErr error) error
UpdateErrorStatus sets the condition in the status and tries to update the resource
func UpdateStatus ¶
func UpdateStatus(ctx context.Context, c client.Client, req types.NamespacedName, status fleet.GitRepoStatus) error
UpdateStatus updates the status for the GitRepo resource. It retries on conflict. If the status was updated successfully, it also collects (as in updates) metrics for the resource GitRepo resource.
Types ¶
This section is empty.