mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-06 16:25:21 -04:00
metadata: clarify networking variables
This commit is contained in:
parent
0430336fdf
commit
b69d19c3d6
3 changed files with 9 additions and 6 deletions
|
@ -120,7 +120,7 @@ func (k *KubeWrapper) InitCluster(
|
||||||
nodeName = k8sCompliantHostname(instance.Name)
|
nodeName = k8sCompliantHostname(instance.Name)
|
||||||
providerID = instance.ProviderID
|
providerID = instance.ProviderID
|
||||||
nodeIP = instance.VPCIP
|
nodeIP = instance.VPCIP
|
||||||
subnetworkPodCIDR = instance.SubnetworkCIDR
|
subnetworkPodCIDR = instance.SecondaryIPRange
|
||||||
|
|
||||||
if len(instance.AliasIPRanges) > 0 {
|
if len(instance.AliasIPRanges) > 0 {
|
||||||
nodePodCIDR = instance.AliasIPRanges[0]
|
nodePodCIDR = instance.AliasIPRanges[0]
|
||||||
|
|
|
@ -92,7 +92,7 @@ func (m *Metadata) Self(ctx context.Context) (metadata.InstanceMetadata, error)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return metadata.InstanceMetadata{}, err
|
return metadata.InstanceMetadata{}, err
|
||||||
}
|
}
|
||||||
instance.SubnetworkCIDR = subnetCIDR
|
instance.SecondaryIPRange = subnetCIDR
|
||||||
|
|
||||||
return instance, nil
|
return instance, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,14 +24,17 @@ type InstanceMetadata struct {
|
||||||
// VPCIP is the primary IP address of the instance in the VPC.
|
// VPCIP is the primary IP address of the instance in the VPC.
|
||||||
VPCIP string
|
VPCIP string
|
||||||
// PublicIP is the primary public IP of the instance, if available, empty string otherwise.
|
// PublicIP is the primary public IP of the instance, if available, empty string otherwise.
|
||||||
PublicIP string
|
PublicIP string
|
||||||
AliasIPRanges []string
|
|
||||||
// SSHKeys maps usernames to ssh public keys.
|
// SSHKeys maps usernames to ssh public keys.
|
||||||
SSHKeys map[string][]string
|
SSHKeys map[string][]string
|
||||||
|
|
||||||
// SubnetworkCIDR is the CIDR of the subnetwork the instance is in.
|
// SecondaryIPRange is the VPC wide CIDR from which subnets are attached to VMs as AliasIPRanges.
|
||||||
// May be empty on certain CSPs.
|
// May be empty on certain CSPs.
|
||||||
SubnetworkCIDR string
|
SecondaryIPRange string
|
||||||
|
|
||||||
|
// AliasIPRanges is a list of IP ranges that are attached.
|
||||||
|
// May be empty on certain CSPs.
|
||||||
|
AliasIPRanges []string
|
||||||
}
|
}
|
||||||
|
|
||||||
type InstanceSelfer interface {
|
type InstanceSelfer interface {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue