Skip to content

Commit 949f0e7

Browse files
committed
Update tutorial; fix lint issues
1 parent 1e54852 commit 949f0e7

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/tutorials/ns1.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,18 @@ spec:
9797
args:
9898
- --source=service # ingress is also possible
9999
- --domain-filter=example.com # (optional) limit to only example.com domains; change to match the zone created above.
100+
- --ns1-zone-handle-map="example.com=corp-prod" # (optional) map example.com FQDN to corp-prod zone handle
101+
- --ns1-zone-handle-map="dev.example.com=dev-view" # (optional) multiple FQDN-zone handle mappings
100102
- --provider=ns1
101103
env:
102-
- name: NS1_APIKEY
104+
- name: NS1_APIKEY
103105
valueFrom:
104106
secretKeyRef:
105107
name: NS1_APIKEY
106108
key: NS1_API_KEY
109+
- name: EXTERNAL_DNS_NS1_ZONE_HANDLE_MAP
110+
value: "example.com=corp-prod\ndev.example.com=dev-view"
111+
107112
```
108113

109114
### Manifest (for clusters with RBAC enabled)

provider/ns1/ns1.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ func (p *NS1Provider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)
176176
} else {
177177
return nil, err
178178
}
179-
180179
}
181180

182181
for _, record := range zoneData.Records {

provider/ns1/ns1_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,9 @@ func TestNS1ChangesByZone_IgnoresUnmatchedRecords(t *testing.T) {
424424

425425
// Should still have exactly the zone keys for the provided zones, but no entries inside.
426426
if gs, ok := changes["foo-handle"]; ok {
427-
assert.Len(t, gs, 0)
427+
assert.Empty(t, gs)
428428
}
429429
if gs, ok := changes["bar.com"]; ok {
430-
assert.Len(t, gs, 0)
430+
assert.Empty(t, gs)
431431
}
432432
}

0 commit comments

Comments
 (0)