Skip to content

Conversation

@Alex619829
Copy link
Contributor

@Alex619829 Alex619829 commented Oct 9, 2025

This pull request adds new flags that replace hardcoded image constants. These are needed to ensure flexibility and reusability of image-factory across different environments and organizations.

@talos-bot talos-bot moved this to In Review in Planning Oct 9, 2025
@Alex619829 Alex619829 changed the title Replace hardcoded image names and aliases with dynamic ones. feat: replace hardcoded image names and aliases with dynamic ones. Oct 9, 2025
@Alex619829 Alex619829 force-pushed the main branch 4 times, most recently from 03265ce to 2aecfd0 Compare October 10, 2025 08:48
@Alex619829
Copy link
Contributor Author

Hello! Is this PR ready for review? There's some kind of error in the workflow, I don't know what to do with it.

@frezbo
Copy link
Member

frezbo commented Oct 10, 2025

the workflow won't run unless one of the maintainers reviews and approves the workflow, this will be looked at probably next week

@Alex619829
Copy link
Contributor Author

the workflow won't run unless one of the maintainers reviews and approves the workflow, this will be looked at probably next week

Okay, thank you!

SecureBoot SecureBootOptions

// Organization or platform within an organization.
Organization string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this please, it makes things too complicated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed it at the last commit

TalosctlImage string

// Path to YAML file with extension name aliases.
ExtensionNameAlias string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please split this into separate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! PR #323


// Various images.
const (
var (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should stay as constants/default values, or be removed completely. setting variables via config is a bad idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I won't touch it for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarifying myself: patching variables in a module is a bad development practice.

We can keep those as constants and initialize config values from it (or skip it).

But we should use config values where we previously used these constants.

@Alex619829 Alex619829 changed the title feat: replace hardcoded image names and aliases with dynamic ones. feat: replace hardcoded artifact image constants with CLI-configurable values. Oct 15, 2025
@Alex619829 Alex619829 changed the title feat: replace hardcoded artifact image constants with CLI-configurable values. feat: replace hardcoded artifact image constants with CLI-configurable values Oct 16, 2025
Copy link
Member

@smira smira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems non-functional now? as these config values are not consumed anywhere?

@Alex619829
Copy link
Contributor Author

this seems non-functional now? as these config values are not consumed anywhere?

Aren't we passing parameters in this line to the main.go file:
return cmd.RunFactory(ctx, logger, opts)
?

@smira
Copy link
Member

smira commented Oct 16, 2025

this seems non-functional now? as these config values are not consumed anywhere?

Aren't we passing parameters in this line to the main.go file: return cmd.RunFactory(ctx, logger, opts) ?

we do, but nothing "reads" from these new variables/options unless I'm missing something

@Alex619829
Copy link
Contributor Author

this seems non-functional now? as these config values are not consumed anywhere?

Aren't we passing parameters in this line to the main.go file: return cmd.RunFactory(ctx, logger, opts) ?

we do, but nothing "reads" from these new variables/options unless I'm missing something

Ah, okay, I get it. This brings us back to the point that the most convenient way to use these values ​​in code is to replace constants with variables and change them using these parameters. That's exactly why I want to add flags.

@smira
Copy link
Member

smira commented Oct 16, 2025

No, please - we need to pass config options to the places where it's going to be consumed.

@Alex619829
Copy link
Contributor Author

Alex619829 commented Oct 16, 2025

No, please - we need to pass config options to the places where it's going to be consumed.

Okay, undestand you.
I have fixed it

…e values

Adds CLI flags that replace hardcoded image constants

Signed-off-by: Aleksandr Gamzin <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
Copy link
Member

@smira smira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, I did some changes to the PR

@github-project-automation github-project-automation bot moved this from In Review to Approved in Planning Oct 17, 2025
@smira
Copy link
Member

smira commented Oct 17, 2025

/m

@talos-bot talos-bot merged commit 1559666 into siderolabs:main Oct 17, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in Planning Oct 17, 2025
@Alex619829
Copy link
Contributor Author

thank you, I did some changes to the PR

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants