kontena / pharos-cluster

Pharos - The Kubernetes Distribution
https://k8spharos.dev/
Apache License 2.0
311 stars 43 forks source link

Configurer improved version matching (allow RHEL >= 7.4, < 8.0) #1489

Open kke opened 4 years ago

kke commented 4 years ago

Makes it possible to define more advanced host configurer version matchers. Currently it's only possible to list each version separately:

Before:

class Rhel7 < Configurer
  register_config 'rhel', '7.4'
  register_config 'rhel', '7.5'
  register_config 'rhel', '7.6'
  register_config 'rhel', '7.7'
end

After:

class Rhel7 < Configurer
  register_config 'rhel', /^7\.[4-9]|\d{2,}/
end

This has been used in this PR to make the rhel7 configurer match RHEL >= 7.4 && < 8.0. (Including something like 7.19-beta2.rc4)

The matcher can be anything that handles triple equals.

peterwvj commented 3 years ago

Any progress on this? Is it possible that we could merge this any time soon? @kke @jakolehm Thanks in advance.