Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7e65fe67
Commit
7e65fe67
authored
Oct 23, 2019
by
Alishan Ladhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a complete set of metadata for Knative 0.5
parent
ef10683d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
17 deletions
+50
-17
spec/support/helpers/kubernetes_helpers.rb
spec/support/helpers/kubernetes_helpers.rb
+50
-17
No files found.
spec/support/helpers/kubernetes_helpers.rb
View file @
7e65fe67
...
@@ -511,25 +511,58 @@ module KubernetesHelpers
...
@@ -511,25 +511,58 @@ module KubernetesHelpers
end
end
# noinspection RubyStringKeysInHashInspection
# noinspection RubyStringKeysInHashInspection
def
knative_05_service
(
name:
"kubetest"
,
namespace:
"default"
,
domain:
"example.com"
)
def
knative_05_service
(
name:
'kubetest'
,
namespace:
'default'
,
domain:
'example.com'
,
description:
'a knative service'
,
environment:
'production'
)
{
{
"apiVersion"
=>
"serving.knative.dev/v1alpha1"
,
"metadata"
=>
{
"kind"
=>
"Service"
,
"creationTimestamp"
=>
"2018-11-21T06:16:33Z"
,
"metadata"
=>
{
"annotations"
=>
{
"serving.knative.dev/creator"
=>
"system:serviceaccount:
#{
namespace
}
:
#{
namespace
}
-service-account"
,
"serving.knative.dev/lastModifier"
=>
"system:serviceaccount:
#{
namespace
}
:
#{
namespace
}
-service-account"
},
"creationTimestamp"
=>
"2019-10-22T21:19:19Z"
,
"generation"
=>
1
,
"labels"
=>
{
"service"
=>
name
},
"name"
=>
name
,
"name"
=>
name
,
"namespace"
=>
namespace
,
"namespace"
=>
namespace
,
"selfLink"
=>
"/apis/serving.knative.dev/v1alpha1/namespaces/
#{
namespace
}
/services/
#{
name
}
"
"resourceVersion"
=>
"330390"
,
"selfLink"
=>
"/apis/serving.knative.dev/v1alpha1/namespaces/
#{
namespace
}
/services/
#{
name
}
"
,
"uid"
=>
"9c710da6-f511-11e9-9ba0-42010a800161"
},
"spec"
=>
{
"runLatest"
=>
{
"configuration"
=>
{
"revisionTemplate"
=>
{
"metadata"
=>
{
"annotations"
=>
{
"Description"
=>
description
},
"creationTimestamp"
=>
"2019-10-22T21:19:19Z"
,
"labels"
=>
{
"service"
=>
name
}
},
},
"spec"
=>
{
"spec"
=>
{
"generation"
=>
2
"container"
=>
{
"env"
=>
[{
"name"
=>
"timestamp"
,
"value"
=>
"2019-10-22 21:19:19"
}],
"image"
=>
"image_name"
,
"name"
=>
""
,
"resources"
=>
{
"requests"
=>
{
"cpu"
=>
"400m"
}
}
},
},
"status"
=>
{
"timeoutSeconds"
=>
300
"domain"
=>
"
#{
name
}
.
#{
namespace
}
.
#{
domain
}
"
,
}
"domainInternal"
=>
"
#{
name
}
.
#{
namespace
}
.svc.cluster.local"
,
}
"latestCreatedRevisionName"
=>
"
#{
name
}
-00002"
,
"latestReadyRevisionName"
=>
"
#{
name
}
-00002"
,
"observedGeneration"
=>
2
}
}
}
}
},
"status"
=>
{
"address"
=>
{
"hostname"
=>
"
#{
name
}
.
#{
namespace
}
.svc.cluster.local"
},
"conditions"
=>
[{
"lastTransitionTime"
=>
"2019-10-22T21:20:24Z"
,
"status"
=>
"True"
,
"type"
=>
"ConfigurationsReady"
},
{
"lastTransitionTime"
=>
"2019-10-22T21:20:24Z"
,
"status"
=>
"True"
,
"type"
=>
"Ready"
},
{
"lastTransitionTime"
=>
"2019-10-22T21:20:24Z"
,
"status"
=>
"True"
,
"type"
=>
"RoutesReady"
}],
"domain"
=>
"
#{
name
}
.
#{
namespace
}
.
#{
domain
}
"
,
"domainInternal"
=>
"
#{
name
}
.
#{
namespace
}
.svc.cluster.local"
,
"latestCreatedRevisionName"
=>
"
#{
name
}
-58qgr"
,
"latestReadyRevisionName"
=>
"
#{
name
}
-58qgr"
,
"observedGeneration"
=>
1
,
"traffic"
=>
[{
"percent"
=>
100
,
"revisionName"
=>
"
#{
name
}
-58qgr"
}]
},
"environment_scope"
=>
environment
,
"cluster_id"
=>
8
,
"podcount"
=>
0
}
end
end
def
kube_terminals
(
service
,
pod
)
def
kube_terminals
(
service
,
pod
)
...
...
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