diff --git a/app/styles/components/_pod-affinity-term-k8s.scss b/app/styles/components/_pod-affinity-term-k8s.scss deleted file mode 100644 index 2714aeded..000000000 --- a/app/styles/components/_pod-affinity-term-k8s.scss +++ /dev/null @@ -1,3 +0,0 @@ -.affinity-remove { - float: right; -} \ No newline at end of file diff --git a/lib/shared/addon/components/form-affinity-k8s/component.js b/lib/shared/addon/components/form-affinity-k8s/component.js index 87087d98a..d0a4ffbdb 100644 --- a/lib/shared/addon/components/form-affinity-k8s/component.js +++ b/lib/shared/addon/components/form-affinity-k8s/component.js @@ -7,36 +7,6 @@ import { set, } from '@ember/object'; -/** - * affinity: { - * nodeAffinity: { - * preferredDuringSchedulingIgnoredDuringExecution: - * - { - * preference: nodeselectorterm, - * weight: int - * } - * requiredDuringSchedulingIgnoredDuringExecution: - * nodeselectorterms: - * - nodeselectorterm - * } - * - * podAffinity: { - * preferredDuringSchedulingIgnoredDuringExecution: - * - { - * weight: int, - * podaffinityterm: podaffinityterm - * } - * requiredDuringSchedulingIgnoredDuringExecution: - * - podaffinityterm - * } - * - * podAntiAffinity: { - * same as podAffinity - * } - * } - */ - - export default Component.extend({ layout, diff --git a/lib/shared/addon/components/form-match-expressions-k8s/component.js b/lib/shared/addon/components/form-match-expressions-k8s/component.js index 7416a594e..ee79157af 100644 --- a/lib/shared/addon/components/form-match-expressions-k8s/component.js +++ b/lib/shared/addon/components/form-match-expressions-k8s/component.js @@ -1,35 +1,10 @@ -// matchexpressions that matches k8s spec rather than norman spec import Component from '@ember/component'; import layout from './template'; import { computed, get, set, - observer } from '@ember/object'; -/** - * FOR NODE: - * nodeSelectorTerm: { - * matchexpressions: - * - { - * key: string, - * operator: string, one of: [In, NotIn, Exists, DoesNotExist Gt, Lt] - * value: string array ... If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - * } - * matchFields: same as matchExpressions - * } - -* FOR POD: -labelSelector: { -* matchExpressions: -* - { -* key: string, -* operator string one of: In, NotIn, Exists and DoesNotExist -* value: string array ... If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. -* } -} - - */ const MATCH_TYPES = { MATCH_EXPRESSIONS: 'matchExpressions', diff --git a/lib/shared/addon/components/form-node-affinity-k8s/component.js b/lib/shared/addon/components/form-node-affinity-k8s/component.js index d00238598..8b03824ec 100644 --- a/lib/shared/addon/components/form-node-affinity-k8s/component.js +++ b/lib/shared/addon/components/form-node-affinity-k8s/component.js @@ -1,37 +1,11 @@ import Component from '@ember/component'; import layout from './template'; import { - computed, get, set, - observer } from '@ember/object'; import { randomStr } from '../../utils/util'; import { TERM_PRIORITY } from '../form-pod-affinity-k8s/component'; -/** - * nodeAffinity: { - * preferredDuringSchedulingIgnoredDuringExecution: - * - { - * preference: nodeselectorterm, - * weight: int - * } - * requiredDuringSchedulingIgnoredDuringExecution: - * nodeSelectorTerms: - * - nodeselectorterm - * } - * - * - * nodeselectorterm: { - * matchexpressions: - * - { - * key: string, - * operator: string, one of: [In, NotIn, Exists, DoesNotExist Gt, Lt] - * value: string array ... If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - * } - * matchfields: same as match expressions but matches fields instead of labels - * } - */ - export default Component.extend({ layout, diff --git a/lib/shared/addon/components/form-node-selector-term-k8s/component.js b/lib/shared/addon/components/form-node-selector-term-k8s/component.js index 3001e4587..849cf1b79 100644 --- a/lib/shared/addon/components/form-node-selector-term-k8s/component.js +++ b/lib/shared/addon/components/form-node-selector-term-k8s/component.js @@ -8,19 +8,6 @@ import { } from '@ember/object'; import { TERM_PRIORITY } from '../form-pod-affinity-k8s/component'; -/** nodeselectorterm: { - * matchexpressions: - * - { - * key: string, - * operator: string, one of: [In, NotIn, Exists, DoesNotExist Gt, Lt] - * value: string array ... If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. - * } - * matchfields: same as match expressions but matches fields instead of labels - * } - * - */ - - export default Component.extend({ layout, diff --git a/lib/shared/addon/components/form-pod-affinity-k8s/component.js b/lib/shared/addon/components/form-pod-affinity-k8s/component.js index 0f9dfb13c..f444f95e6 100644 --- a/lib/shared/addon/components/form-pod-affinity-k8s/component.js +++ b/lib/shared/addon/components/form-pod-affinity-k8s/component.js @@ -1,25 +1,11 @@ import Component from '@ember/component'; import layout from './template'; import { - computed, get, set, - observer } from '@ember/object'; import { randomStr } from '../../utils/util'; -/** podAffinity: { - * preferredDuringSchedulingIgnoredDuringExecution: - * - { - * weight: int, - * podaffinityterm: podaffinityterm - * } - * requiredDuringSchedulingIgnoredDuringExecution: - * - podaffinityterm - * } - * podAntiAffinity: same shape - */ - export const TERM_PRIORITY = { PREFERRED: 'preferred', REQUIRED: 'required' diff --git a/lib/shared/addon/components/form-pod-affinity-term-k8s/component.js b/lib/shared/addon/components/form-pod-affinity-term-k8s/component.js index 50e8106ff..376c05413 100644 --- a/lib/shared/addon/components/form-pod-affinity-term-k8s/component.js +++ b/lib/shared/addon/components/form-pod-affinity-term-k8s/component.js @@ -4,38 +4,9 @@ import { computed, get, set, - observer } from '@ember/object'; import { TERM_PRIORITY } from '../form-pod-affinity-k8s/component'; -/** if preferred: - * - { - * weight: int, - * podaffinityterm: podaffinityterm - * } - * else: - * - podAffinityTerm - * - * podaffinityterm: { - * namespaceSelector: same as labelSelector OR if empty object, 'all namespaces' - * namespaces: string array of namespaces - if [] && namespaceSelector==null, 'use this pod's namespace' - * toplogyKey: string - * labelSelector: { - * matchExpressions: - * - { - * key: string, - * operator string one of: In, NotIn, Exists and DoesNotExist - * value: string array ... If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - * } - * matchLabels: { - * map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". - * The requirements are ANDed. - * } - * } - - * } - */ - const namespaceModes = { ALL: 'all', THIS_POD: 'thisPod',