Skip to content

Commit

Permalink
Nutanix: allow multi-subnets in Machine providerSpec and failureDomai…
Browse files Browse the repository at this point in the history
…n configuration
  • Loading branch information
yanhua121 committed Oct 29, 2024
1 parent 684b2b1 commit 66fbeb9
Show file tree
Hide file tree
Showing 35 changed files with 35 additions and 139 deletions.
4 changes: 1 addition & 3 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -1769,9 +1769,7 @@ type NutanixFailureDomain struct {
// obtained from the Prism Central console or using the prism_central API.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=1
// +listType=map
// +listMapKey=type
// +listType=atomic
Subnets []NutanixResourceIdentifier `json:"subnets"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,9 @@ spec:
when type is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name''
? has(self.name) : !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
5 changes: 1 addition & 4 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8321,10 +8321,7 @@
"default": {},
"$ref": "#/definitions/com.github.openshift.api.config.v1.NutanixResourceIdentifier"
},
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
"x-kubernetes-list-type": "atomic"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,9 @@ spec:
is Name, and forbidden otherwise
rule: 'has(self.type) && self.type == ''Name'' ? has(self.name)
: !has(self.name)'
maxItems: 1
minItems: 1
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
x-kubernetes-list-type: atomic
required:
- cluster
- name
Expand Down
Loading

0 comments on commit 66fbeb9

Please sign in to comment.