mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-08 17:25:14 -04:00
versions: designate components for upgrades
This commit is contained in:
parent
7c5b95bbcc
commit
b740a1a75b
2 changed files with 51 additions and 0 deletions
|
@ -83,3 +83,14 @@ func (c Components) GetKubeadmComponent() (*Component, error) {
|
|||
}
|
||||
return nil, errors.New("kubeadm component not found")
|
||||
}
|
||||
|
||||
// GetUpgradableComponents returns only those Components that should be passed to the upgrade-agent.
|
||||
func (c Components) GetUpgradableComponents() Components {
|
||||
var cs Components
|
||||
for _, c := range c {
|
||||
if strings.HasPrefix(c.Url, "data:") || strings.HasSuffix(c.InstallPath, "kubeadm") {
|
||||
cs = append(cs, c)
|
||||
}
|
||||
}
|
||||
return cs
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue