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
493e0cdb
Commit
493e0cdb
authored
Jun 24, 2015
by
Maxwell Forbes
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10230 from ihmccreery/update-demo
Update update-demo to work for v1, and don't use localhost domain name
parents
11f9fd1d
6de80321
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
kitten-rc.yaml
examples/update-demo/kitten-rc.yaml
+1
-1
index.html
examples/update-demo/local/index.html
+2
-2
script.js
examples/update-demo/local/script.js
+2
-2
kubectl.go
test/e2e/kubectl.go
+1
-1
No files found.
examples/update-demo/kitten-rc.yaml
View file @
493e0cdb
...
...
@@ -3,7 +3,7 @@ kind: ReplicationController
metadata
:
name
:
update-demo-kitten
spec
:
replicas
:
1
replicas
:
4
selector
:
name
:
update-demo
version
:
kitten
...
...
examples/update-demo/local/index.html
View file @
493e0cdb
...
...
@@ -22,9 +22,9 @@ limitations under the License.
</head>
<body
ng-controller=
"ButtonsCtrl"
>
<div
ng-repeat=
"server in servers"
class=
"pod"
>
<img
src=
"
http://localhost:8001
/api/v1/proxy/namespaces/default/pods/{{server.podName}}/{{server.image}}"
height=
"100px"
width=
"100px"
/>
<img
src=
"/api/v1/proxy/namespaces/default/pods/{{server.podName}}/{{server.image}}"
height=
"100px"
width=
"100px"
/>
<b>
ID:
</b>
{{server.podName}}
<br>
<b>
Host:
</b>
<a
href=
"
http://localhost:8001
/api/v1/proxy/namespaces/default/pods/{{server.podName}}/data.json"
>
{{server.host}}
</a><br>
<b>
Host:
</b>
<a
href=
"/api/v1/proxy/namespaces/default/pods/{{server.podName}}/data.json"
>
{{server.host}}
</a><br>
<b>
Status:
</b>
{{server.status}}
<br>
<b>
Image:
</b>
{{server.dockerImage}}
<br>
<b>
Labels:
</b>
...
...
examples/update-demo/local/script.js
View file @
493e0cdb
...
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
var
base
=
"
http://localhost:8001
/api/v1/"
;
var
base
=
"/api/v1/"
;
var
updateImage
=
function
(
$http
,
server
)
{
$http
.
get
(
base
+
"proxy/namespaces/default/pods/"
+
server
.
podName
+
"/data.json"
)
...
...
@@ -33,7 +33,7 @@ var updateServer = function($http, server) {
.
success
(
function
(
data
)
{
console
.
log
(
data
);
server
.
labels
=
data
.
metadata
.
labels
;
server
.
host
=
data
.
s
pec
.
host
.
split
(
'.'
)[
0
];
server
.
host
=
data
.
s
tatus
.
hostIP
.
split
(
'.'
)[
0
];
server
.
status
=
data
.
status
.
phase
;
server
.
dockerImage
=
data
.
status
.
containerStatuses
[
0
].
image
;
updateImage
(
$http
,
server
);
...
...
test/e2e/kubectl.go
View file @
493e0cdb
...
...
@@ -102,7 +102,7 @@ var _ = Describe("Kubectl client", func() {
By
(
"rolling-update to new replication controller"
)
runKubectl
(
"rolling-update"
,
"update-demo-nautilus"
,
"--update-period=1s"
,
"-f"
,
kittenPath
,
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
))
// TODO: revisit the expected replicas once #9645 is resolved
validateController
(
c
,
kittenImage
,
1
,
"update-demo"
,
updateDemoSelector
,
getUDData
(
"kitten.jpg"
,
ns
),
ns
)
validateController
(
c
,
kittenImage
,
4
,
"update-demo"
,
updateDemoSelector
,
getUDData
(
"kitten.jpg"
,
ns
),
ns
)
// Everything will hopefully be cleaned up when the namespace is deleted.
})
})
...
...
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