From 6c28fec254d225e7ba6d43a5132117c0b515f2f7 Mon Sep 17 00:00:00 2001 From: DCL Releaser Date: Mon, 2 May 2022 12:39:57 -0700 Subject: [PATCH] Automatic import from cloud_mmv2_dcl_20220502_1231_RC00 https://rapid.corp.google.com/#candidate/cloud_mmv2_dcl/cloud_mmv2_dcl_20220502_1231/cloud_mmv2_dcl_20220502_1231_RC00 Automated DCL push via Rapid This build IS suitable for public release. Bug: Change-Id: Ia0e3d0fcd302e14473d5f3d3bae5c3eead8341fe --- .../proto/containeraws/alpha/node_pool.proto | 10 +- .../proto/containeraws/beta/node_pool.proto | 10 +- .../services/containeraws/alpha/node_pool.py | 49 +++ .../containeraws/alpha/node_pool_server.go | 25 ++ .../services/containeraws/beta/node_pool.py | 49 +++ .../containeraws/beta/node_pool_server.go | 25 ++ .../alpha/service_attachment_internal.go | 8 +- .../beta/service_attachment_internal.go | 8 +- .../compute/service_attachment_internal.go | 8 +- .../google/containeraws/alpha/node_pool.go | 52 +++ .../google/containeraws/alpha/node_pool.yaml | 19 + .../alpha/node_pool_alpha_yaml_embed.go | 6 +- .../containeraws/alpha/node_pool_internal.go | 334 ++++++++++++++++++ .../google/containeraws/beta/node_pool.go | 52 +++ .../google/containeraws/beta/node_pool.yaml | 19 + .../beta/node_pool_beta_yaml_embed.go | 6 +- .../containeraws/beta/node_pool_internal.go | 334 ++++++++++++++++++ .../google/containeraws/alpha/node_pool.go | 31 ++ .../google/containeraws/beta/node_pool.go | 31 ++ 19 files changed, 1060 insertions(+), 16 deletions(-) diff --git a/python/proto/containeraws/alpha/node_pool.proto b/python/proto/containeraws/alpha/node_pool.proto index 7822564048..b757153188 100755 --- a/python/proto/containeraws/alpha/node_pool.proto +++ b/python/proto/containeraws/alpha/node_pool.proto @@ -84,8 +84,9 @@ message ContainerawsAlphaNodePoolConfig { ContainerawsAlphaNodePoolConfigConfigEncryption config_encryption = 7; ContainerawsAlphaNodePoolConfigSshConfig ssh_config = 8; repeated string security_group_ids = 9; - ContainerawsAlphaNodePoolConfigInstancePlacement instance_placement = 10; - string image_type = 11; + ContainerawsAlphaNodePoolConfigProxyConfig proxy_config = 10; + ContainerawsAlphaNodePoolConfigInstancePlacement instance_placement = 11; + string image_type = 12; } message ContainerawsAlphaNodePoolConfigRootVolume { @@ -109,6 +110,11 @@ message ContainerawsAlphaNodePoolConfigSshConfig { string ec2_key_pair = 1; } +message ContainerawsAlphaNodePoolConfigProxyConfig { + string secret_arn = 1; + string secret_version = 2; +} + message ContainerawsAlphaNodePoolConfigInstancePlacement { ContainerawsAlphaNodePoolConfigInstancePlacementTenancyEnum tenancy = 1; } diff --git a/python/proto/containeraws/beta/node_pool.proto b/python/proto/containeraws/beta/node_pool.proto index a5df8c12c8..2a33e5ee73 100755 --- a/python/proto/containeraws/beta/node_pool.proto +++ b/python/proto/containeraws/beta/node_pool.proto @@ -84,8 +84,9 @@ message ContainerawsBetaNodePoolConfig { ContainerawsBetaNodePoolConfigConfigEncryption config_encryption = 7; ContainerawsBetaNodePoolConfigSshConfig ssh_config = 8; repeated string security_group_ids = 9; - ContainerawsBetaNodePoolConfigInstancePlacement instance_placement = 10; - string image_type = 11; + ContainerawsBetaNodePoolConfigProxyConfig proxy_config = 10; + ContainerawsBetaNodePoolConfigInstancePlacement instance_placement = 11; + string image_type = 12; } message ContainerawsBetaNodePoolConfigRootVolume { @@ -109,6 +110,11 @@ message ContainerawsBetaNodePoolConfigSshConfig { string ec2_key_pair = 1; } +message ContainerawsBetaNodePoolConfigProxyConfig { + string secret_arn = 1; + string secret_version = 2; +} + message ContainerawsBetaNodePoolConfigInstancePlacement { ContainerawsBetaNodePoolConfigInstancePlacementTenancyEnum tenancy = 1; } diff --git a/python/services/containeraws/alpha/node_pool.py b/python/services/containeraws/alpha/node_pool.py index e39d710259..b0030ab891 100755 --- a/python/services/containeraws/alpha/node_pool.py +++ b/python/services/containeraws/alpha/node_pool.py @@ -224,6 +224,7 @@ def __init__( config_encryption: dict = None, ssh_config: dict = None, security_group_ids: list = None, + proxy_config: dict = None, instance_placement: dict = None, image_type: str = None, ): @@ -236,6 +237,7 @@ def __init__( self.config_encryption = config_encryption self.ssh_config = ssh_config self.security_group_ids = security_group_ids + self.proxy_config = proxy_config self.instance_placement = instance_placement self.image_type = image_type @@ -277,6 +279,12 @@ def to_proto(self, resource): res.security_group_ids.extend( Primitive.to_proto(resource.security_group_ids) ) + if NodePoolConfigProxyConfig.to_proto(resource.proxy_config): + res.proxy_config.CopyFrom( + NodePoolConfigProxyConfig.to_proto(resource.proxy_config) + ) + else: + res.ClearField("proxy_config") if NodePoolConfigInstancePlacement.to_proto(resource.instance_placement): res.instance_placement.CopyFrom( NodePoolConfigInstancePlacement.to_proto(resource.instance_placement) @@ -304,6 +312,7 @@ def from_proto(self, resource): ), ssh_config=NodePoolConfigSshConfig.from_proto(resource.ssh_config), security_group_ids=Primitive.from_proto(resource.security_group_ids), + proxy_config=NodePoolConfigProxyConfig.from_proto(resource.proxy_config), instance_placement=NodePoolConfigInstancePlacement.from_proto( resource.instance_placement ), @@ -497,6 +506,46 @@ def from_proto(self, resources): return [NodePoolConfigSshConfig.from_proto(i) for i in resources] +class NodePoolConfigProxyConfig(object): + def __init__(self, secret_arn: str = None, secret_version: str = None): + self.secret_arn = secret_arn + self.secret_version = secret_version + + @classmethod + def to_proto(self, resource): + if not resource: + return None + + res = node_pool_pb2.ContainerawsAlphaNodePoolConfigProxyConfig() + if Primitive.to_proto(resource.secret_arn): + res.secret_arn = Primitive.to_proto(resource.secret_arn) + if Primitive.to_proto(resource.secret_version): + res.secret_version = Primitive.to_proto(resource.secret_version) + return res + + @classmethod + def from_proto(self, resource): + if not resource: + return None + + return NodePoolConfigProxyConfig( + secret_arn=Primitive.from_proto(resource.secret_arn), + secret_version=Primitive.from_proto(resource.secret_version), + ) + + +class NodePoolConfigProxyConfigArray(object): + @classmethod + def to_proto(self, resources): + if not resources: + return resources + return [NodePoolConfigProxyConfig.to_proto(i) for i in resources] + + @classmethod + def from_proto(self, resources): + return [NodePoolConfigProxyConfig.from_proto(i) for i in resources] + + class NodePoolConfigInstancePlacement(object): def __init__(self, tenancy: str = None): self.tenancy = tenancy diff --git a/python/services/containeraws/alpha/node_pool_server.go b/python/services/containeraws/alpha/node_pool_server.go index b9e09d10ab..6705c90012 100755 --- a/python/services/containeraws/alpha/node_pool_server.go +++ b/python/services/containeraws/alpha/node_pool_server.go @@ -83,6 +83,7 @@ func ProtoToContainerawsAlphaNodePoolConfig(p *alphapb.ContainerawsAlphaNodePool IamInstanceProfile: dcl.StringOrNil(p.GetIamInstanceProfile()), ConfigEncryption: ProtoToContainerawsAlphaNodePoolConfigConfigEncryption(p.GetConfigEncryption()), SshConfig: ProtoToContainerawsAlphaNodePoolConfigSshConfig(p.GetSshConfig()), + ProxyConfig: ProtoToContainerawsAlphaNodePoolConfigProxyConfig(p.GetProxyConfig()), InstancePlacement: ProtoToContainerawsAlphaNodePoolConfigInstancePlacement(p.GetInstancePlacement()), ImageType: dcl.StringOrNil(p.GetImageType()), } @@ -144,6 +145,18 @@ func ProtoToContainerawsAlphaNodePoolConfigSshConfig(p *alphapb.ContainerawsAlph return obj } +// ProtoToNodePoolConfigProxyConfig converts a NodePoolConfigProxyConfig object from its proto representation. +func ProtoToContainerawsAlphaNodePoolConfigProxyConfig(p *alphapb.ContainerawsAlphaNodePoolConfigProxyConfig) *alpha.NodePoolConfigProxyConfig { + if p == nil { + return nil + } + obj := &alpha.NodePoolConfigProxyConfig{ + SecretArn: dcl.StringOrNil(p.GetSecretArn()), + SecretVersion: dcl.StringOrNil(p.GetSecretVersion()), + } + return obj +} + // ProtoToNodePoolConfigInstancePlacement converts a NodePoolConfigInstancePlacement object from its proto representation. func ProtoToContainerawsAlphaNodePoolConfigInstancePlacement(p *alphapb.ContainerawsAlphaNodePoolConfigInstancePlacement) *alpha.NodePoolConfigInstancePlacement { if p == nil { @@ -255,6 +268,7 @@ func ContainerawsAlphaNodePoolConfigToProto(o *alpha.NodePoolConfig) *alphapb.Co p.SetIamInstanceProfile(dcl.ValueOrEmptyString(o.IamInstanceProfile)) p.SetConfigEncryption(ContainerawsAlphaNodePoolConfigConfigEncryptionToProto(o.ConfigEncryption)) p.SetSshConfig(ContainerawsAlphaNodePoolConfigSshConfigToProto(o.SshConfig)) + p.SetProxyConfig(ContainerawsAlphaNodePoolConfigProxyConfigToProto(o.ProxyConfig)) p.SetInstancePlacement(ContainerawsAlphaNodePoolConfigInstancePlacementToProto(o.InstancePlacement)) p.SetImageType(dcl.ValueOrEmptyString(o.ImageType)) sTaints := make([]*alphapb.ContainerawsAlphaNodePoolConfigTaints, len(o.Taints)) @@ -325,6 +339,17 @@ func ContainerawsAlphaNodePoolConfigSshConfigToProto(o *alpha.NodePoolConfigSshC return p } +// NodePoolConfigProxyConfigToProto converts a NodePoolConfigProxyConfig object to its proto representation. +func ContainerawsAlphaNodePoolConfigProxyConfigToProto(o *alpha.NodePoolConfigProxyConfig) *alphapb.ContainerawsAlphaNodePoolConfigProxyConfig { + if o == nil { + return nil + } + p := &alphapb.ContainerawsAlphaNodePoolConfigProxyConfig{} + p.SetSecretArn(dcl.ValueOrEmptyString(o.SecretArn)) + p.SetSecretVersion(dcl.ValueOrEmptyString(o.SecretVersion)) + return p +} + // NodePoolConfigInstancePlacementToProto converts a NodePoolConfigInstancePlacement object to its proto representation. func ContainerawsAlphaNodePoolConfigInstancePlacementToProto(o *alpha.NodePoolConfigInstancePlacement) *alphapb.ContainerawsAlphaNodePoolConfigInstancePlacement { if o == nil { diff --git a/python/services/containeraws/beta/node_pool.py b/python/services/containeraws/beta/node_pool.py index 0acf197e32..7ebbf2b392 100755 --- a/python/services/containeraws/beta/node_pool.py +++ b/python/services/containeraws/beta/node_pool.py @@ -218,6 +218,7 @@ def __init__( config_encryption: dict = None, ssh_config: dict = None, security_group_ids: list = None, + proxy_config: dict = None, instance_placement: dict = None, image_type: str = None, ): @@ -230,6 +231,7 @@ def __init__( self.config_encryption = config_encryption self.ssh_config = ssh_config self.security_group_ids = security_group_ids + self.proxy_config = proxy_config self.instance_placement = instance_placement self.image_type = image_type @@ -271,6 +273,12 @@ def to_proto(self, resource): res.security_group_ids.extend( Primitive.to_proto(resource.security_group_ids) ) + if NodePoolConfigProxyConfig.to_proto(resource.proxy_config): + res.proxy_config.CopyFrom( + NodePoolConfigProxyConfig.to_proto(resource.proxy_config) + ) + else: + res.ClearField("proxy_config") if NodePoolConfigInstancePlacement.to_proto(resource.instance_placement): res.instance_placement.CopyFrom( NodePoolConfigInstancePlacement.to_proto(resource.instance_placement) @@ -298,6 +306,7 @@ def from_proto(self, resource): ), ssh_config=NodePoolConfigSshConfig.from_proto(resource.ssh_config), security_group_ids=Primitive.from_proto(resource.security_group_ids), + proxy_config=NodePoolConfigProxyConfig.from_proto(resource.proxy_config), instance_placement=NodePoolConfigInstancePlacement.from_proto( resource.instance_placement ), @@ -491,6 +500,46 @@ def from_proto(self, resources): return [NodePoolConfigSshConfig.from_proto(i) for i in resources] +class NodePoolConfigProxyConfig(object): + def __init__(self, secret_arn: str = None, secret_version: str = None): + self.secret_arn = secret_arn + self.secret_version = secret_version + + @classmethod + def to_proto(self, resource): + if not resource: + return None + + res = node_pool_pb2.ContainerawsBetaNodePoolConfigProxyConfig() + if Primitive.to_proto(resource.secret_arn): + res.secret_arn = Primitive.to_proto(resource.secret_arn) + if Primitive.to_proto(resource.secret_version): + res.secret_version = Primitive.to_proto(resource.secret_version) + return res + + @classmethod + def from_proto(self, resource): + if not resource: + return None + + return NodePoolConfigProxyConfig( + secret_arn=Primitive.from_proto(resource.secret_arn), + secret_version=Primitive.from_proto(resource.secret_version), + ) + + +class NodePoolConfigProxyConfigArray(object): + @classmethod + def to_proto(self, resources): + if not resources: + return resources + return [NodePoolConfigProxyConfig.to_proto(i) for i in resources] + + @classmethod + def from_proto(self, resources): + return [NodePoolConfigProxyConfig.from_proto(i) for i in resources] + + class NodePoolConfigInstancePlacement(object): def __init__(self, tenancy: str = None): self.tenancy = tenancy diff --git a/python/services/containeraws/beta/node_pool_server.go b/python/services/containeraws/beta/node_pool_server.go index 4cb56d8f4c..bc76c814b7 100755 --- a/python/services/containeraws/beta/node_pool_server.go +++ b/python/services/containeraws/beta/node_pool_server.go @@ -83,6 +83,7 @@ func ProtoToContainerawsBetaNodePoolConfig(p *betapb.ContainerawsBetaNodePoolCon IamInstanceProfile: dcl.StringOrNil(p.GetIamInstanceProfile()), ConfigEncryption: ProtoToContainerawsBetaNodePoolConfigConfigEncryption(p.GetConfigEncryption()), SshConfig: ProtoToContainerawsBetaNodePoolConfigSshConfig(p.GetSshConfig()), + ProxyConfig: ProtoToContainerawsBetaNodePoolConfigProxyConfig(p.GetProxyConfig()), InstancePlacement: ProtoToContainerawsBetaNodePoolConfigInstancePlacement(p.GetInstancePlacement()), ImageType: dcl.StringOrNil(p.GetImageType()), } @@ -144,6 +145,18 @@ func ProtoToContainerawsBetaNodePoolConfigSshConfig(p *betapb.ContainerawsBetaNo return obj } +// ProtoToNodePoolConfigProxyConfig converts a NodePoolConfigProxyConfig object from its proto representation. +func ProtoToContainerawsBetaNodePoolConfigProxyConfig(p *betapb.ContainerawsBetaNodePoolConfigProxyConfig) *beta.NodePoolConfigProxyConfig { + if p == nil { + return nil + } + obj := &beta.NodePoolConfigProxyConfig{ + SecretArn: dcl.StringOrNil(p.GetSecretArn()), + SecretVersion: dcl.StringOrNil(p.GetSecretVersion()), + } + return obj +} + // ProtoToNodePoolConfigInstancePlacement converts a NodePoolConfigInstancePlacement object from its proto representation. func ProtoToContainerawsBetaNodePoolConfigInstancePlacement(p *betapb.ContainerawsBetaNodePoolConfigInstancePlacement) *beta.NodePoolConfigInstancePlacement { if p == nil { @@ -255,6 +268,7 @@ func ContainerawsBetaNodePoolConfigToProto(o *beta.NodePoolConfig) *betapb.Conta p.SetIamInstanceProfile(dcl.ValueOrEmptyString(o.IamInstanceProfile)) p.SetConfigEncryption(ContainerawsBetaNodePoolConfigConfigEncryptionToProto(o.ConfigEncryption)) p.SetSshConfig(ContainerawsBetaNodePoolConfigSshConfigToProto(o.SshConfig)) + p.SetProxyConfig(ContainerawsBetaNodePoolConfigProxyConfigToProto(o.ProxyConfig)) p.SetInstancePlacement(ContainerawsBetaNodePoolConfigInstancePlacementToProto(o.InstancePlacement)) p.SetImageType(dcl.ValueOrEmptyString(o.ImageType)) sTaints := make([]*betapb.ContainerawsBetaNodePoolConfigTaints, len(o.Taints)) @@ -325,6 +339,17 @@ func ContainerawsBetaNodePoolConfigSshConfigToProto(o *beta.NodePoolConfigSshCon return p } +// NodePoolConfigProxyConfigToProto converts a NodePoolConfigProxyConfig object to its proto representation. +func ContainerawsBetaNodePoolConfigProxyConfigToProto(o *beta.NodePoolConfigProxyConfig) *betapb.ContainerawsBetaNodePoolConfigProxyConfig { + if o == nil { + return nil + } + p := &betapb.ContainerawsBetaNodePoolConfigProxyConfig{} + p.SetSecretArn(dcl.ValueOrEmptyString(o.SecretArn)) + p.SetSecretVersion(dcl.ValueOrEmptyString(o.SecretVersion)) + return p +} + // NodePoolConfigInstancePlacementToProto converts a NodePoolConfigInstancePlacement object to its proto representation. func ContainerawsBetaNodePoolConfigInstancePlacementToProto(o *beta.NodePoolConfigInstancePlacement) *betapb.ContainerawsBetaNodePoolConfigInstancePlacement { if o == nil { diff --git a/services/google/compute/alpha/service_attachment_internal.go b/services/google/compute/alpha/service_attachment_internal.go index 68feed6757..6ecf9bf1a1 100755 --- a/services/google/compute/alpha/service_attachment_internal.go +++ b/services/google/compute/alpha/service_attachment_internal.go @@ -133,7 +133,9 @@ func newUpdateServiceAttachmentPatchRequest(ctx context.Context, f *ServiceAttac if v := f.NatSubnets; v != nil { req["natSubnets"] = v } - if v := f.ConsumerRejectLists; v != nil { + if v, err := dcl.SelfLinkToNameArrayExpander(f.ConsumerRejectLists); err != nil { + return nil, fmt.Errorf("error expanding ConsumerRejectLists into consumerRejectLists: %w", err) + } else if v != nil { req["consumerRejectLists"] = v } if v, err := expandServiceAttachmentConsumerAcceptListsSlice(c, f.ConsumerAcceptLists, res); err != nil { @@ -1327,7 +1329,9 @@ func expandServiceAttachment(c *Client, f *ServiceAttachment) (map[string]interf if v := f.EnableProxyProtocol; dcl.ValueShouldBeSent(v) { m["enableProxyProtocol"] = v } - if v := f.ConsumerRejectLists; v != nil { + if v, err := dcl.SelfLinkToNameArrayExpander(f.ConsumerRejectLists); err != nil { + return nil, fmt.Errorf("error expanding ConsumerRejectLists into consumerRejectLists: %w", err) + } else if v != nil { m["consumerRejectLists"] = v } if v, err := expandServiceAttachmentConsumerAcceptListsSlice(c, f.ConsumerAcceptLists, res); err != nil { diff --git a/services/google/compute/beta/service_attachment_internal.go b/services/google/compute/beta/service_attachment_internal.go index de53ca60ee..1eddfa4026 100755 --- a/services/google/compute/beta/service_attachment_internal.go +++ b/services/google/compute/beta/service_attachment_internal.go @@ -133,7 +133,9 @@ func newUpdateServiceAttachmentPatchRequest(ctx context.Context, f *ServiceAttac if v := f.NatSubnets; v != nil { req["natSubnets"] = v } - if v := f.ConsumerRejectLists; v != nil { + if v, err := dcl.SelfLinkToNameArrayExpander(f.ConsumerRejectLists); err != nil { + return nil, fmt.Errorf("error expanding ConsumerRejectLists into consumerRejectLists: %w", err) + } else if v != nil { req["consumerRejectLists"] = v } if v, err := expandServiceAttachmentConsumerAcceptListsSlice(c, f.ConsumerAcceptLists, res); err != nil { @@ -1327,7 +1329,9 @@ func expandServiceAttachment(c *Client, f *ServiceAttachment) (map[string]interf if v := f.EnableProxyProtocol; dcl.ValueShouldBeSent(v) { m["enableProxyProtocol"] = v } - if v := f.ConsumerRejectLists; v != nil { + if v, err := dcl.SelfLinkToNameArrayExpander(f.ConsumerRejectLists); err != nil { + return nil, fmt.Errorf("error expanding ConsumerRejectLists into consumerRejectLists: %w", err) + } else if v != nil { m["consumerRejectLists"] = v } if v, err := expandServiceAttachmentConsumerAcceptListsSlice(c, f.ConsumerAcceptLists, res); err != nil { diff --git a/services/google/compute/service_attachment_internal.go b/services/google/compute/service_attachment_internal.go index 2459bb15de..da1af2b760 100755 --- a/services/google/compute/service_attachment_internal.go +++ b/services/google/compute/service_attachment_internal.go @@ -133,7 +133,9 @@ func newUpdateServiceAttachmentPatchRequest(ctx context.Context, f *ServiceAttac if v := f.NatSubnets; v != nil { req["natSubnets"] = v } - if v := f.ConsumerRejectLists; v != nil { + if v, err := dcl.SelfLinkToNameArrayExpander(f.ConsumerRejectLists); err != nil { + return nil, fmt.Errorf("error expanding ConsumerRejectLists into consumerRejectLists: %w", err) + } else if v != nil { req["consumerRejectLists"] = v } if v, err := expandServiceAttachmentConsumerAcceptListsSlice(c, f.ConsumerAcceptLists, res); err != nil { @@ -1327,7 +1329,9 @@ func expandServiceAttachment(c *Client, f *ServiceAttachment) (map[string]interf if v := f.EnableProxyProtocol; dcl.ValueShouldBeSent(v) { m["enableProxyProtocol"] = v } - if v := f.ConsumerRejectLists; v != nil { + if v, err := dcl.SelfLinkToNameArrayExpander(f.ConsumerRejectLists); err != nil { + return nil, fmt.Errorf("error expanding ConsumerRejectLists into consumerRejectLists: %w", err) + } else if v != nil { m["consumerRejectLists"] = v } if v, err := expandServiceAttachmentConsumerAcceptListsSlice(c, f.ConsumerAcceptLists, res); err != nil { diff --git a/services/google/containeraws/alpha/node_pool.go b/services/google/containeraws/alpha/node_pool.go index 61f9518a76..aaaad0e49d 100755 --- a/services/google/containeraws/alpha/node_pool.go +++ b/services/google/containeraws/alpha/node_pool.go @@ -166,6 +166,7 @@ type NodePoolConfig struct { ConfigEncryption *NodePoolConfigConfigEncryption `json:"configEncryption"` SshConfig *NodePoolConfigSshConfig `json:"sshConfig"` SecurityGroupIds []string `json:"securityGroupIds"` + ProxyConfig *NodePoolConfigProxyConfig `json:"proxyConfig"` InstancePlacement *NodePoolConfigInstancePlacement `json:"instancePlacement"` ImageType *string `json:"imageType"` } @@ -203,6 +204,8 @@ func (r *NodePoolConfig) UnmarshalJSON(data []byte) error { r.SecurityGroupIds = res.SecurityGroupIds + r.ProxyConfig = res.ProxyConfig + r.InstancePlacement = res.InstancePlacement r.ImageType = res.ImageType @@ -430,6 +433,55 @@ func (r *NodePoolConfigSshConfig) HashCode() string { return fmt.Sprintf("%x", hash) } +type NodePoolConfigProxyConfig struct { + empty bool `json:"-"` + SecretArn *string `json:"secretArn"` + SecretVersion *string `json:"secretVersion"` +} + +type jsonNodePoolConfigProxyConfig NodePoolConfigProxyConfig + +func (r *NodePoolConfigProxyConfig) UnmarshalJSON(data []byte) error { + var res jsonNodePoolConfigProxyConfig + if err := json.Unmarshal(data, &res); err != nil { + return err + } + + var m map[string]interface{} + json.Unmarshal(data, &m) + + if len(m) == 0 { + *r = *EmptyNodePoolConfigProxyConfig + } else { + + r.SecretArn = res.SecretArn + + r.SecretVersion = res.SecretVersion + + } + return nil +} + +// This object is used to assert a desired state where this NodePoolConfigProxyConfig is +// empty. Go lacks global const objects, but this object should be treated +// as one. Modifying this object will have undesirable results. +var EmptyNodePoolConfigProxyConfig *NodePoolConfigProxyConfig = &NodePoolConfigProxyConfig{empty: true} + +func (r *NodePoolConfigProxyConfig) Empty() bool { + return r.empty +} + +func (r *NodePoolConfigProxyConfig) String() string { + return dcl.SprintResource(r) +} + +func (r *NodePoolConfigProxyConfig) HashCode() string { + // Placeholder for a more complex hash method that handles ordering, etc + // Hash resource body for easy comparison later + hash := sha256.New().Sum([]byte(r.String())) + return fmt.Sprintf("%x", hash) +} + type NodePoolConfigInstancePlacement struct { empty bool `json:"-"` Tenancy *NodePoolConfigInstancePlacementTenancyEnum `json:"tenancy"` diff --git a/services/google/containeraws/alpha/node_pool.yaml b/services/google/containeraws/alpha/node_pool.yaml index 13df0bb043..e0793bf306 100755 --- a/services/google/containeraws/alpha/node_pool.yaml +++ b/services/google/containeraws/alpha/node_pool.yaml @@ -201,6 +201,25 @@ components: node pool. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.' x-kubernetes-immutable: true + proxyConfig: + type: object + x-dcl-go-name: ProxyConfig + x-dcl-go-type: NodePoolConfigProxyConfig + description: Proxy configuration for outbound HTTP(S) traffic. + required: + - secretArn + - secretVersion + properties: + secretArn: + type: string + x-dcl-go-name: SecretArn + description: The ARN of the AWS Secret Manager secret that contains + the HTTP(S) proxy configuration. + secretVersion: + type: string + x-dcl-go-name: SecretVersion + description: The version string of the AWS Secret Manager secret + that contains the HTTP(S) proxy configuration. rootVolume: type: object x-dcl-go-name: RootVolume diff --git a/services/google/containeraws/alpha/node_pool_alpha_yaml_embed.go b/services/google/containeraws/alpha/node_pool_alpha_yaml_embed.go index ca347a59c0..4c7455185a 100755 --- a/services/google/containeraws/alpha/node_pool_alpha_yaml_embed.go +++ b/services/google/containeraws/alpha/node_pool_alpha_yaml_embed.go @@ -17,7 +17,7 @@ package alpha // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/containeraws/alpha/node_pool.yaml -var YAML_node_pool = []byte("info:\n title: ContainerAws/NodePool\n description: An Anthos node pool running on AWS.\n x-dcl-struct-name: NodePool\n x-dcl-has-iam: false\n x-dcl-ref:\n text: API reference\n url: https://cloud.google.com/anthos/clusters/docs/multi-cloud/reference/rest/v1/projects.locations.awsClusters.awsNodePools\n x-dcl-guides:\n - text: Multicloud overview\n url: https://cloud.google.com/anthos/clusters/docs/multi-cloud\npaths:\n get:\n description: The function used to get information about a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n apply:\n description: The function used to apply information about a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n delete:\n description: The function used to delete a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n deleteAll:\n description: The function used to delete all NodePool\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: cluster\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many NodePool\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: cluster\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n NodePool:\n title: NodePool\n x-dcl-id: projects/{{project}}/locations/{{location}}/awsClusters/{{cluster}}/awsNodePools/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-iam: false\n type: object\n required:\n - name\n - version\n - config\n - autoscaling\n - subnetId\n - maxPodsConstraint\n - project\n - location\n - cluster\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: 'Optional. Annotations on the node pool. This field has the\n same restrictions as Kubernetes annotations. The total size of all keys\n and values combined is limited to 256k. Key can have 2 segments: prefix\n (optional) and name (required), separated by a slash (/). Prefix must\n be a DNS subdomain. Name must be 63 characters or less, begin and end\n with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics\n between.'\n autoscaling:\n type: object\n x-dcl-go-name: Autoscaling\n x-dcl-go-type: NodePoolAutoscaling\n description: Autoscaler configuration for this node pool.\n required:\n - minNodeCount\n - maxNodeCount\n properties:\n maxNodeCount:\n type: integer\n format: int64\n x-dcl-go-name: MaxNodeCount\n description: Maximum number of nodes in the NodePool. Must be >= min_node_count.\n minNodeCount:\n type: integer\n format: int64\n x-dcl-go-name: MinNodeCount\n description: Minimum number of nodes in the NodePool. Must be >= 1 and\n <= max_node_count.\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: The awsCluster for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkemulticloud/Cluster\n field: name\n parent: true\n config:\n type: object\n x-dcl-go-name: Config\n x-dcl-go-type: NodePoolConfig\n description: The configuration of the node pool.\n required:\n - iamInstanceProfile\n - configEncryption\n properties:\n configEncryption:\n type: object\n x-dcl-go-name: ConfigEncryption\n x-dcl-go-type: NodePoolConfigConfigEncryption\n description: The ARN of the AWS KMS key used to encrypt node pool configuration.\n required:\n - kmsKeyArn\n properties:\n kmsKeyArn:\n type: string\n x-dcl-go-name: KmsKeyArn\n description: The ARN of the AWS KMS key used to encrypt node pool\n configuration.\n iamInstanceProfile:\n type: string\n x-dcl-go-name: IamInstanceProfile\n description: The name of the AWS IAM role assigned to nodes in the pool.\n x-kubernetes-immutable: true\n imageType:\n type: string\n x-dcl-go-name: ImageType\n description: The OS image type to use on node pool instances.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n instancePlacement:\n type: object\n x-dcl-go-name: InstancePlacement\n x-dcl-go-type: NodePoolConfigInstancePlacement\n description: Details of placement information for an instance.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n properties:\n tenancy:\n type: string\n x-dcl-go-name: Tenancy\n x-dcl-go-type: NodePoolConfigInstancePlacementTenancyEnum\n description: 'The tenancy for the instance. Possible values: TENANCY_UNSPECIFIED,\n DEFAULT, DEDICATED, HOST'\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n enum:\n - TENANCY_UNSPECIFIED\n - DEFAULT\n - DEDICATED\n - HOST\n instanceType:\n type: string\n x-dcl-go-name: InstanceType\n description: Optional. The AWS instance type. When unspecified, it defaults\n to `m5.large`.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. The initial labels assigned to nodes of this\n node pool. An object containing a list of \"key\": value pairs. Example:\n { \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }.'\n x-kubernetes-immutable: true\n rootVolume:\n type: object\n x-dcl-go-name: RootVolume\n x-dcl-go-type: NodePoolConfigRootVolume\n description: Optional. Template for the root volume provisioned for\n node pool nodes. Volumes will be provisioned in the availability zone\n assigned to the node pool subnet. When unspecified, it defaults to\n 32 GiB with the GP2 volume type.\n x-dcl-server-default: true\n properties:\n iops:\n type: integer\n format: int64\n x-dcl-go-name: Iops\n description: Optional. The number of I/O operations per second (IOPS)\n to provision for GP3 volume.\n x-dcl-server-default: true\n kmsKeyArn:\n type: string\n x-dcl-go-name: KmsKeyArn\n description: Optional. The Amazon Resource Name (ARN) of the Customer\n Managed Key (CMK) used to encrypt AWS EBS volumes. If not specified,\n the default Amazon managed key associated to the AWS region where\n this cluster runs will be used.\n sizeGib:\n type: integer\n format: int64\n x-dcl-go-name: SizeGib\n description: Optional. The size of the volume, in GiBs. When unspecified,\n a default value is provided. See the specific reference in the\n parent resource.\n x-dcl-server-default: true\n volumeType:\n type: string\n x-dcl-go-name: VolumeType\n x-dcl-go-type: NodePoolConfigRootVolumeVolumeTypeEnum\n description: 'Optional. Type of the EBS volume. When unspecified,\n it defaults to GP2 volume. Possible values: VOLUME_TYPE_UNSPECIFIED,\n GP2, GP3'\n x-dcl-server-default: true\n enum:\n - VOLUME_TYPE_UNSPECIFIED\n - GP2\n - GP3\n securityGroupIds:\n type: array\n x-dcl-go-name: SecurityGroupIds\n description: Optional. The IDs of additional security groups to add\n to nodes in this pool. The manager will automatically create security\n groups with minimum rules needed for a functioning cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n sshConfig:\n type: object\n x-dcl-go-name: SshConfig\n x-dcl-go-type: NodePoolConfigSshConfig\n description: Optional. The SSH configuration.\n x-kubernetes-immutable: true\n required:\n - ec2KeyPair\n properties:\n ec2KeyPair:\n type: string\n x-dcl-go-name: Ec2KeyPair\n description: The name of the EC2 key pair used to login into cluster\n machines.\n x-kubernetes-immutable: true\n tags:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Tags\n description: Optional. Key/value metadata to assign to each underlying\n AWS resource. Specify at most 50 pairs containing alphanumerics, spaces,\n and symbols (.+-=_:@/). Keys can be up to 127 Unicode characters.\n Values can be up to 255 Unicode characters.\n x-kubernetes-immutable: true\n taints:\n type: array\n x-dcl-go-name: Taints\n description: Optional. The initial taints assigned to nodes of this\n node pool.\n x-kubernetes-immutable: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: NodePoolConfigTaints\n required:\n - key\n - value\n - effect\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n x-dcl-go-type: NodePoolConfigTaintsEffectEnum\n description: 'The taint effect. Possible values: EFFECT_UNSPECIFIED,\n NO_SCHEDULE, PREFER_NO_SCHEDULE, NO_EXECUTE'\n x-kubernetes-immutable: true\n enum:\n - EFFECT_UNSPECIFIED\n - NO_SCHEDULE\n - PREFER_NO_SCHEDULE\n - NO_EXECUTE\n key:\n type: string\n x-dcl-go-name: Key\n description: Key for the taint.\n x-kubernetes-immutable: true\n value:\n type: string\n x-dcl-go-name: Value\n description: Value for the taint.\n x-kubernetes-immutable: true\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. The time at which this node pool was created.\n x-kubernetes-immutable: true\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Allows clients to perform consistent read-modify-writes through\n optimistic concurrency control. May be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n maxPodsConstraint:\n type: object\n x-dcl-go-name: MaxPodsConstraint\n x-dcl-go-type: NodePoolMaxPodsConstraint\n description: The constraint on the maximum number of pods that can be run\n simultaneously on a node in the node pool.\n x-kubernetes-immutable: true\n required:\n - maxPodsPerNode\n properties:\n maxPodsPerNode:\n type: integer\n format: int64\n x-dcl-go-name: MaxPodsPerNode\n description: The maximum number of pods to schedule on a single node.\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of this resource.\n x-kubernetes-immutable: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n reconciling:\n type: boolean\n x-dcl-go-name: Reconciling\n readOnly: true\n description: Output only. If set, there are currently changes in flight\n to the node pool.\n x-kubernetes-immutable: true\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: NodePoolStateEnum\n readOnly: true\n description: 'Output only. The lifecycle state of the node pool. Possible\n values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING,\n ERROR, DEGRADED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - PROVISIONING\n - RUNNING\n - RECONCILING\n - STOPPING\n - ERROR\n - DEGRADED\n subnetId:\n type: string\n x-dcl-go-name: SubnetId\n description: The subnet where the node pool node run.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. A globally unique identifier for the node pool.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. The time at which this node pool was last updated.\n x-kubernetes-immutable: true\n version:\n type: string\n x-dcl-go-name: Version\n description: The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).\n You can list all supported versions on a given Google Cloud region by\n calling GetAwsServerConfig.\n") +var YAML_node_pool = []byte("info:\n title: ContainerAws/NodePool\n description: An Anthos node pool running on AWS.\n x-dcl-struct-name: NodePool\n x-dcl-has-iam: false\n x-dcl-ref:\n text: API reference\n url: https://cloud.google.com/anthos/clusters/docs/multi-cloud/reference/rest/v1/projects.locations.awsClusters.awsNodePools\n x-dcl-guides:\n - text: Multicloud overview\n url: https://cloud.google.com/anthos/clusters/docs/multi-cloud\npaths:\n get:\n description: The function used to get information about a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n apply:\n description: The function used to apply information about a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n delete:\n description: The function used to delete a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n deleteAll:\n description: The function used to delete all NodePool\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: cluster\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many NodePool\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: cluster\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n NodePool:\n title: NodePool\n x-dcl-id: projects/{{project}}/locations/{{location}}/awsClusters/{{cluster}}/awsNodePools/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-iam: false\n type: object\n required:\n - name\n - version\n - config\n - autoscaling\n - subnetId\n - maxPodsConstraint\n - project\n - location\n - cluster\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: 'Optional. Annotations on the node pool. This field has the\n same restrictions as Kubernetes annotations. The total size of all keys\n and values combined is limited to 256k. Key can have 2 segments: prefix\n (optional) and name (required), separated by a slash (/). Prefix must\n be a DNS subdomain. Name must be 63 characters or less, begin and end\n with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics\n between.'\n autoscaling:\n type: object\n x-dcl-go-name: Autoscaling\n x-dcl-go-type: NodePoolAutoscaling\n description: Autoscaler configuration for this node pool.\n required:\n - minNodeCount\n - maxNodeCount\n properties:\n maxNodeCount:\n type: integer\n format: int64\n x-dcl-go-name: MaxNodeCount\n description: Maximum number of nodes in the NodePool. Must be >= min_node_count.\n minNodeCount:\n type: integer\n format: int64\n x-dcl-go-name: MinNodeCount\n description: Minimum number of nodes in the NodePool. Must be >= 1 and\n <= max_node_count.\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: The awsCluster for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkemulticloud/Cluster\n field: name\n parent: true\n config:\n type: object\n x-dcl-go-name: Config\n x-dcl-go-type: NodePoolConfig\n description: The configuration of the node pool.\n required:\n - iamInstanceProfile\n - configEncryption\n properties:\n configEncryption:\n type: object\n x-dcl-go-name: ConfigEncryption\n x-dcl-go-type: NodePoolConfigConfigEncryption\n description: The ARN of the AWS KMS key used to encrypt node pool configuration.\n required:\n - kmsKeyArn\n properties:\n kmsKeyArn:\n type: string\n x-dcl-go-name: KmsKeyArn\n description: The ARN of the AWS KMS key used to encrypt node pool\n configuration.\n iamInstanceProfile:\n type: string\n x-dcl-go-name: IamInstanceProfile\n description: The name of the AWS IAM role assigned to nodes in the pool.\n x-kubernetes-immutable: true\n imageType:\n type: string\n x-dcl-go-name: ImageType\n description: The OS image type to use on node pool instances.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n instancePlacement:\n type: object\n x-dcl-go-name: InstancePlacement\n x-dcl-go-type: NodePoolConfigInstancePlacement\n description: Details of placement information for an instance.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n properties:\n tenancy:\n type: string\n x-dcl-go-name: Tenancy\n x-dcl-go-type: NodePoolConfigInstancePlacementTenancyEnum\n description: 'The tenancy for the instance. Possible values: TENANCY_UNSPECIFIED,\n DEFAULT, DEDICATED, HOST'\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n enum:\n - TENANCY_UNSPECIFIED\n - DEFAULT\n - DEDICATED\n - HOST\n instanceType:\n type: string\n x-dcl-go-name: InstanceType\n description: Optional. The AWS instance type. When unspecified, it defaults\n to `m5.large`.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. The initial labels assigned to nodes of this\n node pool. An object containing a list of \"key\": value pairs. Example:\n { \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }.'\n x-kubernetes-immutable: true\n proxyConfig:\n type: object\n x-dcl-go-name: ProxyConfig\n x-dcl-go-type: NodePoolConfigProxyConfig\n description: Proxy configuration for outbound HTTP(S) traffic.\n required:\n - secretArn\n - secretVersion\n properties:\n secretArn:\n type: string\n x-dcl-go-name: SecretArn\n description: The ARN of the AWS Secret Manager secret that contains\n the HTTP(S) proxy configuration.\n secretVersion:\n type: string\n x-dcl-go-name: SecretVersion\n description: The version string of the AWS Secret Manager secret\n that contains the HTTP(S) proxy configuration.\n rootVolume:\n type: object\n x-dcl-go-name: RootVolume\n x-dcl-go-type: NodePoolConfigRootVolume\n description: Optional. Template for the root volume provisioned for\n node pool nodes. Volumes will be provisioned in the availability zone\n assigned to the node pool subnet. When unspecified, it defaults to\n 32 GiB with the GP2 volume type.\n x-dcl-server-default: true\n properties:\n iops:\n type: integer\n format: int64\n x-dcl-go-name: Iops\n description: Optional. The number of I/O operations per second (IOPS)\n to provision for GP3 volume.\n x-dcl-server-default: true\n kmsKeyArn:\n type: string\n x-dcl-go-name: KmsKeyArn\n description: Optional. The Amazon Resource Name (ARN) of the Customer\n Managed Key (CMK) used to encrypt AWS EBS volumes. If not specified,\n the default Amazon managed key associated to the AWS region where\n this cluster runs will be used.\n sizeGib:\n type: integer\n format: int64\n x-dcl-go-name: SizeGib\n description: Optional. The size of the volume, in GiBs. When unspecified,\n a default value is provided. See the specific reference in the\n parent resource.\n x-dcl-server-default: true\n volumeType:\n type: string\n x-dcl-go-name: VolumeType\n x-dcl-go-type: NodePoolConfigRootVolumeVolumeTypeEnum\n description: 'Optional. Type of the EBS volume. When unspecified,\n it defaults to GP2 volume. Possible values: VOLUME_TYPE_UNSPECIFIED,\n GP2, GP3'\n x-dcl-server-default: true\n enum:\n - VOLUME_TYPE_UNSPECIFIED\n - GP2\n - GP3\n securityGroupIds:\n type: array\n x-dcl-go-name: SecurityGroupIds\n description: Optional. The IDs of additional security groups to add\n to nodes in this pool. The manager will automatically create security\n groups with minimum rules needed for a functioning cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n sshConfig:\n type: object\n x-dcl-go-name: SshConfig\n x-dcl-go-type: NodePoolConfigSshConfig\n description: Optional. The SSH configuration.\n x-kubernetes-immutable: true\n required:\n - ec2KeyPair\n properties:\n ec2KeyPair:\n type: string\n x-dcl-go-name: Ec2KeyPair\n description: The name of the EC2 key pair used to login into cluster\n machines.\n x-kubernetes-immutable: true\n tags:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Tags\n description: Optional. Key/value metadata to assign to each underlying\n AWS resource. Specify at most 50 pairs containing alphanumerics, spaces,\n and symbols (.+-=_:@/). Keys can be up to 127 Unicode characters.\n Values can be up to 255 Unicode characters.\n x-kubernetes-immutable: true\n taints:\n type: array\n x-dcl-go-name: Taints\n description: Optional. The initial taints assigned to nodes of this\n node pool.\n x-kubernetes-immutable: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: NodePoolConfigTaints\n required:\n - key\n - value\n - effect\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n x-dcl-go-type: NodePoolConfigTaintsEffectEnum\n description: 'The taint effect. Possible values: EFFECT_UNSPECIFIED,\n NO_SCHEDULE, PREFER_NO_SCHEDULE, NO_EXECUTE'\n x-kubernetes-immutable: true\n enum:\n - EFFECT_UNSPECIFIED\n - NO_SCHEDULE\n - PREFER_NO_SCHEDULE\n - NO_EXECUTE\n key:\n type: string\n x-dcl-go-name: Key\n description: Key for the taint.\n x-kubernetes-immutable: true\n value:\n type: string\n x-dcl-go-name: Value\n description: Value for the taint.\n x-kubernetes-immutable: true\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. The time at which this node pool was created.\n x-kubernetes-immutable: true\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Allows clients to perform consistent read-modify-writes through\n optimistic concurrency control. May be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n maxPodsConstraint:\n type: object\n x-dcl-go-name: MaxPodsConstraint\n x-dcl-go-type: NodePoolMaxPodsConstraint\n description: The constraint on the maximum number of pods that can be run\n simultaneously on a node in the node pool.\n x-kubernetes-immutable: true\n required:\n - maxPodsPerNode\n properties:\n maxPodsPerNode:\n type: integer\n format: int64\n x-dcl-go-name: MaxPodsPerNode\n description: The maximum number of pods to schedule on a single node.\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of this resource.\n x-kubernetes-immutable: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n reconciling:\n type: boolean\n x-dcl-go-name: Reconciling\n readOnly: true\n description: Output only. If set, there are currently changes in flight\n to the node pool.\n x-kubernetes-immutable: true\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: NodePoolStateEnum\n readOnly: true\n description: 'Output only. The lifecycle state of the node pool. Possible\n values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING,\n ERROR, DEGRADED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - PROVISIONING\n - RUNNING\n - RECONCILING\n - STOPPING\n - ERROR\n - DEGRADED\n subnetId:\n type: string\n x-dcl-go-name: SubnetId\n description: The subnet where the node pool node run.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. A globally unique identifier for the node pool.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. The time at which this node pool was last updated.\n x-kubernetes-immutable: true\n version:\n type: string\n x-dcl-go-name: Version\n description: The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).\n You can list all supported versions on a given Google Cloud region by\n calling GetAwsServerConfig.\n") -// 15598 bytes -// MD5: 14be79dc4435f9c592db7a37167af9fd +// 16428 bytes +// MD5: 2ac0713d5fcc7de77dccb449aa140a92 diff --git a/services/google/containeraws/alpha/node_pool_internal.go b/services/google/containeraws/alpha/node_pool_internal.go index cd70ee995d..eeea39995e 100755 --- a/services/google/containeraws/alpha/node_pool_internal.go +++ b/services/google/containeraws/alpha/node_pool_internal.go @@ -94,6 +94,11 @@ func (r *NodePoolConfig) validate() error { return err } } + if !dcl.IsEmptyValueIndirect(r.ProxyConfig) { + if err := r.ProxyConfig.validate(); err != nil { + return err + } + } if !dcl.IsEmptyValueIndirect(r.InstancePlacement) { if err := r.InstancePlacement.validate(); err != nil { return err @@ -128,6 +133,15 @@ func (r *NodePoolConfigSshConfig) validate() error { } return nil } +func (r *NodePoolConfigProxyConfig) validate() error { + if err := dcl.Required(r, "secretArn"); err != nil { + return err + } + if err := dcl.Required(r, "secretVersion"); err != nil { + return err + } + return nil +} func (r *NodePoolConfigInstancePlacement) validate() error { return nil } @@ -766,6 +780,7 @@ func canonicalizeNodePoolConfig(des, initial *NodePoolConfig, opts ...dcl.ApplyO } else { cDes.SecurityGroupIds = des.SecurityGroupIds } + cDes.ProxyConfig = canonicalizeNodePoolConfigProxyConfig(des.ProxyConfig, initial.ProxyConfig, opts...) cDes.InstancePlacement = canonicalizeNodePoolConfigInstancePlacement(des.InstancePlacement, initial.InstancePlacement, opts...) if dcl.StringCanonicalize(des.ImageType, initial.ImageType) || dcl.IsZeroValue(des.ImageType) { cDes.ImageType = initial.ImageType @@ -831,6 +846,7 @@ func canonicalizeNewNodePoolConfig(c *Client, des, nw *NodePoolConfig) *NodePool if dcl.StringArrayCanonicalize(des.SecurityGroupIds, nw.SecurityGroupIds) { nw.SecurityGroupIds = des.SecurityGroupIds } + nw.ProxyConfig = canonicalizeNewNodePoolConfigProxyConfig(c, des.ProxyConfig, nw.ProxyConfig) nw.InstancePlacement = canonicalizeNewNodePoolConfigInstancePlacement(c, des.InstancePlacement, nw.InstancePlacement) if dcl.StringCanonicalize(des.ImageType, nw.ImageType) { nw.ImageType = des.ImageType @@ -1374,6 +1390,129 @@ func canonicalizeNewNodePoolConfigSshConfigSlice(c *Client, des, nw []NodePoolCo return items } +func canonicalizeNodePoolConfigProxyConfig(des, initial *NodePoolConfigProxyConfig, opts ...dcl.ApplyOption) *NodePoolConfigProxyConfig { + if des == nil { + return initial + } + if des.empty { + return des + } + + if initial == nil { + return des + } + + cDes := &NodePoolConfigProxyConfig{} + + if dcl.StringCanonicalize(des.SecretArn, initial.SecretArn) || dcl.IsZeroValue(des.SecretArn) { + cDes.SecretArn = initial.SecretArn + } else { + cDes.SecretArn = des.SecretArn + } + if dcl.StringCanonicalize(des.SecretVersion, initial.SecretVersion) || dcl.IsZeroValue(des.SecretVersion) { + cDes.SecretVersion = initial.SecretVersion + } else { + cDes.SecretVersion = des.SecretVersion + } + + return cDes +} + +func canonicalizeNodePoolConfigProxyConfigSlice(des, initial []NodePoolConfigProxyConfig, opts ...dcl.ApplyOption) []NodePoolConfigProxyConfig { + if dcl.IsEmptyValueIndirect(des) { + return initial + } + + if len(des) != len(initial) { + + items := make([]NodePoolConfigProxyConfig, 0, len(des)) + for _, d := range des { + cd := canonicalizeNodePoolConfigProxyConfig(&d, nil, opts...) + if cd != nil { + items = append(items, *cd) + } + } + return items + } + + items := make([]NodePoolConfigProxyConfig, 0, len(des)) + for i, d := range des { + cd := canonicalizeNodePoolConfigProxyConfig(&d, &initial[i], opts...) + if cd != nil { + items = append(items, *cd) + } + } + return items + +} + +func canonicalizeNewNodePoolConfigProxyConfig(c *Client, des, nw *NodePoolConfigProxyConfig) *NodePoolConfigProxyConfig { + + if des == nil { + return nw + } + + if nw == nil { + if dcl.IsNotReturnedByServer(des) { + c.Config.Logger.Info("Found explicitly empty value for NodePoolConfigProxyConfig while comparing non-nil desired to nil actual. Returning desired object.") + return des + } + return nil + } + + if dcl.StringCanonicalize(des.SecretArn, nw.SecretArn) { + nw.SecretArn = des.SecretArn + } + if dcl.StringCanonicalize(des.SecretVersion, nw.SecretVersion) { + nw.SecretVersion = des.SecretVersion + } + + return nw +} + +func canonicalizeNewNodePoolConfigProxyConfigSet(c *Client, des, nw []NodePoolConfigProxyConfig) []NodePoolConfigProxyConfig { + if des == nil { + return nw + } + var reorderedNew []NodePoolConfigProxyConfig + for _, d := range des { + matchedNew := -1 + for idx, n := range nw { + if diffs, _ := compareNodePoolConfigProxyConfigNewStyle(&d, &n, dcl.FieldName{}); len(diffs) == 0 { + matchedNew = idx + break + } + } + if matchedNew != -1 { + reorderedNew = append(reorderedNew, nw[matchedNew]) + nw = append(nw[:matchedNew], nw[matchedNew+1:]...) + } + } + reorderedNew = append(reorderedNew, nw...) + + return reorderedNew +} + +func canonicalizeNewNodePoolConfigProxyConfigSlice(c *Client, des, nw []NodePoolConfigProxyConfig) []NodePoolConfigProxyConfig { + if des == nil { + return nw + } + + // Lengths are unequal. A diff will occur later, so we shouldn't canonicalize. + // Return the original array. + if len(des) != len(nw) { + return nw + } + + var items []NodePoolConfigProxyConfig + for i, d := range des { + n := nw[i] + items = append(items, *canonicalizeNewNodePoolConfigProxyConfig(c, &d, &n)) + } + + return items +} + func canonicalizeNodePoolConfigInstancePlacement(des, initial *NodePoolConfigInstancePlacement, opts ...dcl.ApplyOption) *NodePoolConfigInstancePlacement { if des == nil { return initial @@ -1931,6 +2070,13 @@ func compareNodePoolConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.F diffs = append(diffs, ds...) } + if ds, err := dcl.Diff(desired.ProxyConfig, actual.ProxyConfig, dcl.Info{ObjectFunction: compareNodePoolConfigProxyConfigNewStyle, EmptyObject: EmptyNodePoolConfigProxyConfig, OperationSelector: dcl.TriggersOperation("updateNodePoolUpdateAwsNodePoolOperation")}, fn.AddNest("ProxyConfig")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + if ds, err := dcl.Diff(desired.InstancePlacement, actual.InstancePlacement, dcl.Info{ObjectFunction: compareNodePoolConfigInstancePlacementNewStyle, EmptyObject: EmptyNodePoolConfigInstancePlacement, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("InstancePlacement")); len(ds) != 0 || err != nil { if err != nil { return nil, err @@ -2098,6 +2244,42 @@ func compareNodePoolConfigSshConfigNewStyle(d, a interface{}, fn dcl.FieldName) return diffs, nil } +func compareNodePoolConfigProxyConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) { + var diffs []*dcl.FieldDiff + + desired, ok := d.(*NodePoolConfigProxyConfig) + if !ok { + desiredNotPointer, ok := d.(NodePoolConfigProxyConfig) + if !ok { + return nil, fmt.Errorf("obj %v is not a NodePoolConfigProxyConfig or *NodePoolConfigProxyConfig", d) + } + desired = &desiredNotPointer + } + actual, ok := a.(*NodePoolConfigProxyConfig) + if !ok { + actualNotPointer, ok := a.(NodePoolConfigProxyConfig) + if !ok { + return nil, fmt.Errorf("obj %v is not a NodePoolConfigProxyConfig", a) + } + actual = &actualNotPointer + } + + if ds, err := dcl.Diff(desired.SecretArn, actual.SecretArn, dcl.Info{OperationSelector: dcl.TriggersOperation("updateNodePoolUpdateAwsNodePoolOperation")}, fn.AddNest("SecretArn")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + + if ds, err := dcl.Diff(desired.SecretVersion, actual.SecretVersion, dcl.Info{OperationSelector: dcl.TriggersOperation("updateNodePoolUpdateAwsNodePoolOperation")}, fn.AddNest("SecretVersion")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + return diffs, nil +} + func compareNodePoolConfigInstancePlacementNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) { var diffs []*dcl.FieldDiff @@ -2463,6 +2645,11 @@ func expandNodePoolConfig(c *Client, f *NodePoolConfig, res *NodePool) (map[stri if v := f.SecurityGroupIds; v != nil { m["securityGroupIds"] = v } + if v, err := expandNodePoolConfigProxyConfig(c, f.ProxyConfig, res); err != nil { + return nil, fmt.Errorf("error expanding ProxyConfig into proxyConfig: %w", err) + } else if !dcl.IsEmptyValueIndirect(v) { + m["proxyConfig"] = v + } if v, err := expandNodePoolConfigInstancePlacement(c, f.InstancePlacement, res); err != nil { return nil, fmt.Errorf("error expanding InstancePlacement into instancePlacement: %w", err) } else if !dcl.IsEmptyValueIndirect(v) { @@ -2497,6 +2684,7 @@ func flattenNodePoolConfig(c *Client, i interface{}, res *NodePool) *NodePoolCon r.ConfigEncryption = flattenNodePoolConfigConfigEncryption(c, m["configEncryption"], res) r.SshConfig = flattenNodePoolConfigSshConfig(c, m["sshConfig"], res) r.SecurityGroupIds = dcl.FlattenStringSlice(m["securityGroupIds"]) + r.ProxyConfig = flattenNodePoolConfigProxyConfig(c, m["proxyConfig"], res) r.InstancePlacement = flattenNodePoolConfigInstancePlacement(c, m["instancePlacement"], res) r.ImageType = dcl.FlattenString(m["imageType"]) @@ -2979,6 +3167,124 @@ func flattenNodePoolConfigSshConfig(c *Client, i interface{}, res *NodePool) *No return r } +// expandNodePoolConfigProxyConfigMap expands the contents of NodePoolConfigProxyConfig into a JSON +// request object. +func expandNodePoolConfigProxyConfigMap(c *Client, f map[string]NodePoolConfigProxyConfig, res *NodePool) (map[string]interface{}, error) { + if f == nil { + return nil, nil + } + + items := make(map[string]interface{}) + for k, item := range f { + i, err := expandNodePoolConfigProxyConfig(c, &item, res) + if err != nil { + return nil, err + } + if i != nil { + items[k] = i + } + } + + return items, nil +} + +// expandNodePoolConfigProxyConfigSlice expands the contents of NodePoolConfigProxyConfig into a JSON +// request object. +func expandNodePoolConfigProxyConfigSlice(c *Client, f []NodePoolConfigProxyConfig, res *NodePool) ([]map[string]interface{}, error) { + if f == nil { + return nil, nil + } + + items := []map[string]interface{}{} + for _, item := range f { + i, err := expandNodePoolConfigProxyConfig(c, &item, res) + if err != nil { + return nil, err + } + + items = append(items, i) + } + + return items, nil +} + +// flattenNodePoolConfigProxyConfigMap flattens the contents of NodePoolConfigProxyConfig from a JSON +// response object. +func flattenNodePoolConfigProxyConfigMap(c *Client, i interface{}, res *NodePool) map[string]NodePoolConfigProxyConfig { + a, ok := i.(map[string]interface{}) + if !ok { + return map[string]NodePoolConfigProxyConfig{} + } + + if len(a) == 0 { + return map[string]NodePoolConfigProxyConfig{} + } + + items := make(map[string]NodePoolConfigProxyConfig) + for k, item := range a { + items[k] = *flattenNodePoolConfigProxyConfig(c, item.(map[string]interface{}), res) + } + + return items +} + +// flattenNodePoolConfigProxyConfigSlice flattens the contents of NodePoolConfigProxyConfig from a JSON +// response object. +func flattenNodePoolConfigProxyConfigSlice(c *Client, i interface{}, res *NodePool) []NodePoolConfigProxyConfig { + a, ok := i.([]interface{}) + if !ok { + return []NodePoolConfigProxyConfig{} + } + + if len(a) == 0 { + return []NodePoolConfigProxyConfig{} + } + + items := make([]NodePoolConfigProxyConfig, 0, len(a)) + for _, item := range a { + items = append(items, *flattenNodePoolConfigProxyConfig(c, item.(map[string]interface{}), res)) + } + + return items +} + +// expandNodePoolConfigProxyConfig expands an instance of NodePoolConfigProxyConfig into a JSON +// request object. +func expandNodePoolConfigProxyConfig(c *Client, f *NodePoolConfigProxyConfig, res *NodePool) (map[string]interface{}, error) { + if dcl.IsEmptyValueIndirect(f) { + return nil, nil + } + + m := make(map[string]interface{}) + if v := f.SecretArn; !dcl.IsEmptyValueIndirect(v) { + m["secretArn"] = v + } + if v := f.SecretVersion; !dcl.IsEmptyValueIndirect(v) { + m["secretVersion"] = v + } + + return m, nil +} + +// flattenNodePoolConfigProxyConfig flattens an instance of NodePoolConfigProxyConfig from a JSON +// response object. +func flattenNodePoolConfigProxyConfig(c *Client, i interface{}, res *NodePool) *NodePoolConfigProxyConfig { + m, ok := i.(map[string]interface{}) + if !ok { + return nil + } + + r := &NodePoolConfigProxyConfig{} + + if dcl.IsEmptyValueIndirect(i) { + return EmptyNodePoolConfigProxyConfig + } + r.SecretArn = dcl.FlattenString(m["secretArn"]) + r.SecretVersion = dcl.FlattenString(m["secretVersion"]) + + return r +} + // expandNodePoolConfigInstancePlacementMap expands the contents of NodePoolConfigInstancePlacement into a JSON // request object. func expandNodePoolConfigInstancePlacementMap(c *Client, f map[string]NodePoolConfigInstancePlacement, res *NodePool) (map[string]interface{}, error) { @@ -3698,6 +4004,17 @@ func extractNodePoolConfigFields(r *NodePool, o *NodePoolConfig) error { if !dcl.IsNotReturnedByServer(vSshConfig) { o.SshConfig = vSshConfig } + vProxyConfig := o.ProxyConfig + if vProxyConfig == nil { + // note: explicitly not the empty object. + vProxyConfig = &NodePoolConfigProxyConfig{} + } + if err := extractNodePoolConfigProxyConfigFields(r, vProxyConfig); err != nil { + return err + } + if !dcl.IsNotReturnedByServer(vProxyConfig) { + o.ProxyConfig = vProxyConfig + } vInstancePlacement := o.InstancePlacement if vInstancePlacement == nil { // note: explicitly not the empty object. @@ -3723,6 +4040,9 @@ func extractNodePoolConfigConfigEncryptionFields(r *NodePool, o *NodePoolConfigC func extractNodePoolConfigSshConfigFields(r *NodePool, o *NodePoolConfigSshConfig) error { return nil } +func extractNodePoolConfigProxyConfigFields(r *NodePool, o *NodePoolConfigProxyConfig) error { + return nil +} func extractNodePoolConfigInstancePlacementFields(r *NodePool, o *NodePoolConfigInstancePlacement) error { return nil } @@ -3803,6 +4123,17 @@ func postReadExtractNodePoolConfigFields(r *NodePool, o *NodePoolConfig) error { if !dcl.IsNotReturnedByServer(vSshConfig) { o.SshConfig = vSshConfig } + vProxyConfig := o.ProxyConfig + if vProxyConfig == nil { + // note: explicitly not the empty object. + vProxyConfig = &NodePoolConfigProxyConfig{} + } + if err := extractNodePoolConfigProxyConfigFields(r, vProxyConfig); err != nil { + return err + } + if !dcl.IsNotReturnedByServer(vProxyConfig) { + o.ProxyConfig = vProxyConfig + } vInstancePlacement := o.InstancePlacement if vInstancePlacement == nil { // note: explicitly not the empty object. @@ -3828,6 +4159,9 @@ func postReadExtractNodePoolConfigConfigEncryptionFields(r *NodePool, o *NodePoo func postReadExtractNodePoolConfigSshConfigFields(r *NodePool, o *NodePoolConfigSshConfig) error { return nil } +func postReadExtractNodePoolConfigProxyConfigFields(r *NodePool, o *NodePoolConfigProxyConfig) error { + return nil +} func postReadExtractNodePoolConfigInstancePlacementFields(r *NodePool, o *NodePoolConfigInstancePlacement) error { return nil } diff --git a/services/google/containeraws/beta/node_pool.go b/services/google/containeraws/beta/node_pool.go index b19c93691f..448c133e12 100755 --- a/services/google/containeraws/beta/node_pool.go +++ b/services/google/containeraws/beta/node_pool.go @@ -166,6 +166,7 @@ type NodePoolConfig struct { ConfigEncryption *NodePoolConfigConfigEncryption `json:"configEncryption"` SshConfig *NodePoolConfigSshConfig `json:"sshConfig"` SecurityGroupIds []string `json:"securityGroupIds"` + ProxyConfig *NodePoolConfigProxyConfig `json:"proxyConfig"` InstancePlacement *NodePoolConfigInstancePlacement `json:"instancePlacement"` ImageType *string `json:"imageType"` } @@ -203,6 +204,8 @@ func (r *NodePoolConfig) UnmarshalJSON(data []byte) error { r.SecurityGroupIds = res.SecurityGroupIds + r.ProxyConfig = res.ProxyConfig + r.InstancePlacement = res.InstancePlacement r.ImageType = res.ImageType @@ -430,6 +433,55 @@ func (r *NodePoolConfigSshConfig) HashCode() string { return fmt.Sprintf("%x", hash) } +type NodePoolConfigProxyConfig struct { + empty bool `json:"-"` + SecretArn *string `json:"secretArn"` + SecretVersion *string `json:"secretVersion"` +} + +type jsonNodePoolConfigProxyConfig NodePoolConfigProxyConfig + +func (r *NodePoolConfigProxyConfig) UnmarshalJSON(data []byte) error { + var res jsonNodePoolConfigProxyConfig + if err := json.Unmarshal(data, &res); err != nil { + return err + } + + var m map[string]interface{} + json.Unmarshal(data, &m) + + if len(m) == 0 { + *r = *EmptyNodePoolConfigProxyConfig + } else { + + r.SecretArn = res.SecretArn + + r.SecretVersion = res.SecretVersion + + } + return nil +} + +// This object is used to assert a desired state where this NodePoolConfigProxyConfig is +// empty. Go lacks global const objects, but this object should be treated +// as one. Modifying this object will have undesirable results. +var EmptyNodePoolConfigProxyConfig *NodePoolConfigProxyConfig = &NodePoolConfigProxyConfig{empty: true} + +func (r *NodePoolConfigProxyConfig) Empty() bool { + return r.empty +} + +func (r *NodePoolConfigProxyConfig) String() string { + return dcl.SprintResource(r) +} + +func (r *NodePoolConfigProxyConfig) HashCode() string { + // Placeholder for a more complex hash method that handles ordering, etc + // Hash resource body for easy comparison later + hash := sha256.New().Sum([]byte(r.String())) + return fmt.Sprintf("%x", hash) +} + type NodePoolConfigInstancePlacement struct { empty bool `json:"-"` Tenancy *NodePoolConfigInstancePlacementTenancyEnum `json:"tenancy"` diff --git a/services/google/containeraws/beta/node_pool.yaml b/services/google/containeraws/beta/node_pool.yaml index 13df0bb043..e0793bf306 100755 --- a/services/google/containeraws/beta/node_pool.yaml +++ b/services/google/containeraws/beta/node_pool.yaml @@ -201,6 +201,25 @@ components: node pool. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.' x-kubernetes-immutable: true + proxyConfig: + type: object + x-dcl-go-name: ProxyConfig + x-dcl-go-type: NodePoolConfigProxyConfig + description: Proxy configuration for outbound HTTP(S) traffic. + required: + - secretArn + - secretVersion + properties: + secretArn: + type: string + x-dcl-go-name: SecretArn + description: The ARN of the AWS Secret Manager secret that contains + the HTTP(S) proxy configuration. + secretVersion: + type: string + x-dcl-go-name: SecretVersion + description: The version string of the AWS Secret Manager secret + that contains the HTTP(S) proxy configuration. rootVolume: type: object x-dcl-go-name: RootVolume diff --git a/services/google/containeraws/beta/node_pool_beta_yaml_embed.go b/services/google/containeraws/beta/node_pool_beta_yaml_embed.go index abb6996dfd..45ddee12be 100755 --- a/services/google/containeraws/beta/node_pool_beta_yaml_embed.go +++ b/services/google/containeraws/beta/node_pool_beta_yaml_embed.go @@ -17,7 +17,7 @@ package beta // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/containeraws/beta/node_pool.yaml -var YAML_node_pool = []byte("info:\n title: ContainerAws/NodePool\n description: An Anthos node pool running on AWS.\n x-dcl-struct-name: NodePool\n x-dcl-has-iam: false\n x-dcl-ref:\n text: API reference\n url: https://cloud.google.com/anthos/clusters/docs/multi-cloud/reference/rest/v1/projects.locations.awsClusters.awsNodePools\n x-dcl-guides:\n - text: Multicloud overview\n url: https://cloud.google.com/anthos/clusters/docs/multi-cloud\npaths:\n get:\n description: The function used to get information about a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n apply:\n description: The function used to apply information about a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n delete:\n description: The function used to delete a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n deleteAll:\n description: The function used to delete all NodePool\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: cluster\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many NodePool\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: cluster\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n NodePool:\n title: NodePool\n x-dcl-id: projects/{{project}}/locations/{{location}}/awsClusters/{{cluster}}/awsNodePools/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-iam: false\n type: object\n required:\n - name\n - version\n - config\n - autoscaling\n - subnetId\n - maxPodsConstraint\n - project\n - location\n - cluster\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: 'Optional. Annotations on the node pool. This field has the\n same restrictions as Kubernetes annotations. The total size of all keys\n and values combined is limited to 256k. Key can have 2 segments: prefix\n (optional) and name (required), separated by a slash (/). Prefix must\n be a DNS subdomain. Name must be 63 characters or less, begin and end\n with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics\n between.'\n autoscaling:\n type: object\n x-dcl-go-name: Autoscaling\n x-dcl-go-type: NodePoolAutoscaling\n description: Autoscaler configuration for this node pool.\n required:\n - minNodeCount\n - maxNodeCount\n properties:\n maxNodeCount:\n type: integer\n format: int64\n x-dcl-go-name: MaxNodeCount\n description: Maximum number of nodes in the NodePool. Must be >= min_node_count.\n minNodeCount:\n type: integer\n format: int64\n x-dcl-go-name: MinNodeCount\n description: Minimum number of nodes in the NodePool. Must be >= 1 and\n <= max_node_count.\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: The awsCluster for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkemulticloud/Cluster\n field: name\n parent: true\n config:\n type: object\n x-dcl-go-name: Config\n x-dcl-go-type: NodePoolConfig\n description: The configuration of the node pool.\n required:\n - iamInstanceProfile\n - configEncryption\n properties:\n configEncryption:\n type: object\n x-dcl-go-name: ConfigEncryption\n x-dcl-go-type: NodePoolConfigConfigEncryption\n description: The ARN of the AWS KMS key used to encrypt node pool configuration.\n required:\n - kmsKeyArn\n properties:\n kmsKeyArn:\n type: string\n x-dcl-go-name: KmsKeyArn\n description: The ARN of the AWS KMS key used to encrypt node pool\n configuration.\n iamInstanceProfile:\n type: string\n x-dcl-go-name: IamInstanceProfile\n description: The name of the AWS IAM role assigned to nodes in the pool.\n x-kubernetes-immutable: true\n imageType:\n type: string\n x-dcl-go-name: ImageType\n description: The OS image type to use on node pool instances.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n instancePlacement:\n type: object\n x-dcl-go-name: InstancePlacement\n x-dcl-go-type: NodePoolConfigInstancePlacement\n description: Details of placement information for an instance.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n properties:\n tenancy:\n type: string\n x-dcl-go-name: Tenancy\n x-dcl-go-type: NodePoolConfigInstancePlacementTenancyEnum\n description: 'The tenancy for the instance. Possible values: TENANCY_UNSPECIFIED,\n DEFAULT, DEDICATED, HOST'\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n enum:\n - TENANCY_UNSPECIFIED\n - DEFAULT\n - DEDICATED\n - HOST\n instanceType:\n type: string\n x-dcl-go-name: InstanceType\n description: Optional. The AWS instance type. When unspecified, it defaults\n to `m5.large`.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. The initial labels assigned to nodes of this\n node pool. An object containing a list of \"key\": value pairs. Example:\n { \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }.'\n x-kubernetes-immutable: true\n rootVolume:\n type: object\n x-dcl-go-name: RootVolume\n x-dcl-go-type: NodePoolConfigRootVolume\n description: Optional. Template for the root volume provisioned for\n node pool nodes. Volumes will be provisioned in the availability zone\n assigned to the node pool subnet. When unspecified, it defaults to\n 32 GiB with the GP2 volume type.\n x-dcl-server-default: true\n properties:\n iops:\n type: integer\n format: int64\n x-dcl-go-name: Iops\n description: Optional. The number of I/O operations per second (IOPS)\n to provision for GP3 volume.\n x-dcl-server-default: true\n kmsKeyArn:\n type: string\n x-dcl-go-name: KmsKeyArn\n description: Optional. The Amazon Resource Name (ARN) of the Customer\n Managed Key (CMK) used to encrypt AWS EBS volumes. If not specified,\n the default Amazon managed key associated to the AWS region where\n this cluster runs will be used.\n sizeGib:\n type: integer\n format: int64\n x-dcl-go-name: SizeGib\n description: Optional. The size of the volume, in GiBs. When unspecified,\n a default value is provided. See the specific reference in the\n parent resource.\n x-dcl-server-default: true\n volumeType:\n type: string\n x-dcl-go-name: VolumeType\n x-dcl-go-type: NodePoolConfigRootVolumeVolumeTypeEnum\n description: 'Optional. Type of the EBS volume. When unspecified,\n it defaults to GP2 volume. Possible values: VOLUME_TYPE_UNSPECIFIED,\n GP2, GP3'\n x-dcl-server-default: true\n enum:\n - VOLUME_TYPE_UNSPECIFIED\n - GP2\n - GP3\n securityGroupIds:\n type: array\n x-dcl-go-name: SecurityGroupIds\n description: Optional. The IDs of additional security groups to add\n to nodes in this pool. The manager will automatically create security\n groups with minimum rules needed for a functioning cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n sshConfig:\n type: object\n x-dcl-go-name: SshConfig\n x-dcl-go-type: NodePoolConfigSshConfig\n description: Optional. The SSH configuration.\n x-kubernetes-immutable: true\n required:\n - ec2KeyPair\n properties:\n ec2KeyPair:\n type: string\n x-dcl-go-name: Ec2KeyPair\n description: The name of the EC2 key pair used to login into cluster\n machines.\n x-kubernetes-immutable: true\n tags:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Tags\n description: Optional. Key/value metadata to assign to each underlying\n AWS resource. Specify at most 50 pairs containing alphanumerics, spaces,\n and symbols (.+-=_:@/). Keys can be up to 127 Unicode characters.\n Values can be up to 255 Unicode characters.\n x-kubernetes-immutable: true\n taints:\n type: array\n x-dcl-go-name: Taints\n description: Optional. The initial taints assigned to nodes of this\n node pool.\n x-kubernetes-immutable: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: NodePoolConfigTaints\n required:\n - key\n - value\n - effect\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n x-dcl-go-type: NodePoolConfigTaintsEffectEnum\n description: 'The taint effect. Possible values: EFFECT_UNSPECIFIED,\n NO_SCHEDULE, PREFER_NO_SCHEDULE, NO_EXECUTE'\n x-kubernetes-immutable: true\n enum:\n - EFFECT_UNSPECIFIED\n - NO_SCHEDULE\n - PREFER_NO_SCHEDULE\n - NO_EXECUTE\n key:\n type: string\n x-dcl-go-name: Key\n description: Key for the taint.\n x-kubernetes-immutable: true\n value:\n type: string\n x-dcl-go-name: Value\n description: Value for the taint.\n x-kubernetes-immutable: true\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. The time at which this node pool was created.\n x-kubernetes-immutable: true\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Allows clients to perform consistent read-modify-writes through\n optimistic concurrency control. May be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n maxPodsConstraint:\n type: object\n x-dcl-go-name: MaxPodsConstraint\n x-dcl-go-type: NodePoolMaxPodsConstraint\n description: The constraint on the maximum number of pods that can be run\n simultaneously on a node in the node pool.\n x-kubernetes-immutable: true\n required:\n - maxPodsPerNode\n properties:\n maxPodsPerNode:\n type: integer\n format: int64\n x-dcl-go-name: MaxPodsPerNode\n description: The maximum number of pods to schedule on a single node.\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of this resource.\n x-kubernetes-immutable: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n reconciling:\n type: boolean\n x-dcl-go-name: Reconciling\n readOnly: true\n description: Output only. If set, there are currently changes in flight\n to the node pool.\n x-kubernetes-immutable: true\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: NodePoolStateEnum\n readOnly: true\n description: 'Output only. The lifecycle state of the node pool. Possible\n values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING,\n ERROR, DEGRADED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - PROVISIONING\n - RUNNING\n - RECONCILING\n - STOPPING\n - ERROR\n - DEGRADED\n subnetId:\n type: string\n x-dcl-go-name: SubnetId\n description: The subnet where the node pool node run.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. A globally unique identifier for the node pool.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. The time at which this node pool was last updated.\n x-kubernetes-immutable: true\n version:\n type: string\n x-dcl-go-name: Version\n description: The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).\n You can list all supported versions on a given Google Cloud region by\n calling GetAwsServerConfig.\n") +var YAML_node_pool = []byte("info:\n title: ContainerAws/NodePool\n description: An Anthos node pool running on AWS.\n x-dcl-struct-name: NodePool\n x-dcl-has-iam: false\n x-dcl-ref:\n text: API reference\n url: https://cloud.google.com/anthos/clusters/docs/multi-cloud/reference/rest/v1/projects.locations.awsClusters.awsNodePools\n x-dcl-guides:\n - text: Multicloud overview\n url: https://cloud.google.com/anthos/clusters/docs/multi-cloud\npaths:\n get:\n description: The function used to get information about a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n apply:\n description: The function used to apply information about a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n delete:\n description: The function used to delete a NodePool\n parameters:\n - name: NodePool\n required: true\n description: A full instance of a NodePool\n deleteAll:\n description: The function used to delete all NodePool\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: cluster\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many NodePool\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: cluster\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n NodePool:\n title: NodePool\n x-dcl-id: projects/{{project}}/locations/{{location}}/awsClusters/{{cluster}}/awsNodePools/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-iam: false\n type: object\n required:\n - name\n - version\n - config\n - autoscaling\n - subnetId\n - maxPodsConstraint\n - project\n - location\n - cluster\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: 'Optional. Annotations on the node pool. This field has the\n same restrictions as Kubernetes annotations. The total size of all keys\n and values combined is limited to 256k. Key can have 2 segments: prefix\n (optional) and name (required), separated by a slash (/). Prefix must\n be a DNS subdomain. Name must be 63 characters or less, begin and end\n with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics\n between.'\n autoscaling:\n type: object\n x-dcl-go-name: Autoscaling\n x-dcl-go-type: NodePoolAutoscaling\n description: Autoscaler configuration for this node pool.\n required:\n - minNodeCount\n - maxNodeCount\n properties:\n maxNodeCount:\n type: integer\n format: int64\n x-dcl-go-name: MaxNodeCount\n description: Maximum number of nodes in the NodePool. Must be >= min_node_count.\n minNodeCount:\n type: integer\n format: int64\n x-dcl-go-name: MinNodeCount\n description: Minimum number of nodes in the NodePool. Must be >= 1 and\n <= max_node_count.\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: The awsCluster for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkemulticloud/Cluster\n field: name\n parent: true\n config:\n type: object\n x-dcl-go-name: Config\n x-dcl-go-type: NodePoolConfig\n description: The configuration of the node pool.\n required:\n - iamInstanceProfile\n - configEncryption\n properties:\n configEncryption:\n type: object\n x-dcl-go-name: ConfigEncryption\n x-dcl-go-type: NodePoolConfigConfigEncryption\n description: The ARN of the AWS KMS key used to encrypt node pool configuration.\n required:\n - kmsKeyArn\n properties:\n kmsKeyArn:\n type: string\n x-dcl-go-name: KmsKeyArn\n description: The ARN of the AWS KMS key used to encrypt node pool\n configuration.\n iamInstanceProfile:\n type: string\n x-dcl-go-name: IamInstanceProfile\n description: The name of the AWS IAM role assigned to nodes in the pool.\n x-kubernetes-immutable: true\n imageType:\n type: string\n x-dcl-go-name: ImageType\n description: The OS image type to use on node pool instances.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n instancePlacement:\n type: object\n x-dcl-go-name: InstancePlacement\n x-dcl-go-type: NodePoolConfigInstancePlacement\n description: Details of placement information for an instance.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n properties:\n tenancy:\n type: string\n x-dcl-go-name: Tenancy\n x-dcl-go-type: NodePoolConfigInstancePlacementTenancyEnum\n description: 'The tenancy for the instance. Possible values: TENANCY_UNSPECIFIED,\n DEFAULT, DEDICATED, HOST'\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n enum:\n - TENANCY_UNSPECIFIED\n - DEFAULT\n - DEDICATED\n - HOST\n instanceType:\n type: string\n x-dcl-go-name: InstanceType\n description: Optional. The AWS instance type. When unspecified, it defaults\n to `m5.large`.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. The initial labels assigned to nodes of this\n node pool. An object containing a list of \"key\": value pairs. Example:\n { \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }.'\n x-kubernetes-immutable: true\n proxyConfig:\n type: object\n x-dcl-go-name: ProxyConfig\n x-dcl-go-type: NodePoolConfigProxyConfig\n description: Proxy configuration for outbound HTTP(S) traffic.\n required:\n - secretArn\n - secretVersion\n properties:\n secretArn:\n type: string\n x-dcl-go-name: SecretArn\n description: The ARN of the AWS Secret Manager secret that contains\n the HTTP(S) proxy configuration.\n secretVersion:\n type: string\n x-dcl-go-name: SecretVersion\n description: The version string of the AWS Secret Manager secret\n that contains the HTTP(S) proxy configuration.\n rootVolume:\n type: object\n x-dcl-go-name: RootVolume\n x-dcl-go-type: NodePoolConfigRootVolume\n description: Optional. Template for the root volume provisioned for\n node pool nodes. Volumes will be provisioned in the availability zone\n assigned to the node pool subnet. When unspecified, it defaults to\n 32 GiB with the GP2 volume type.\n x-dcl-server-default: true\n properties:\n iops:\n type: integer\n format: int64\n x-dcl-go-name: Iops\n description: Optional. The number of I/O operations per second (IOPS)\n to provision for GP3 volume.\n x-dcl-server-default: true\n kmsKeyArn:\n type: string\n x-dcl-go-name: KmsKeyArn\n description: Optional. The Amazon Resource Name (ARN) of the Customer\n Managed Key (CMK) used to encrypt AWS EBS volumes. If not specified,\n the default Amazon managed key associated to the AWS region where\n this cluster runs will be used.\n sizeGib:\n type: integer\n format: int64\n x-dcl-go-name: SizeGib\n description: Optional. The size of the volume, in GiBs. When unspecified,\n a default value is provided. See the specific reference in the\n parent resource.\n x-dcl-server-default: true\n volumeType:\n type: string\n x-dcl-go-name: VolumeType\n x-dcl-go-type: NodePoolConfigRootVolumeVolumeTypeEnum\n description: 'Optional. Type of the EBS volume. When unspecified,\n it defaults to GP2 volume. Possible values: VOLUME_TYPE_UNSPECIFIED,\n GP2, GP3'\n x-dcl-server-default: true\n enum:\n - VOLUME_TYPE_UNSPECIFIED\n - GP2\n - GP3\n securityGroupIds:\n type: array\n x-dcl-go-name: SecurityGroupIds\n description: Optional. The IDs of additional security groups to add\n to nodes in this pool. The manager will automatically create security\n groups with minimum rules needed for a functioning cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n sshConfig:\n type: object\n x-dcl-go-name: SshConfig\n x-dcl-go-type: NodePoolConfigSshConfig\n description: Optional. The SSH configuration.\n x-kubernetes-immutable: true\n required:\n - ec2KeyPair\n properties:\n ec2KeyPair:\n type: string\n x-dcl-go-name: Ec2KeyPair\n description: The name of the EC2 key pair used to login into cluster\n machines.\n x-kubernetes-immutable: true\n tags:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Tags\n description: Optional. Key/value metadata to assign to each underlying\n AWS resource. Specify at most 50 pairs containing alphanumerics, spaces,\n and symbols (.+-=_:@/). Keys can be up to 127 Unicode characters.\n Values can be up to 255 Unicode characters.\n x-kubernetes-immutable: true\n taints:\n type: array\n x-dcl-go-name: Taints\n description: Optional. The initial taints assigned to nodes of this\n node pool.\n x-kubernetes-immutable: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: NodePoolConfigTaints\n required:\n - key\n - value\n - effect\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n x-dcl-go-type: NodePoolConfigTaintsEffectEnum\n description: 'The taint effect. Possible values: EFFECT_UNSPECIFIED,\n NO_SCHEDULE, PREFER_NO_SCHEDULE, NO_EXECUTE'\n x-kubernetes-immutable: true\n enum:\n - EFFECT_UNSPECIFIED\n - NO_SCHEDULE\n - PREFER_NO_SCHEDULE\n - NO_EXECUTE\n key:\n type: string\n x-dcl-go-name: Key\n description: Key for the taint.\n x-kubernetes-immutable: true\n value:\n type: string\n x-dcl-go-name: Value\n description: Value for the taint.\n x-kubernetes-immutable: true\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. The time at which this node pool was created.\n x-kubernetes-immutable: true\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Allows clients to perform consistent read-modify-writes through\n optimistic concurrency control. May be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n maxPodsConstraint:\n type: object\n x-dcl-go-name: MaxPodsConstraint\n x-dcl-go-type: NodePoolMaxPodsConstraint\n description: The constraint on the maximum number of pods that can be run\n simultaneously on a node in the node pool.\n x-kubernetes-immutable: true\n required:\n - maxPodsPerNode\n properties:\n maxPodsPerNode:\n type: integer\n format: int64\n x-dcl-go-name: MaxPodsPerNode\n description: The maximum number of pods to schedule on a single node.\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of this resource.\n x-kubernetes-immutable: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n reconciling:\n type: boolean\n x-dcl-go-name: Reconciling\n readOnly: true\n description: Output only. If set, there are currently changes in flight\n to the node pool.\n x-kubernetes-immutable: true\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: NodePoolStateEnum\n readOnly: true\n description: 'Output only. The lifecycle state of the node pool. Possible\n values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING,\n ERROR, DEGRADED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - PROVISIONING\n - RUNNING\n - RECONCILING\n - STOPPING\n - ERROR\n - DEGRADED\n subnetId:\n type: string\n x-dcl-go-name: SubnetId\n description: The subnet where the node pool node run.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. A globally unique identifier for the node pool.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. The time at which this node pool was last updated.\n x-kubernetes-immutable: true\n version:\n type: string\n x-dcl-go-name: Version\n description: The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).\n You can list all supported versions on a given Google Cloud region by\n calling GetAwsServerConfig.\n") -// 15598 bytes -// MD5: 14be79dc4435f9c592db7a37167af9fd +// 16428 bytes +// MD5: 2ac0713d5fcc7de77dccb449aa140a92 diff --git a/services/google/containeraws/beta/node_pool_internal.go b/services/google/containeraws/beta/node_pool_internal.go index f17c28c26e..b20b465e29 100755 --- a/services/google/containeraws/beta/node_pool_internal.go +++ b/services/google/containeraws/beta/node_pool_internal.go @@ -94,6 +94,11 @@ func (r *NodePoolConfig) validate() error { return err } } + if !dcl.IsEmptyValueIndirect(r.ProxyConfig) { + if err := r.ProxyConfig.validate(); err != nil { + return err + } + } if !dcl.IsEmptyValueIndirect(r.InstancePlacement) { if err := r.InstancePlacement.validate(); err != nil { return err @@ -128,6 +133,15 @@ func (r *NodePoolConfigSshConfig) validate() error { } return nil } +func (r *NodePoolConfigProxyConfig) validate() error { + if err := dcl.Required(r, "secretArn"); err != nil { + return err + } + if err := dcl.Required(r, "secretVersion"); err != nil { + return err + } + return nil +} func (r *NodePoolConfigInstancePlacement) validate() error { return nil } @@ -766,6 +780,7 @@ func canonicalizeNodePoolConfig(des, initial *NodePoolConfig, opts ...dcl.ApplyO } else { cDes.SecurityGroupIds = des.SecurityGroupIds } + cDes.ProxyConfig = canonicalizeNodePoolConfigProxyConfig(des.ProxyConfig, initial.ProxyConfig, opts...) cDes.InstancePlacement = canonicalizeNodePoolConfigInstancePlacement(des.InstancePlacement, initial.InstancePlacement, opts...) if dcl.StringCanonicalize(des.ImageType, initial.ImageType) || dcl.IsZeroValue(des.ImageType) { cDes.ImageType = initial.ImageType @@ -831,6 +846,7 @@ func canonicalizeNewNodePoolConfig(c *Client, des, nw *NodePoolConfig) *NodePool if dcl.StringArrayCanonicalize(des.SecurityGroupIds, nw.SecurityGroupIds) { nw.SecurityGroupIds = des.SecurityGroupIds } + nw.ProxyConfig = canonicalizeNewNodePoolConfigProxyConfig(c, des.ProxyConfig, nw.ProxyConfig) nw.InstancePlacement = canonicalizeNewNodePoolConfigInstancePlacement(c, des.InstancePlacement, nw.InstancePlacement) if dcl.StringCanonicalize(des.ImageType, nw.ImageType) { nw.ImageType = des.ImageType @@ -1374,6 +1390,129 @@ func canonicalizeNewNodePoolConfigSshConfigSlice(c *Client, des, nw []NodePoolCo return items } +func canonicalizeNodePoolConfigProxyConfig(des, initial *NodePoolConfigProxyConfig, opts ...dcl.ApplyOption) *NodePoolConfigProxyConfig { + if des == nil { + return initial + } + if des.empty { + return des + } + + if initial == nil { + return des + } + + cDes := &NodePoolConfigProxyConfig{} + + if dcl.StringCanonicalize(des.SecretArn, initial.SecretArn) || dcl.IsZeroValue(des.SecretArn) { + cDes.SecretArn = initial.SecretArn + } else { + cDes.SecretArn = des.SecretArn + } + if dcl.StringCanonicalize(des.SecretVersion, initial.SecretVersion) || dcl.IsZeroValue(des.SecretVersion) { + cDes.SecretVersion = initial.SecretVersion + } else { + cDes.SecretVersion = des.SecretVersion + } + + return cDes +} + +func canonicalizeNodePoolConfigProxyConfigSlice(des, initial []NodePoolConfigProxyConfig, opts ...dcl.ApplyOption) []NodePoolConfigProxyConfig { + if dcl.IsEmptyValueIndirect(des) { + return initial + } + + if len(des) != len(initial) { + + items := make([]NodePoolConfigProxyConfig, 0, len(des)) + for _, d := range des { + cd := canonicalizeNodePoolConfigProxyConfig(&d, nil, opts...) + if cd != nil { + items = append(items, *cd) + } + } + return items + } + + items := make([]NodePoolConfigProxyConfig, 0, len(des)) + for i, d := range des { + cd := canonicalizeNodePoolConfigProxyConfig(&d, &initial[i], opts...) + if cd != nil { + items = append(items, *cd) + } + } + return items + +} + +func canonicalizeNewNodePoolConfigProxyConfig(c *Client, des, nw *NodePoolConfigProxyConfig) *NodePoolConfigProxyConfig { + + if des == nil { + return nw + } + + if nw == nil { + if dcl.IsNotReturnedByServer(des) { + c.Config.Logger.Info("Found explicitly empty value for NodePoolConfigProxyConfig while comparing non-nil desired to nil actual. Returning desired object.") + return des + } + return nil + } + + if dcl.StringCanonicalize(des.SecretArn, nw.SecretArn) { + nw.SecretArn = des.SecretArn + } + if dcl.StringCanonicalize(des.SecretVersion, nw.SecretVersion) { + nw.SecretVersion = des.SecretVersion + } + + return nw +} + +func canonicalizeNewNodePoolConfigProxyConfigSet(c *Client, des, nw []NodePoolConfigProxyConfig) []NodePoolConfigProxyConfig { + if des == nil { + return nw + } + var reorderedNew []NodePoolConfigProxyConfig + for _, d := range des { + matchedNew := -1 + for idx, n := range nw { + if diffs, _ := compareNodePoolConfigProxyConfigNewStyle(&d, &n, dcl.FieldName{}); len(diffs) == 0 { + matchedNew = idx + break + } + } + if matchedNew != -1 { + reorderedNew = append(reorderedNew, nw[matchedNew]) + nw = append(nw[:matchedNew], nw[matchedNew+1:]...) + } + } + reorderedNew = append(reorderedNew, nw...) + + return reorderedNew +} + +func canonicalizeNewNodePoolConfigProxyConfigSlice(c *Client, des, nw []NodePoolConfigProxyConfig) []NodePoolConfigProxyConfig { + if des == nil { + return nw + } + + // Lengths are unequal. A diff will occur later, so we shouldn't canonicalize. + // Return the original array. + if len(des) != len(nw) { + return nw + } + + var items []NodePoolConfigProxyConfig + for i, d := range des { + n := nw[i] + items = append(items, *canonicalizeNewNodePoolConfigProxyConfig(c, &d, &n)) + } + + return items +} + func canonicalizeNodePoolConfigInstancePlacement(des, initial *NodePoolConfigInstancePlacement, opts ...dcl.ApplyOption) *NodePoolConfigInstancePlacement { if des == nil { return initial @@ -1931,6 +2070,13 @@ func compareNodePoolConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.F diffs = append(diffs, ds...) } + if ds, err := dcl.Diff(desired.ProxyConfig, actual.ProxyConfig, dcl.Info{ObjectFunction: compareNodePoolConfigProxyConfigNewStyle, EmptyObject: EmptyNodePoolConfigProxyConfig, OperationSelector: dcl.TriggersOperation("updateNodePoolUpdateAwsNodePoolOperation")}, fn.AddNest("ProxyConfig")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + if ds, err := dcl.Diff(desired.InstancePlacement, actual.InstancePlacement, dcl.Info{ObjectFunction: compareNodePoolConfigInstancePlacementNewStyle, EmptyObject: EmptyNodePoolConfigInstancePlacement, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("InstancePlacement")); len(ds) != 0 || err != nil { if err != nil { return nil, err @@ -2098,6 +2244,42 @@ func compareNodePoolConfigSshConfigNewStyle(d, a interface{}, fn dcl.FieldName) return diffs, nil } +func compareNodePoolConfigProxyConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) { + var diffs []*dcl.FieldDiff + + desired, ok := d.(*NodePoolConfigProxyConfig) + if !ok { + desiredNotPointer, ok := d.(NodePoolConfigProxyConfig) + if !ok { + return nil, fmt.Errorf("obj %v is not a NodePoolConfigProxyConfig or *NodePoolConfigProxyConfig", d) + } + desired = &desiredNotPointer + } + actual, ok := a.(*NodePoolConfigProxyConfig) + if !ok { + actualNotPointer, ok := a.(NodePoolConfigProxyConfig) + if !ok { + return nil, fmt.Errorf("obj %v is not a NodePoolConfigProxyConfig", a) + } + actual = &actualNotPointer + } + + if ds, err := dcl.Diff(desired.SecretArn, actual.SecretArn, dcl.Info{OperationSelector: dcl.TriggersOperation("updateNodePoolUpdateAwsNodePoolOperation")}, fn.AddNest("SecretArn")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + + if ds, err := dcl.Diff(desired.SecretVersion, actual.SecretVersion, dcl.Info{OperationSelector: dcl.TriggersOperation("updateNodePoolUpdateAwsNodePoolOperation")}, fn.AddNest("SecretVersion")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + return diffs, nil +} + func compareNodePoolConfigInstancePlacementNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) { var diffs []*dcl.FieldDiff @@ -2463,6 +2645,11 @@ func expandNodePoolConfig(c *Client, f *NodePoolConfig, res *NodePool) (map[stri if v := f.SecurityGroupIds; v != nil { m["securityGroupIds"] = v } + if v, err := expandNodePoolConfigProxyConfig(c, f.ProxyConfig, res); err != nil { + return nil, fmt.Errorf("error expanding ProxyConfig into proxyConfig: %w", err) + } else if !dcl.IsEmptyValueIndirect(v) { + m["proxyConfig"] = v + } if v, err := expandNodePoolConfigInstancePlacement(c, f.InstancePlacement, res); err != nil { return nil, fmt.Errorf("error expanding InstancePlacement into instancePlacement: %w", err) } else if !dcl.IsEmptyValueIndirect(v) { @@ -2497,6 +2684,7 @@ func flattenNodePoolConfig(c *Client, i interface{}, res *NodePool) *NodePoolCon r.ConfigEncryption = flattenNodePoolConfigConfigEncryption(c, m["configEncryption"], res) r.SshConfig = flattenNodePoolConfigSshConfig(c, m["sshConfig"], res) r.SecurityGroupIds = dcl.FlattenStringSlice(m["securityGroupIds"]) + r.ProxyConfig = flattenNodePoolConfigProxyConfig(c, m["proxyConfig"], res) r.InstancePlacement = flattenNodePoolConfigInstancePlacement(c, m["instancePlacement"], res) r.ImageType = dcl.FlattenString(m["imageType"]) @@ -2979,6 +3167,124 @@ func flattenNodePoolConfigSshConfig(c *Client, i interface{}, res *NodePool) *No return r } +// expandNodePoolConfigProxyConfigMap expands the contents of NodePoolConfigProxyConfig into a JSON +// request object. +func expandNodePoolConfigProxyConfigMap(c *Client, f map[string]NodePoolConfigProxyConfig, res *NodePool) (map[string]interface{}, error) { + if f == nil { + return nil, nil + } + + items := make(map[string]interface{}) + for k, item := range f { + i, err := expandNodePoolConfigProxyConfig(c, &item, res) + if err != nil { + return nil, err + } + if i != nil { + items[k] = i + } + } + + return items, nil +} + +// expandNodePoolConfigProxyConfigSlice expands the contents of NodePoolConfigProxyConfig into a JSON +// request object. +func expandNodePoolConfigProxyConfigSlice(c *Client, f []NodePoolConfigProxyConfig, res *NodePool) ([]map[string]interface{}, error) { + if f == nil { + return nil, nil + } + + items := []map[string]interface{}{} + for _, item := range f { + i, err := expandNodePoolConfigProxyConfig(c, &item, res) + if err != nil { + return nil, err + } + + items = append(items, i) + } + + return items, nil +} + +// flattenNodePoolConfigProxyConfigMap flattens the contents of NodePoolConfigProxyConfig from a JSON +// response object. +func flattenNodePoolConfigProxyConfigMap(c *Client, i interface{}, res *NodePool) map[string]NodePoolConfigProxyConfig { + a, ok := i.(map[string]interface{}) + if !ok { + return map[string]NodePoolConfigProxyConfig{} + } + + if len(a) == 0 { + return map[string]NodePoolConfigProxyConfig{} + } + + items := make(map[string]NodePoolConfigProxyConfig) + for k, item := range a { + items[k] = *flattenNodePoolConfigProxyConfig(c, item.(map[string]interface{}), res) + } + + return items +} + +// flattenNodePoolConfigProxyConfigSlice flattens the contents of NodePoolConfigProxyConfig from a JSON +// response object. +func flattenNodePoolConfigProxyConfigSlice(c *Client, i interface{}, res *NodePool) []NodePoolConfigProxyConfig { + a, ok := i.([]interface{}) + if !ok { + return []NodePoolConfigProxyConfig{} + } + + if len(a) == 0 { + return []NodePoolConfigProxyConfig{} + } + + items := make([]NodePoolConfigProxyConfig, 0, len(a)) + for _, item := range a { + items = append(items, *flattenNodePoolConfigProxyConfig(c, item.(map[string]interface{}), res)) + } + + return items +} + +// expandNodePoolConfigProxyConfig expands an instance of NodePoolConfigProxyConfig into a JSON +// request object. +func expandNodePoolConfigProxyConfig(c *Client, f *NodePoolConfigProxyConfig, res *NodePool) (map[string]interface{}, error) { + if dcl.IsEmptyValueIndirect(f) { + return nil, nil + } + + m := make(map[string]interface{}) + if v := f.SecretArn; !dcl.IsEmptyValueIndirect(v) { + m["secretArn"] = v + } + if v := f.SecretVersion; !dcl.IsEmptyValueIndirect(v) { + m["secretVersion"] = v + } + + return m, nil +} + +// flattenNodePoolConfigProxyConfig flattens an instance of NodePoolConfigProxyConfig from a JSON +// response object. +func flattenNodePoolConfigProxyConfig(c *Client, i interface{}, res *NodePool) *NodePoolConfigProxyConfig { + m, ok := i.(map[string]interface{}) + if !ok { + return nil + } + + r := &NodePoolConfigProxyConfig{} + + if dcl.IsEmptyValueIndirect(i) { + return EmptyNodePoolConfigProxyConfig + } + r.SecretArn = dcl.FlattenString(m["secretArn"]) + r.SecretVersion = dcl.FlattenString(m["secretVersion"]) + + return r +} + // expandNodePoolConfigInstancePlacementMap expands the contents of NodePoolConfigInstancePlacement into a JSON // request object. func expandNodePoolConfigInstancePlacementMap(c *Client, f map[string]NodePoolConfigInstancePlacement, res *NodePool) (map[string]interface{}, error) { @@ -3698,6 +4004,17 @@ func extractNodePoolConfigFields(r *NodePool, o *NodePoolConfig) error { if !dcl.IsNotReturnedByServer(vSshConfig) { o.SshConfig = vSshConfig } + vProxyConfig := o.ProxyConfig + if vProxyConfig == nil { + // note: explicitly not the empty object. + vProxyConfig = &NodePoolConfigProxyConfig{} + } + if err := extractNodePoolConfigProxyConfigFields(r, vProxyConfig); err != nil { + return err + } + if !dcl.IsNotReturnedByServer(vProxyConfig) { + o.ProxyConfig = vProxyConfig + } vInstancePlacement := o.InstancePlacement if vInstancePlacement == nil { // note: explicitly not the empty object. @@ -3723,6 +4040,9 @@ func extractNodePoolConfigConfigEncryptionFields(r *NodePool, o *NodePoolConfigC func extractNodePoolConfigSshConfigFields(r *NodePool, o *NodePoolConfigSshConfig) error { return nil } +func extractNodePoolConfigProxyConfigFields(r *NodePool, o *NodePoolConfigProxyConfig) error { + return nil +} func extractNodePoolConfigInstancePlacementFields(r *NodePool, o *NodePoolConfigInstancePlacement) error { return nil } @@ -3803,6 +4123,17 @@ func postReadExtractNodePoolConfigFields(r *NodePool, o *NodePoolConfig) error { if !dcl.IsNotReturnedByServer(vSshConfig) { o.SshConfig = vSshConfig } + vProxyConfig := o.ProxyConfig + if vProxyConfig == nil { + // note: explicitly not the empty object. + vProxyConfig = &NodePoolConfigProxyConfig{} + } + if err := extractNodePoolConfigProxyConfigFields(r, vProxyConfig); err != nil { + return err + } + if !dcl.IsNotReturnedByServer(vProxyConfig) { + o.ProxyConfig = vProxyConfig + } vInstancePlacement := o.InstancePlacement if vInstancePlacement == nil { // note: explicitly not the empty object. @@ -3828,6 +4159,9 @@ func postReadExtractNodePoolConfigConfigEncryptionFields(r *NodePool, o *NodePoo func postReadExtractNodePoolConfigSshConfigFields(r *NodePool, o *NodePoolConfigSshConfig) error { return nil } +func postReadExtractNodePoolConfigProxyConfigFields(r *NodePool, o *NodePoolConfigProxyConfig) error { + return nil +} func postReadExtractNodePoolConfigInstancePlacementFields(r *NodePool, o *NodePoolConfigInstancePlacement) error { return nil } diff --git a/unstructured/google/containeraws/alpha/node_pool.go b/unstructured/google/containeraws/alpha/node_pool.go index 32bf404b4b..020822934b 100755 --- a/unstructured/google/containeraws/alpha/node_pool.go +++ b/unstructured/google/containeraws/alpha/node_pool.go @@ -84,6 +84,16 @@ func NodePoolToUnstructured(r *dclService.NodePool) *unstructured.Resource { } rConfig["labels"] = rConfigLabels } + if r.Config.ProxyConfig != nil && r.Config.ProxyConfig != dclService.EmptyNodePoolConfigProxyConfig { + rConfigProxyConfig := make(map[string]interface{}) + if r.Config.ProxyConfig.SecretArn != nil { + rConfigProxyConfig["secretArn"] = *r.Config.ProxyConfig.SecretArn + } + if r.Config.ProxyConfig.SecretVersion != nil { + rConfigProxyConfig["secretVersion"] = *r.Config.ProxyConfig.SecretVersion + } + rConfig["proxyConfig"] = rConfigProxyConfig + } if r.Config.RootVolume != nil && r.Config.RootVolume != dclService.EmptyNodePoolConfigRootVolume { rConfigRootVolume := make(map[string]interface{}) if r.Config.RootVolume.Iops != nil { @@ -287,6 +297,27 @@ func UnstructuredToNodePool(u *unstructured.Resource) (*dclService.NodePool, err return nil, fmt.Errorf("r.Config.Labels: expected map[string]interface{}") } } + if _, ok := rConfig["proxyConfig"]; ok { + if rConfigProxyConfig, ok := rConfig["proxyConfig"].(map[string]interface{}); ok { + r.Config.ProxyConfig = &dclService.NodePoolConfigProxyConfig{} + if _, ok := rConfigProxyConfig["secretArn"]; ok { + if s, ok := rConfigProxyConfig["secretArn"].(string); ok { + r.Config.ProxyConfig.SecretArn = dcl.String(s) + } else { + return nil, fmt.Errorf("r.Config.ProxyConfig.SecretArn: expected string") + } + } + if _, ok := rConfigProxyConfig["secretVersion"]; ok { + if s, ok := rConfigProxyConfig["secretVersion"].(string); ok { + r.Config.ProxyConfig.SecretVersion = dcl.String(s) + } else { + return nil, fmt.Errorf("r.Config.ProxyConfig.SecretVersion: expected string") + } + } + } else { + return nil, fmt.Errorf("r.Config.ProxyConfig: expected map[string]interface{}") + } + } if _, ok := rConfig["rootVolume"]; ok { if rConfigRootVolume, ok := rConfig["rootVolume"].(map[string]interface{}); ok { r.Config.RootVolume = &dclService.NodePoolConfigRootVolume{} diff --git a/unstructured/google/containeraws/beta/node_pool.go b/unstructured/google/containeraws/beta/node_pool.go index ae5198f892..8858721427 100755 --- a/unstructured/google/containeraws/beta/node_pool.go +++ b/unstructured/google/containeraws/beta/node_pool.go @@ -84,6 +84,16 @@ func NodePoolToUnstructured(r *dclService.NodePool) *unstructured.Resource { } rConfig["labels"] = rConfigLabels } + if r.Config.ProxyConfig != nil && r.Config.ProxyConfig != dclService.EmptyNodePoolConfigProxyConfig { + rConfigProxyConfig := make(map[string]interface{}) + if r.Config.ProxyConfig.SecretArn != nil { + rConfigProxyConfig["secretArn"] = *r.Config.ProxyConfig.SecretArn + } + if r.Config.ProxyConfig.SecretVersion != nil { + rConfigProxyConfig["secretVersion"] = *r.Config.ProxyConfig.SecretVersion + } + rConfig["proxyConfig"] = rConfigProxyConfig + } if r.Config.RootVolume != nil && r.Config.RootVolume != dclService.EmptyNodePoolConfigRootVolume { rConfigRootVolume := make(map[string]interface{}) if r.Config.RootVolume.Iops != nil { @@ -287,6 +297,27 @@ func UnstructuredToNodePool(u *unstructured.Resource) (*dclService.NodePool, err return nil, fmt.Errorf("r.Config.Labels: expected map[string]interface{}") } } + if _, ok := rConfig["proxyConfig"]; ok { + if rConfigProxyConfig, ok := rConfig["proxyConfig"].(map[string]interface{}); ok { + r.Config.ProxyConfig = &dclService.NodePoolConfigProxyConfig{} + if _, ok := rConfigProxyConfig["secretArn"]; ok { + if s, ok := rConfigProxyConfig["secretArn"].(string); ok { + r.Config.ProxyConfig.SecretArn = dcl.String(s) + } else { + return nil, fmt.Errorf("r.Config.ProxyConfig.SecretArn: expected string") + } + } + if _, ok := rConfigProxyConfig["secretVersion"]; ok { + if s, ok := rConfigProxyConfig["secretVersion"].(string); ok { + r.Config.ProxyConfig.SecretVersion = dcl.String(s) + } else { + return nil, fmt.Errorf("r.Config.ProxyConfig.SecretVersion: expected string") + } + } + } else { + return nil, fmt.Errorf("r.Config.ProxyConfig: expected map[string]interface{}") + } + } if _, ok := rConfig["rootVolume"]; ok { if rConfigRootVolume, ok := rConfig["rootVolume"].(map[string]interface{}); ok { r.Config.RootVolume = &dclService.NodePoolConfigRootVolume{}