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
df89b2d2
Commit
df89b2d2
authored
Mar 12, 2016
by
nikhiljindal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the port for apiserver example
parent
c99e85c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
apiserver.go
examples/apiserver/apiserver.go
+11
-1
apiserver_test.go
examples/apiserver/apiserver_test.go
+1
-1
No files found.
examples/apiserver/apiserver.go
View file @
df89b2d2
...
@@ -32,6 +32,13 @@ import (
...
@@ -32,6 +32,13 @@ import (
_
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup/install"
_
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup/install"
)
)
const
(
// Ports on which to run the server.
// Explicitly setting these to a different value than the default values, to prevent this from clashing with a local cluster.
InsecurePort
=
8081
SecurePort
=
6444
)
func
newStorageDestinations
(
groupName
string
,
groupMeta
*
apimachinery
.
GroupMeta
)
(
*
genericapiserver
.
StorageDestinations
,
error
)
{
func
newStorageDestinations
(
groupName
string
,
groupMeta
*
apimachinery
.
GroupMeta
)
(
*
genericapiserver
.
StorageDestinations
,
error
)
{
storageDestinations
:=
genericapiserver
.
NewStorageDestinations
()
storageDestinations
:=
genericapiserver
.
NewStorageDestinations
()
var
storageConfig
etcdstorage
.
EtcdStorageConfig
var
storageConfig
etcdstorage
.
EtcdStorageConfig
...
@@ -85,6 +92,9 @@ func Run() error {
...
@@ -85,6 +92,9 @@ func Run() error {
if
err
:=
s
.
InstallAPIGroups
([]
genericapiserver
.
APIGroupInfo
{
apiGroupInfo
});
err
!=
nil
{
if
err
:=
s
.
InstallAPIGroups
([]
genericapiserver
.
APIGroupInfo
{
apiGroupInfo
});
err
!=
nil
{
return
fmt
.
Errorf
(
"Error in installing API: %v"
,
err
)
return
fmt
.
Errorf
(
"Error in installing API: %v"
,
err
)
}
}
s
.
Run
(
genericapiserver
.
NewServerRunOptions
())
serverOptions
:=
genericapiserver
.
NewServerRunOptions
()
serverOptions
.
InsecurePort
=
InsecurePort
serverOptions
.
SecurePort
=
SecurePort
s
.
Run
(
serverOptions
)
return
nil
return
nil
}
}
examples/apiserver/apiserver_test.go
View file @
df89b2d2
...
@@ -30,7 +30,7 @@ import (
...
@@ -30,7 +30,7 @@ import (
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/unversioned"
)
)
var
serverIP
=
"http://localhost:8080"
var
serverIP
=
fmt
.
Sprintf
(
"http://localhost:%d"
,
InsecurePort
)
var
groupVersion
=
v1
.
SchemeGroupVersion
var
groupVersion
=
v1
.
SchemeGroupVersion
...
...
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