Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CAT-2193): Fixed kubernetes environment setup for Debian. #694

Conversation

span786
Copy link
Contributor

@span786 span786 commented Jan 8, 2025

Summary

Fixed kubernetes environment setup for Debian. This allows spec tests to run successfully for debian platform

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@span786 span786 requested review from bastelfreak, deric and a team as code owners January 8, 2025 11:55
@span786 span786 force-pushed the CAT-2193-fix-puppetlabs-kubernetes-nightly-for-debian branch 3 times, most recently from 77b9182 to f2d1480 Compare January 8, 2025 12:22
@span786 span786 marked this pull request as draft January 8, 2025 12:23
@span786 span786 force-pushed the CAT-2193-fix-puppetlabs-kubernetes-nightly-for-debian branch from f2d1480 to cc118b7 Compare January 8, 2025 12:32
@span786 span786 marked this pull request as ready for review January 8, 2025 14:30
@span786
Copy link
Contributor Author

span786 commented Jan 8, 2025

puppetlabs/provision#281 required to be merged before merging this.

@TheMeier
Copy link

TheMeier commented Jan 8, 2025

Can you extract the version to a parameter. Also why set the default to v1.28 latests is v1.32

@span786 span786 marked this pull request as draft January 9, 2025 13:21
@span786 span786 force-pushed the CAT-2193-fix-puppetlabs-kubernetes-nightly-for-debian branch 2 times, most recently from f2a4a65 to b05b1f2 Compare January 9, 2025 16:28
@span786 span786 marked this pull request as ready for review January 9, 2025 16:29
@span786
Copy link
Contributor Author

span786 commented Jan 9, 2025

Updated the default values to use latest v1.32 for kubernetes, also version is now extracted to $kubernetes_core_version.

@@ -60,16 +60,18 @@

) {
if $create_repos {
$kubernetes_core_version = 'v1.32'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we move this to params instead of hardcoded string? Maybe call it minor_version (according to semantic versioning)?
It might be derived from kubernetes::version

$minor_version = $kubernetes::version.split('\.')[0, 2].join('.')

Copy link
Contributor Author

@span786 span786 Jan 10, 2025

Choose a reason for hiding this comment

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

This Kubernetes version is intended for core packages, which is why I've named it accordingly. Additionally, I've created a new params.pp file to consolidate all the default values.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It doesn't make sense to use kubernetes::version = 1.28.10 and k8s_core_package_version = 1.32, right?. It doesn't make sense to me to define the same information on two places.

params.pp are considered anti-pattern, could you please move it to data/common.yaml resp. data/os/RedHat.yaml etc.?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@deric

I was confused between kubernetes::version and k8s_core_package_version. Thank you for clarifying and helping me make sense of it. I've updated the code accordingly.

@span786 span786 force-pushed the CAT-2193-fix-puppetlabs-kubernetes-nightly-for-debian branch from b05b1f2 to 8279434 Compare January 10, 2025 12:41
@span786 span786 requested a review from deric January 10, 2025 13:35
@span786 span786 force-pushed the CAT-2193-fix-puppetlabs-kubernetes-nightly-for-debian branch from 8279434 to d140975 Compare January 13, 2025 16:43
…s spec tests to run successfully for debian platform
@span786 span786 force-pushed the CAT-2193-fix-puppetlabs-kubernetes-nightly-for-debian branch from d140975 to 0cc4f36 Compare January 13, 2025 16:48
@span786 span786 merged commit 19bfbd8 into puppetlabs:main Jan 15, 2025
9 checks passed
@span786 span786 deleted the CAT-2193-fix-puppetlabs-kubernetes-nightly-for-debian branch January 15, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants