-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update k8s/cri-o repositories #94
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,16 +8,13 @@ | |
Boolean $manage_container_manager = $k8s::manage_container_manager, | ||
K8s::Container_runtimes $container_manager = $k8s::container_manager, | ||
String[1] $crio_version = $k8s::version.split('\.')[0, 2].join('.'), | ||
Boolean $use_kubic_repos = false | ||
) { | ||
case fact('os.family') { | ||
'Debian': { | ||
case fact('os.name') { | ||
'Debian': { | ||
if versioncmp($crio_version, '1.19') >= 0 { | ||
$release_name = "Debian_${fact('os.release.major')}" | ||
} else { | ||
$release_name = 'Debian_Testing' | ||
} | ||
$release_name = "Debian_${fact('os.release.major')}" | ||
} | ||
'Ubuntu': { | ||
$release_name = "xUbuntu_${fact('os.release.full')}" | ||
|
@@ -28,26 +25,39 @@ | |
default: {} | ||
} | ||
|
||
$libcontainers_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/${release_name}" | ||
$crio_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${crio_version}/${release_name}" | ||
if $use_kubic_repos { | ||
$kubernames_name = 'libcontainers:stable' | ||
$kubernames_repo = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/${release_name}" | ||
$kubernetes_key = '2472D6D0D2F66AF87ABA8DA34D64390375060AA4', | ||
$crio_name = 'libcontainers:stable:cri-o' | ||
$crio_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${crio_version}/${release_name}" | ||
$crio_key = '2472D6D0D2F66AF87ABA8DA34D64390375060AA4', | ||
} else { | ||
$kubernetes_name = 'kubernetes' | ||
$kubernetes_repo = "https://pkgs.k8s.io/core:/stable:/v${crio_version}/deb" | ||
$kubernetes_key = 'kubernetes-apt-keyring.gpg' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be |
||
$crio_name = 'cri-o' | ||
$crio_url = "https://pkgs.k8s.io/addons:/cri-o:/stable:/v${crio_version}/deb" | ||
$crio_key = 'cri-o-apt-keyring.gpg' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be |
||
} | ||
|
||
apt::source { 'libcontainers:stable': | ||
location => $libcontainers_url, | ||
apt::source { $kubernames_name: | ||
location => $kubernetes_repo, | ||
repos => '/', | ||
release => '', | ||
key => { | ||
id => '2472D6D0D2F66AF87ABA8DA34D64390375060AA4', | ||
source => "${libcontainers_url}/Release.key", | ||
name => $kubernetes_key, | ||
source => "${kubernetes_repo}/Release.key", | ||
}, | ||
} | ||
|
||
if $manage_container_manager and $container_manager == 'crio' { | ||
apt::source { 'libcontainers:stable:cri-o': | ||
apt::source { $crio_name: | ||
location => $crio_url, | ||
repos => '/', | ||
release => '', | ||
key => { | ||
id => '2472D6D0D2F66AF87ABA8DA34D64390375060AA4', | ||
name => $crio_key, | ||
source => "${crio_url}/Release.key", | ||
}, | ||
} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please document the new parameter with puppet-strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to do all the tidy bits once I get consensus that this is an approach ya'all agree with. If I can get pre-approval that going this direction is agreeable (dropping all obsolete k8s version support, etc) I'm happy to invest a few hours making it perfect.
So this is only intended to hit the target of "should work for you if you want to test it" and "something for us to discuss"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally not against dropping kubic entirely, optionally even with a catalog fail condition on Kubernetes <1.24 versions, since those versions are long since deprecated.
Unfortunately the migration from kubic to the new isv:kubernetes repos can be difficult to automate, since some packages have migrated concerns between them.
On Debian, a complete uninstall of cri-o and conmon is necessary before the isv:kubernetes cri-o package can be installed - as one example.