kube_node_pools.go 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package compute
  15. import "yunion.io/x/onecloud/pkg/apis"
  16. type KubeNodePoolListInput struct {
  17. apis.StatusStandaloneResourceListInput
  18. apis.ExternalizedResourceBaseListInput
  19. RegionalFilterListInput
  20. ManagedResourceListInput
  21. CloudKubeClusterId string `json:"cloud_kube_cluster_id"`
  22. }
  23. type KubeNodePoolCreateInput struct {
  24. apis.StatusStandaloneResourceCreateInput
  25. NetworkIds SKubeNetworkIds `json:"network_ids"`
  26. InstanceTypes SInstanceTypes `json:"instance_types"`
  27. // default: 2
  28. MinInstanceCount int `json:"min_instance_count"`
  29. // default: 2
  30. MaxInstanceCount int `json:"max_instance_count"`
  31. // 预期节点数量, 不得小于min_instance_count
  32. // default: 2
  33. DesiredInstanceCount int `json:"desired_instance_count"`
  34. RootDiskSizeGb int `json:"root_disk_size_gb"`
  35. CloudKubeClusterId string `json:"cloud_kube_cluster_id"`
  36. // 秘钥id,若不传,则使用系统级秘钥
  37. KeypairId string `json:"keypair_id"`
  38. // swagger:ignore
  39. PublicKey string `json:"public_key"`
  40. }
  41. type KubeNodePoolDetails struct {
  42. apis.StatusStandaloneResourceDetails
  43. apis.InfrasResourceBaseDetails
  44. DomainId string `json:"domain_id"`
  45. }
  46. type KubeNodePoolUpdateInput struct {
  47. apis.StatusStandaloneResourceBaseUpdateInput
  48. }