Skip to content

Commit

Permalink
Add the edge provider to the cloud spec (#6548)
Browse files Browse the repository at this point in the history
* add the edge provider to the cloud spec

Signed-off-by: Moath Qasim <moad.qassem@gmail.com>

* update swagger
Signed-off-by: Moath Qasim <moad.qassem@gmail.com>

Signed-off-by: Moath Qasim <moad.qassem@gmail.com>

---------

Signed-off-by: Moath Qasim <moad.qassem@gmail.com>
  • Loading branch information
moadqassem committed Feb 23, 2024
1 parent 02719c4 commit 7c58a2b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/api/cmd/kubermatic-api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -36882,6 +36882,9 @@
"digitalocean": {
"$ref": "#/definitions/PublicDigitaloceanCloudSpec"
},
"edge": {
"$ref": "#/definitions/PublicEdgeCloudSpec"
},
"fake": {
"$ref": "#/definitions/PublicFakeCloudSpec"
},
Expand Down Expand Up @@ -36917,6 +36920,11 @@
"title": "PublicDigitaloceanCloudSpec is a public counterpart of apiv1.DigitaloceanCloudSpec.",
"x-go-package": "k8c.io/dashboard/v2/pkg/api/v1"
},
"PublicEdgeCloudSpec": {
"type": "object",
"title": "PublicEdgeCloudSpec is a public counterpart of apiv1.EdgeCloudSpec.",
"x-go-package": "k8c.io/dashboard/v2/pkg/api/v1"
},
"PublicFakeCloudSpec": {
"type": "object",
"title": "PublicFakeCloudSpec is a public counterpart of apiv1.FakeCloudSpec.",
Expand Down
13 changes: 13 additions & 0 deletions modules/api/pkg/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ func (cs *ClusterSpec) MarshalJSON() ([]byte, error) {
Fake: newPublicFakeCloudSpec(cs.Cloud.Fake),
Digitalocean: newPublicDigitaloceanCloudSpec(cs.Cloud.Digitalocean),
BringYourOwn: newPublicBringYourOwnCloudSpec(cs.Cloud.BringYourOwn),
Edge: newPublicEdgeCloudSpec(cs.Cloud.Edge),
AWS: newPublicAWSCloudSpec(cs.Cloud.AWS),
Azure: newPublicAzureCloudSpec(cs.Cloud.Azure),
Openstack: newPublicOpenstackCloudSpec(cs.Cloud.Openstack),
Expand Down Expand Up @@ -1134,6 +1135,7 @@ type PublicCloudSpec struct {
Fake *PublicFakeCloudSpec `json:"fake,omitempty"`
Digitalocean *PublicDigitaloceanCloudSpec `json:"digitalocean,omitempty"`
BringYourOwn *PublicBringYourOwnCloudSpec `json:"bringyourown,omitempty"`
Edge *PublicEdgeCloudSpec `json:"edge,omitempty"`
AWS *PublicAWSCloudSpec `json:"aws,omitempty"`
Azure *PublicAzureCloudSpec `json:"azure,omitempty"`
Openstack *PublicOpenstackCloudSpec `json:"openstack,omitempty"`
Expand Down Expand Up @@ -1220,6 +1222,17 @@ func newPublicBringYourOwnCloudSpec(internal *kubermaticv1.BringYourOwnCloudSpec
return &PublicBringYourOwnCloudSpec{}
}

// PublicEdgeCloudSpec is a public counterpart of apiv1.EdgeCloudSpec.
type PublicEdgeCloudSpec struct{}

func newPublicEdgeCloudSpec(internal *kubermaticv1.EdgeCloudSpec) (public *PublicEdgeCloudSpec) {
if internal == nil {
return nil
}

return &PublicEdgeCloudSpec{}
}

// PublicAWSCloudSpec is a public counterpart of apiv1.AWSCloudSpec.
type PublicAWSCloudSpec struct {
NodePortsAllowedIPRanges *kubermaticv1.NetworkRanges `json:"nodePortsAllowedIPRanges,omitempty"`
Expand Down

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

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

0 comments on commit 7c58a2b

Please sign in to comment.