Documentation
¶
Index ¶
- func FilterAnnotatedJobs(resources []*unstructured.Unstructured, annotationValue string) ([]*unstructured.Unstructured, []*unstructured.Unstructured)
- func NewCommand(configFlags *genericclioptions.ConfigFlags) *cobra.Command
- func NewInventory(factory util.ClientFactory, name, namespace, filedManager string) (inventory.Store, error)
- func StripAnnotatedJobs(resources []*unstructured.Unstructured) []*unstructured.Unstructured
- type FilteredJobRunner
- type Flags
- type Inventory
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterAnnotatedJobs ¶ added in v2.7.0
func FilterAnnotatedJobs(resources []*unstructured.Unstructured, annotationValue string) ([]*unstructured.Unstructured, []*unstructured.Unstructured)
FilterAnnotatedJobs separates filtered jobs from the remaining resources based on the mia-platform.eu/deploy annotation matching the provided annotation value. It returns two slices: the matching filtered jobs and the remaining resources.
func NewCommand ¶
func NewCommand(configFlags *genericclioptions.ConfigFlags) *cobra.Command
NewCommand return the command for deploying kubernetes resources against the target cluster
func NewInventory ¶
func StripAnnotatedJobs ¶ added in v2.7.0
func StripAnnotatedJobs(resources []*unstructured.Unstructured) []*unstructured.Unstructured
StripAnnotatedJobs removes all Job resources that carry the mia-platform.eu/deploy annotation, regardless of its value. This is used to exclude filtered jobs from the normal apply flow when the --filtered-job-annotation flag is not provided.
Types ¶
type FilteredJobRunner ¶ added in v2.7.0
type FilteredJobRunner struct {
// contains filtered or unexported fields
}
FilteredJobRunner handles the creation, execution and monitoring of filtered jobs with configurable retry and timeout support.
func NewFilteredJobRunner ¶ added in v2.7.0
func NewFilteredJobRunner(clientSet kubernetes.Interface, namespace string, maxRetries int, timeout time.Duration, writer io.Writer, dryRun bool) *FilteredJobRunner
NewFilteredJobRunner creates a new FilteredJobRunner configured with the specified parameters for running filtered jobs against the target cluster.
func (*FilteredJobRunner) Run ¶ added in v2.7.0
func (r *FilteredJobRunner) Run(ctx context.Context, jobs []*unstructured.Unstructured) error
Run executes all filtered jobs with retry and timeout support. Each job is retried up to maxRetries times upon failure. Jobs annotated with mia-platform.eu/deploy-optional=true are treated as non-blocking: their failure is logged as a warning but never counted as an error. For mandatory jobs an error is returned only if ALL of them fail; if at least one mandatory job succeeds, the deploy process can continue.
type Flags ¶
type Flags struct {
ConfigFlags *genericclioptions.ConfigFlags
// contains filtered or unexported fields
}
Flags contains all the flags for the `deploy` command. They will be converted to Options that contains all runtime options for the command.
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
Inventory wrap
func (*Inventory) SetObjects ¶
func (s *Inventory) SetObjects(objects sets.Set[*unstructured.Unstructured])