Skip to content

Conversation

@recid
Copy link

@recid recid commented Jul 2, 2025

  • Add a default value for Grafana Alloy APT key Id
  • Adapt the repo class to use it

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@recid recid force-pushed the fix_debian_installation branch 2 times, most recently from f067719 to 5558686 Compare July 2, 2025 11:59
* Add hiera structure (datadir and yaml file) to improve the module
* Add a default value for Grafana Alloy APT key Id (data/os/Debian.yaml)
* Adapt the repo class to use it
  * Add a default value for apt_key_id ({ default_value => '' })
@recid recid force-pushed the fix_debian_installation branch from 5558686 to 7ac5e8e Compare July 2, 2025 12:45
@recid
Copy link
Author

recid commented Jul 2, 2025

Hi,
Even if some checks failed (timeout, docker image seems not available (Ubuntu 24:04)), do you validate my PR ?

If yes could you tell me when the new release will be available on the puppet forge please ?

Thanks in advance

recid added 2 commits July 2, 2025 19:02
* Update the repo class to make $apt_key_id variable optional
* Change the apt_key_id scope
  * grafana_alloy::repo::apt_key_id instead of grafana_alloy::apt_key_id
@recid
Copy link
Author

recid commented Jul 3, 2025

Finally, the more I use the module, the more I add some features that were necessary for me to configure Grafana Alloy.
I think it was my last updates :-)

If the PR was ok for you @ekohl , could you validate it and tell me when my modifications will be available on puppet forge ?

Thanks in advance

* Update the README.md in accordance with the feature
@recid recid force-pushed the fix_debian_installation branch from b6f4c75 to c101abd Compare July 3, 2025 10:07
@ekohl
Copy link
Member

ekohl commented Jul 3, 2025

If the PR was ok for you @ekohl , could you validate it

I don't even know what the original issue is. You only described what you did, not why. This means I can't validate it.

tell me when my modifications will be available on puppet forge

When it is merged a release needs to be made. That is documented in https://voxpupuli.org/docs/releasing_version/.

@recid
Copy link
Author

recid commented Jul 10, 2025

Hello @ekohl , in fact I did this PR because I use puppet 5 (v5.5.22) with some old version of grafana_alloy dependencies such as apt (v7.0.0) and I can't upgrade the puppet version.

@ekohl
Copy link
Member

ekohl commented Jul 10, 2025

I'm not opposed to introducing the class parameter without a default so you can work around it in your own infrastructure, but would like to avoid us having to maintain the GPG key ID unless there's a good reason, but Puppet 5 isn't a good reason. We don't support Puppet 5 anymore, nor apt 7.0. Our metadata states we only support Puppet 7+ and puppetlabs/apt 9.2+.

@recid recid closed this Jul 11, 2025
@recid recid deleted the fix_debian_installation branch July 11, 2025 13:46
* Remove unnecessary apt_key_id variable (grafana_alloy::repo)
@recid recid restored the fix_debian_installation branch July 11, 2025 13:49
@recid
Copy link
Author

recid commented Jul 11, 2025

I understand what you said.
So I updated the PR keeping only the changes concerning the Readme, the fact of overloading the custom-args option.

puppetlabs/apt 9.2+. brings new feature especially the apt gpg keyring management by name instead of by id.
I think this is that new feature that makes it no longer necessary to specify the gpg-key id into apt::key declaration

So I remove the hiera.yaml file and the data directory too.

@recid recid reopened this Jul 11, 2025
@ekohl ekohl changed the title fix: Fix the Debian Installation Support custom arguments Jul 11, 2025
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Thanks. I've updated the PR title to reflect the change.

README.md Outdated
If you want to adapt the Alloy configuration you can use the `config` variable like this (into hiera declaration file):

```puppet
grafana_alloy::config:
Copy link
Member

Choose a reason for hiding this comment

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

grafana_alloy::config is a private API so documenting it as the primary usage doesn't look like the best idea. Perhaps better to expose it in init.pp as a real parameter?

@ekohl ekohl added the enhancement New feature or request label Jul 11, 2025
recid added 3 commits July 31, 2025 13:19
* Support RedHat customization (to specify CUSTOM_ARGS)
* Add @example sections to describe how you can use grafana_alloy and its
  sub-classes
* Add REFERENCE.md file
* Update the README.md to refer REFERENCE.md file and remove obsolete
  comments
@recid
Copy link
Author

recid commented Jul 31, 2025

Hello @ekohl , thx again and a lot for your feedback.
I fix all your comments. So I thinks the PR will be ok to merge :)

* bundle exec rake strings:generate:reference
@recid recid force-pushed the fix_debian_installation branch from e0f7989 to 21d1d07 Compare July 31, 2025 12:08
@recid recid force-pushed the fix_debian_installation branch 2 times, most recently from 4704dbd to 2d4c49a Compare July 31, 2025 12:23
* Change the way to support Multiple OS when specify CUSTOM_ARGS env
  variable
@recid recid force-pushed the fix_debian_installation branch from 2d4c49a to 612d85e Compare July 31, 2025 12:24
@salomon94
Copy link

Hello @ekohl , thx again and a lot for your feedback. I fix all your comments. So I thinks the PR will be ok to merge :)

Hello @recid do you have any news about it?

@salomon94
Copy link

Hello @ekohl , thx again and a lot for your feedback. I fix all your comments. So I thinks the PR will be ok to merge :)

Hello @recid do you have any news about it?

Hello @ekohl the PR from @recid is ok?

@n1nj444
Copy link

n1nj444 commented Sep 3, 2025

Hi, I have the same issue, can it be merged please ? cc @ekohl

Comment on lines +17 to +18
# @example If you want to pass arguments to the run commands, you can add the following content into your hieradata file:
# class { 'grafana_alloy::config':
Copy link
Member

Choose a reason for hiding this comment

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

This is a private class, so either you make a full hiera example here, or make the class non-private, or expose custom_args from init.pp.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants