Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeExternalDNS/stable #2660

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ steps:

- name: 'e2e-runner'
args:
- 'PlayerTracking=true&NodeExternalDNS=false&StateAllocationFilter=true&PlayerAllocationFilter=true&CustomFasSyncInterval=true'
- 'PlayerTracking=true&StateAllocationFilter=true&PlayerAllocationFilter=true&CustomFasSyncInterval=true'
- 'e2e-test-cluster'
- "${_REGISTRY}"
id: e2e-feature-gates
Expand Down
19 changes: 6 additions & 13 deletions pkg/gameservers/gameservers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"net"

agonesv1 "agones.dev/agones/pkg/apis/agones/v1"
"agones.dev/agones/pkg/util/runtime"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -43,13 +42,9 @@ func isGameServerPod(pod *corev1.Pod) bool {
// that only report an InternalIP.
func address(node *corev1.Node) (string, error) {

externalDNS := runtime.FeatureEnabled(runtime.NodeExternalDNS)

if externalDNS {
for _, a := range node.Status.Addresses {
if a.Type == corev1.NodeExternalDNS {
return a.Address, nil
}
for _, a := range node.Status.Addresses {
if a.Type == corev1.NodeExternalDNS {
return a.Address, nil
}
}

Expand All @@ -60,11 +55,9 @@ func address(node *corev1.Node) (string, error) {
}

// There might not be a public DNS/IP, so fall back to the private DNS/IP
if externalDNS {
for _, a := range node.Status.Addresses {
if a.Type == corev1.NodeInternalDNS {
return a.Address, nil
}
for _, a := range node.Status.Addresses {
if a.Type == corev1.NodeInternalDNS {
return a.Address, nil
}
}

Expand Down
4 changes: 1 addition & 3 deletions pkg/gameservers/gameservers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func TestAddress(t *testing.T) {
{Address: "internal.example.com", Type: corev1.NodeInternalDNS},
}}},
expectedAddress: "external.example.com",
featureFlags: "NodeExternalDNS=true",
},
"node with external and internal dns without feature flag": {
node: &corev1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeFixtureName},
Expand All @@ -83,8 +82,7 @@ func TestAddress(t *testing.T) {
{Address: "9.9.9.8", Type: corev1.NodeExternalIP},
{Address: "12.12.12.12", Type: corev1.NodeInternalIP},
}}},
expectedAddress: "9.9.9.8",
featureFlags: "NodeExternalDNS=false",
expectedAddress: "external.example.com",
},
}

Expand Down
4 changes: 0 additions & 4 deletions pkg/util/runtime/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ const (
// FeaturePlayerTracking is a feature flag to enable/disable player tracking features.
FeaturePlayerTracking Feature = "PlayerTracking"

// NodeExternalDNS is a feature flag to enable/disable node ExternalDNS and InternalDNS use as GameServer address
NodeExternalDNS Feature = "NodeExternalDNS"

// FeatureStateAllocationFilter is a feature flag that enables state filtering on Allocation.
FeatureStateAllocationFilter Feature = "StateAllocationFilter"

Expand All @@ -58,7 +55,6 @@ var (
featureDefaults = map[Feature]bool{
FeatureExample: true,
FeaturePlayerTracking: false,
NodeExternalDNS: true,
FeatureStateAllocationFilter: false,
FeaturePlayerAllocationFilter: false,
FeatureCustomFasSyncInterval: false,
Expand Down
1 change: 0 additions & 1 deletion site/content/en/docs/Guides/feature-stages.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ The current set of `alpha` and `beta` feature gates are:
|--------------|---------|---------|-------|-------|
| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 |
| [Player Tracking]({{< ref "/docs/Guides/player-tracking.md" >}}) | `PlayerTracking` | Disabled | `Alpha` | 1.6.0 |
| [Utilize Node ExternalDNS](https://github.com/googleforgames/agones/issues/1921) and additional [details]({{< ref "/docs/FAQ/_index.md" >}}) | `NodeExternalDNS` | Enabled | `Beta` | 1.19.0 |
| [Custom resync period for FleetAutoscaler](https://github.com/googleforgames/agones/issues/1955) | `CustomFasSyncInterval` | Disabled | `Alpha` | 1.17.0 |
| [GameServer state filtering on GameServerAllocations](https://github.com/googleforgames/agones/issues/1239) | `StateAllocationFilter` | Disabled | `Alpha` | 1.14.0 |
| [GameServer player capacity filtering on GameServerAllocations](https://github.com/googleforgames/agones/issues/1239) | `PlayerAllocationFilter` | Disabled | `Alpha` | 1.14.0 |
Expand Down