Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6ff5f06e
Commit
6ff5f06e
authored
Apr 26, 2017
by
Ricky Pai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add HostAliases field to PodSpec to support adding entries into hosts file
parent
55f802b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
types.go
pkg/api/types.go
+11
-0
types.go
pkg/api/v1/types.go
+15
-0
No files found.
pkg/api/types.go
View file @
6ff5f06e
...
@@ -2099,6 +2099,17 @@ type PodSpec struct {
...
@@ -2099,6 +2099,17 @@ type PodSpec struct {
// If specified, the pod's tolerations.
// If specified, the pod's tolerations.
// +optional
// +optional
Tolerations
[]
Toleration
Tolerations
[]
Toleration
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
// file if specified. This is only valid for non-hostNetwork pods.
// +optional
HostAliases
[]
HostAlias
}
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
// pod's hosts file.
type
HostAlias
struct
{
IP
string
Hostnames
[]
string
}
}
// Sysctl defines a kernel parameter to be set
// Sysctl defines a kernel parameter to be set
...
...
pkg/api/v1/types.go
View file @
6ff5f06e
...
@@ -2406,6 +2406,21 @@ type PodSpec struct {
...
@@ -2406,6 +2406,21 @@ type PodSpec struct {
// If specified, the pod's tolerations.
// If specified, the pod's tolerations.
// +optional
// +optional
Tolerations
[]
Toleration
`json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
Tolerations
[]
Toleration
`json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
// file if specified. This is only valid for non-hostNetwork pods.
// +optional
// +patchMergeKey=IP
// +patchStrategy=merge
HostAliases
[]
HostAlias
`json:"hostMappings,omitempty" patchStrategy:"merge" patchMergeKey:"IP" protobuf:"bytes,23,rep,name=hostMappings"`
}
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
// pod's hosts file.
type
HostAlias
struct
{
// IP address of the host file entry.
IP
string
`json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
// Hostnames for the the above IP address.
Hostnames
[]
string
`json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"`
}
}
// PodSecurityContext holds pod-level security attributes and common container settings.
// PodSecurityContext holds pod-level security attributes and common container settings.
...
...
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