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
b967d1bc
Unverified
Commit
b967d1bc
authored
Jan 23, 2018
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait for healthy extension server before registering APIService
parent
191f9dd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
aggregator.go
test/e2e/apimachinery/aggregator.go
+7
-6
No files found.
test/e2e/apimachinery/aggregator.go
View file @
b967d1bc
...
@@ -291,6 +291,13 @@ func TestSampleAPIServer(f *framework.Framework, image string) {
...
@@ -291,6 +291,13 @@ func TestSampleAPIServer(f *framework.Framework, image string) {
})
})
framework
.
ExpectNoError
(
err
,
"creating role binding %s:sample-apiserver to access configMap"
,
namespace
)
framework
.
ExpectNoError
(
err
,
"creating role binding %s:sample-apiserver to access configMap"
,
namespace
)
// Wait for the extension apiserver to be up and healthy
// kubectl get deployments -n <aggregated-api-namespace> && status == Running
// NOTE: aggregated apis should generally be set up in there own namespace (<aggregated-api-namespace>). As the test framework
// is setting up a new namespace, we are just using that.
err
=
framework
.
WaitForDeploymentComplete
(
client
,
deployment
)
framework
.
ExpectNoError
(
err
,
"deploying extension apiserver in namespace %s"
,
namespace
)
// kubectl create -f apiservice.yaml
// kubectl create -f apiservice.yaml
_
,
err
=
aggrclient
.
ApiregistrationV1beta1
()
.
APIServices
()
.
Create
(
&
apiregistrationv1beta1
.
APIService
{
_
,
err
=
aggrclient
.
ApiregistrationV1beta1
()
.
APIServices
()
.
Create
(
&
apiregistrationv1beta1
.
APIService
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
"v1alpha1.wardle.k8s.io"
},
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
"v1alpha1.wardle.k8s.io"
},
...
@@ -308,12 +315,6 @@ func TestSampleAPIServer(f *framework.Framework, image string) {
...
@@ -308,12 +315,6 @@ func TestSampleAPIServer(f *framework.Framework, image string) {
})
})
framework
.
ExpectNoError
(
err
,
"creating apiservice %s with namespace %s"
,
"v1alpha1.wardle.k8s.io"
,
namespace
)
framework
.
ExpectNoError
(
err
,
"creating apiservice %s with namespace %s"
,
"v1alpha1.wardle.k8s.io"
,
namespace
)
// Wait for the extension apiserver to be up and healthy
// kubectl get deployments -n <aggregated-api-namespace> && status == Running
// NOTE: aggregated apis should generally be set up in there own namespace (<aggregated-api-namespace>). As the test framework
// is setting up a new namespace, we are just using that.
err
=
framework
.
WaitForDeploymentComplete
(
client
,
deployment
)
err
=
wait
.
Poll
(
100
*
time
.
Millisecond
,
30
*
time
.
Second
,
func
()
(
bool
,
error
)
{
err
=
wait
.
Poll
(
100
*
time
.
Millisecond
,
30
*
time
.
Second
,
func
()
(
bool
,
error
)
{
request
:=
restClient
.
Get
()
.
AbsPath
(
"/apis/wardle.k8s.io/v1alpha1/namespaces/default/flunders"
)
request
:=
restClient
.
Get
()
.
AbsPath
(
"/apis/wardle.k8s.io/v1alpha1/namespaces/default/flunders"
)
request
.
SetHeader
(
"Accept"
,
"application/json"
)
request
.
SetHeader
(
"Accept"
,
"application/json"
)
...
...
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