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
162b0db7
Commit
162b0db7
authored
Apr 22, 2015
by
Fabio Yeon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7207 from GoogleCloudPlatform/revert-7154-readonly
Revert "Change kube2sky to use token-system-dns secret, point at https e...
parents
1d8a4d45
0a0bd88d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
32 deletions
+7
-32
kube2sky.go
cluster/addons/dns/kube2sky/kube2sky.go
+6
-17
skydns-rc.yaml.in
cluster/addons/dns/skydns-rc.yaml.in
+1
-15
No files found.
cluster/addons/dns/kube2sky/kube2sky.go
View file @
162b0db7
...
...
@@ -29,7 +29,6 @@ import (
kapi
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
kclient
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
kclientcmd
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd"
kfields
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
klabels
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
tools
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
...
...
@@ -43,7 +42,6 @@ var (
etcd_mutation_timeout
=
flag
.
Duration
(
"etcd_mutation_timeout"
,
10
*
time
.
Second
,
"crash after retrying etcd mutation for a specified duration"
)
etcd_server
=
flag
.
String
(
"etcd-server"
,
"http://127.0.0.1:4001"
,
"URL to etcd server"
)
verbose
=
flag
.
Bool
(
"verbose"
,
false
,
"log extra information"
)
kubecfg_file
=
flag
.
String
(
"kubecfg_file"
,
""
,
"Location of kubecfg file for access to kubernetes service"
)
)
func
removeDNS
(
record
string
,
etcdClient
*
etcd
.
Client
)
error
{
...
...
@@ -130,9 +128,8 @@ func newEtcdClient() (client *etcd.Client) {
// TODO: evaluate using pkg/client/clientcmd
func
newKubeClient
()
(
*
kclient
.
Client
,
error
)
{
var
config
*
kclient
.
Config
if
*
kubecfg_file
==
""
{
// No kubecfg file provided. Use kubernetes_ro service.
config
:=
&
kclient
.
Config
{}
masterHost
:=
os
.
Getenv
(
"KUBERNETES_RO_SERVICE_HOST"
)
if
masterHost
==
""
{
log
.
Fatalf
(
"KUBERNETES_RO_SERVICE_HOST is not defined"
)
...
...
@@ -141,20 +138,12 @@ func newKubeClient() (*kclient.Client, error) {
if
masterPort
==
""
{
log
.
Fatalf
(
"KUBERNETES_RO_SERVICE_PORT is not defined"
)
}
config
=
&
kclient
.
Config
{
Host
:
fmt
.
Sprintf
(
"http://%s:%s"
,
masterHost
,
masterPort
),
Version
:
"v1beta1"
,
}
}
else
{
var
err
error
if
config
,
err
=
kclientcmd
.
NewNonInteractiveDeferredLoadingClientConfig
(
&
kclientcmd
.
ClientConfigLoadingRules
{
ExplicitPath
:
*
kubecfg_file
},
&
kclientcmd
.
ConfigOverrides
{})
.
ClientConfig
();
err
!=
nil
{
return
nil
,
err
}
}
config
.
Host
=
fmt
.
Sprintf
(
"http://%s:%s"
,
masterHost
,
masterPort
)
log
.
Printf
(
"Using %s for kubernetes master"
,
config
.
Host
)
config
.
Version
=
"v1beta1"
log
.
Printf
(
"Using kubernetes API %s"
,
config
.
Version
)
return
kclient
.
New
(
config
)
}
...
...
cluster/addons/dns/skydns-rc.yaml.in
View file @
162b0db7
...
...
@@ -29,15 +29,10 @@ desiredState:
"-advertise-client-urls=http://127.0.0.1:4001",
]
- name: kube2sky
image: gcr.io/google_containers/kube2sky:1.2
volumeMounts:
- name: dns-token
mountPath: /etc/dns_token
readOnly: true
image: gcr.io/google_containers/kube2sky:1.1
command: [
# entrypoint = "/kube2sky",
"-domain={{ pillar['dns_domain'] }}",
"-kubecfg_file=/etc/dns_token/kubeconfig",
]
- name: skydns
image: gcr.io/google_containers/skydns:2015-03-11-001
...
...
@@ -51,11 +46,3 @@ desiredState:
- name: dns
containerPort: 53
protocol: UDP
volumes:
- name: dns-token
source:
secret:
target:
kind: Secret
namespace: default
name: token-system-dns
\ No newline at end of file
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