diff --git a/lib/shared/addon/components/cluster-driver/driver-amazoneks/component.js b/lib/shared/addon/components/cluster-driver/driver-amazoneks/component.js index 001389043..47d8ad6a6 100644 --- a/lib/shared/addon/components/cluster-driver/driver-amazoneks/component.js +++ b/lib/shared/addon/components/cluster-driver/driver-amazoneks/component.js @@ -10,6 +10,7 @@ import { equal } from '@ember/object/computed'; import { inject as service } from '@ember/service'; import $ from 'jquery'; import { rcompare, coerce } from 'semver'; +import { isEmpty } from '@ember/utils'; const REGIONS = ['us-east-2', 'us-east-1', 'us-west-2', 'ap-east-1', 'ap-south-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', 'ca-central-1', 'eu-central-1', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-north-1', 'me-south-1', 'sa-east-1']; const RANCHER_GROUP = 'rancher-nodes'; @@ -504,4 +505,16 @@ export default Component.extend(ClusterDriver, { }); }); }, + + willSave() { + // temporary measure put in place for rancher/rancher#24652 + const { config: { subnets } } = this; + + if (isEmpty(subnets)) { + set(this, 'config.subnets', []); + } + + return this._super(...arguments); + }, + });