Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
5534625c
Commit
5534625c
authored
Oct 06, 2021
by
Chris O'Haver
Committed by
GitHub
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin/kubernetes: Don't use pod names longer than 63 characters as dns labels (#4908)
Automatically submitted.
parent
c6bcc8f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
plugin/kubernetes/README.md
plugin/kubernetes/README.md
+1
-1
plugin/kubernetes/object/endpoint.go
plugin/kubernetes/object/endpoint.go
+4
-2
No files found.
plugin/kubernetes/README.md
View file @
5534625c
...
@@ -87,7 +87,7 @@ kubernetes [ZONES...] {
...
@@ -87,7 +87,7 @@ kubernetes [ZONES...] {
If this directive is included, then name selection for endpoints changes as
If this directive is included, then name selection for endpoints changes as
follows: Use the hostname of the endpoint, or if hostname is not set, use the
follows: Use the hostname of the endpoint, or if hostname is not set, use the
pod name of the pod targeted by the endpoint. If there is no pod targeted by
pod name of the pod targeted by the endpoint. If there is no pod targeted by
the endpoint, use the dashed IP address form.
the endpoint
or pod name is longer than 63
, use the dashed IP address form.
*
`ttl`
allows you to set a custom TTL for responses. The default is 5 seconds. The minimum TTL allowed is
*
`ttl`
allows you to set a custom TTL for responses. The default is 5 seconds. The minimum TTL allowed is
0 seconds, and the maximum is capped at 3600 seconds. Setting TTL to 0 will prevent records from being cached.
0 seconds, and the maximum is capped at 3600 seconds. Setting TTL to 0 will prevent records from being cached.
*
`noendpoints`
will turn off the serving of endpoint records by disabling the watch on endpoints.
*
`noendpoints`
will turn off the serving of endpoint records by disabling the watch on endpoints.
...
...
plugin/kubernetes/object/endpoint.go
View file @
5534625c
...
@@ -136,7 +136,8 @@ func EndpointSliceToEndpoints(obj meta.Object) (meta.Object, error) {
...
@@ -136,7 +136,8 @@ func EndpointSliceToEndpoints(obj meta.Object) (meta.Object, error) {
if
end
.
Hostname
!=
nil
{
if
end
.
Hostname
!=
nil
{
ea
.
Hostname
=
*
end
.
Hostname
ea
.
Hostname
=
*
end
.
Hostname
}
}
if
end
.
TargetRef
!=
nil
{
// ignore pod names that are too long to be a valid label
if
end
.
TargetRef
!=
nil
&&
len
(
end
.
TargetRef
.
Name
)
<
64
{
ea
.
TargetRefName
=
end
.
TargetRef
.
Name
ea
.
TargetRefName
=
end
.
TargetRef
.
Name
}
}
if
end
.
NodeName
!=
nil
{
if
end
.
NodeName
!=
nil
{
...
@@ -186,7 +187,8 @@ func EndpointSliceV1beta1ToEndpoints(obj meta.Object) (meta.Object, error) {
...
@@ -186,7 +187,8 @@ func EndpointSliceV1beta1ToEndpoints(obj meta.Object) (meta.Object, error) {
if
end
.
Hostname
!=
nil
{
if
end
.
Hostname
!=
nil
{
ea
.
Hostname
=
*
end
.
Hostname
ea
.
Hostname
=
*
end
.
Hostname
}
}
if
end
.
TargetRef
!=
nil
{
// ignore pod names that are too long to be a valid label
if
end
.
TargetRef
!=
nil
&&
len
(
end
.
TargetRef
.
Name
)
<
64
{
ea
.
TargetRefName
=
end
.
TargetRef
.
Name
ea
.
TargetRefName
=
end
.
TargetRef
.
Name
}
}
// EndpointSlice does not contain NodeName, leave blank
// EndpointSlice does not contain NodeName, leave blank
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment