fix node group version update check for eks clusters

This commit is contained in:
Westly Wright 2020-09-25 16:05:28 -07:00
parent 37fa8e6ef7
commit 3a6bbe3ad3
No known key found for this signature in database
GPG Key ID: 4FAB3D8673DC54A3
1 changed files with 4 additions and 4 deletions

View File

@ -307,13 +307,13 @@ export default Resource.extend(Grafana, ResourceUsage, {
return out;
}),
nodeGroupVersionUpdate: computed('appliedSpec.eksConfig.kubernetesVersion', 'appliedSpec.eksConfig.nodeGroups.@each.{version}', function() {
if (isEmpty(get(this, 'appliedSpec.eksConfig.nodeGroups'))) {
nodeGroupVersionUpdate: computed('eksStatus.upstreamSpec.kubernetesVersion', 'eksStatus.upstreamSpec.nodeGroups.@each.{version}', function() {
if (isEmpty(get(this, 'eksStatus.upstreamSpec.nodeGroups'))) {
return false;
}
const kubernetesVersion = get(this, 'appliedSpec.eksConfig.kubernetesVersion');
const nodeGroupVersions = (get(this, 'appliedSpec.eksConfig.nodeGroups') || []).getEach('version');
const kubernetesVersion = get(this, 'eksStatus.upstreamSpec.kubernetesVersion');
const nodeGroupVersions = (get(this, 'eksStatus.upstreamSpec.nodeGroups') || []).getEach('version');
return nodeGroupVersions.any((ngv) => ngv !== kubernetesVersion);
}),