diff --git a/app/components/cru-dns/component.js b/app/components/cru-dns/component.js index e05f0988b..142572e97 100644 --- a/app/components/cru-dns/component.js +++ b/app/components/cru-dns/component.js @@ -102,7 +102,7 @@ export default Component.extend(ViewNewEdit, ChildHook, { if ( kind === HEADLESS ) { kind = CLUSTER_IP; set(this, 'model.clusterIp', 'None'); - } else { + } else if ( this.mode === 'new' ) { set(this, 'model.clusterIp', ''); } @@ -197,6 +197,12 @@ export default Component.extend(ViewNewEdit, ChildHook, { delete get(this, 'model')[SELECTOR]; } + const ports = this.primaryResource.ports || []; + + if ( this.primaryResource.kind !== LOAD_BALANCER && this.primaryResource.kind !== NODE_PORT ) { + ports.forEach((port) => delete port['nodePort']); + } + set(this, 'model.namespaceId', get(this, 'namespace.id') || '__placeholder__'); const self = this; const sup = this._super;