diff --git a/openstack/cce/v3/clusters/results.go b/openstack/cce/v3/clusters/results.go index 629451ae2..530dc4cbd 100644 --- a/openstack/cce/v3/clusters/results.go +++ b/openstack/cce/v3/clusters/results.go @@ -54,6 +54,8 @@ type Spec struct { HostNetwork HostNetworkSpec `json:"hostNetwork" required:"true"` //Container network parameters ContainerNetwork ContainerNetworkSpec `json:"containerNetwork" required:"true"` + //Authentication parameters + Authentication AuthenticationSpec `json:"authentication,omitempty"` // Charging mode of the cluster, which is 0 (on demand) BillingMode int `json:"billingMode,omitempty"` //Extended parameter for a cluster @@ -79,6 +81,13 @@ type ContainerNetworkSpec struct { Cidr string `json:"cidr,omitempty"` } +//Authentication parameters +type AuthenticationSpec struct { + //Authentication mode: rbac , x509 or authenticating_proxy + Mode string `json:"mode" required:"true"` + AuthenticatingProxy map[string]string `json:"authenticatingProxy" required:"true"` +} + type Status struct { //The state of the cluster Phase string `json:"phase"` diff --git a/openstack/cce/v3/clusters/testing/requests_test.go b/openstack/cce/v3/clusters/testing/requests_test.go index 8cc22b551..acd4639e0 100644 --- a/openstack/cce/v3/clusters/testing/requests_test.go +++ b/openstack/cce/v3/clusters/testing/requests_test.go @@ -129,6 +129,10 @@ func TestCreateV3Cluster(t *testing.T) { }, "containerNetwork": { "mode": "overlay_l2" + }, + "authentication": { + "mode": "rbac", + "authenticatingProxy": {} } } @@ -149,6 +153,9 @@ func TestCreateV3Cluster(t *testing.T) { VpcId: "3305eb40-2707-4940-921c-9f335f84a2ca", SubnetId: "00e41db7-e56b-4946-bf91-27bb9effd664"}, ContainerNetwork: clusters.ContainerNetworkSpec{Mode: "overlay_l2"}, + Authentication: clusters.AuthenticationSpec{ + Mode: "rbac", + AuthenticatingProxy: make(map[string]string)}, }, } actual, err := clusters.Create(fake.ServiceClient(), options).Extract()