-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2535 from martina-if/support-arm
Add support for ARM
- Loading branch information
Showing
29 changed files
with
451 additions
and
81 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package defaultaddons | ||
|
||
import ( | ||
"github.com/pkg/errors" | ||
|
||
"github.com/weaveworks/eksctl/pkg/kubernetes" | ||
) | ||
|
||
// EnsureAllAddonsUpToDate checks the default addons (aws-node, kube-proxy and coredns) are up to date | ||
// and if they are not it will update them to the latest version for the given control plane version | ||
// TODO Delete this function when the multi architecture images are used by default when a new cluster is created. When | ||
// that happens eksctl won't need to update them before creating ARM nodegroups anymore. | ||
func EnsureAddonsUpToDate(clientSet kubernetes.Interface, rawClient kubernetes.RawClientInterface, controlPlaneVersion string, region string) error { | ||
_, err := UpdateKubeProxyImageTag(clientSet, controlPlaneVersion, false) | ||
if err != nil { | ||
return errors.Wrapf(err, "error updating kube-proxy") | ||
} | ||
|
||
_, err = UpdateAWSNode(rawClient, region, false) | ||
if err != nil { | ||
return errors.Wrapf(err, "error updating aws-node") | ||
} | ||
|
||
_, err = UpdateCoreDNS(rawClient, region, controlPlaneVersion, false) | ||
if err != nil { | ||
return errors.Wrapf(err, "error updating coredns") | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func AreAddonsUpToDate(clientSet kubernetes.Interface, rawClient kubernetes.RawClientInterface, controlPlaneVersion string, region string) (bool, error) { | ||
kubeProxyUpToDate, err := IsKubeProxyUpToDate(clientSet, controlPlaneVersion) | ||
if err != nil { | ||
return true, err | ||
} | ||
if !kubeProxyUpToDate { | ||
return false, nil | ||
} | ||
|
||
awsNodeUpToDate, err := IsAWSNodeUpToDate(rawClient, region) | ||
if err != nil { | ||
return true, err | ||
} | ||
if !awsNodeUpToDate { | ||
return false, nil | ||
} | ||
|
||
coreDNSUpToDate, err := IsCoreDNSUpToDate(rawClient, region, controlPlaneVersion) | ||
if err != nil { | ||
return true, err | ||
} | ||
return coreDNSUpToDate, nil | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.