Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/cloud/gcp/actuators/machine/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ func (r *Reconciler) reconcileMachineWithCloudState(failedCondition *v1beta1.GCP
Type: corev1.NodeInternalDNS,
Address: fmt.Sprintf("%s.c.%s.internal", r.machine.Name, r.projectID),
})
// Add the machine's name as a known NodeInternalDNS because GCP platform
// provides search paths to resolve those.
// https://cloud.google.com/compute/docs/internal-dns#resolv.conf
nodeAddresses = append(nodeAddresses, corev1.NodeAddress{
Type: corev1.NodeInternalDNS,
Address: r.machine.GetName(),
})

r.machine.Spec.ProviderID = &r.providerID
r.machine.Status.Addresses = nodeAddresses
Expand Down