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
e4f3232e
Unverified
Commit
e4f3232e
authored
Jan 25, 2018
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer apps/v1 storage for daemonsets, deployments, replicasets
parent
068e1642
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
21 deletions
+19
-21
resourceListing.json
api/swagger-spec/resourceListing.json
+4
-4
server.go
cmd/kube-apiserver/app/server.go
+3
-5
install.go
pkg/apis/apps/install/install.go
+1
-1
etcd_storage_path_test.go
test/integration/etcd/etcd_storage_path_test.go
+11
-11
No files found.
api/swagger-spec/resourceListing.json
View file @
e4f3232e
...
@@ -154,16 +154,16 @@
...
@@ -154,16 +154,16 @@
"description"
:
"get information of a group"
"description"
:
"get information of a group"
},
},
{
{
"path"
:
"/apis/apps/v1
beta1
"
,
"path"
:
"/apis/apps/v1"
,
"description"
:
"API at /apis/apps/v1
beta1
"
"description"
:
"API at /apis/apps/v1"
},
},
{
{
"path"
:
"/apis/apps/v1beta2"
,
"path"
:
"/apis/apps/v1beta2"
,
"description"
:
"API at /apis/apps/v1beta2"
"description"
:
"API at /apis/apps/v1beta2"
},
},
{
{
"path"
:
"/apis/apps/v1"
,
"path"
:
"/apis/apps/v1
beta1
"
,
"description"
:
"API at /apis/apps/v1"
"description"
:
"API at /apis/apps/v1
beta1
"
},
},
{
{
"path"
:
"/apis/apps"
,
"path"
:
"/apis/apps"
,
...
...
cmd/kube-apiserver/app/server.go
View file @
e4f3232e
...
@@ -587,11 +587,9 @@ func BuildStorageFactory(s *options.ServerRunOptions, apiResourceConfig *servers
...
@@ -587,11 +587,9 @@ func BuildStorageFactory(s *options.ServerRunOptions, apiResourceConfig *servers
}
}
storageFactory
.
AddCohabitatingResources
(
networking
.
Resource
(
"networkpolicies"
),
extensions
.
Resource
(
"networkpolicies"
))
storageFactory
.
AddCohabitatingResources
(
networking
.
Resource
(
"networkpolicies"
),
extensions
.
Resource
(
"networkpolicies"
))
storageFactory
.
AddCohabitatingResources
(
apps
.
Resource
(
"deployments"
),
extensions
.
Resource
(
"deployments"
))
// keep Deployments, Daemonsets and ReplicaSets in extensions for backwards compatibility, we'll have to migrate at some point, eventually
storageFactory
.
AddCohabitatingResources
(
apps
.
Resource
(
"daemonsets"
),
extensions
.
Resource
(
"daemonsets"
))
storageFactory
.
AddCohabitatingResources
(
extensions
.
Resource
(
"deployments"
),
apps
.
Resource
(
"deployments"
))
storageFactory
.
AddCohabitatingResources
(
apps
.
Resource
(
"replicasets"
),
extensions
.
Resource
(
"replicasets"
))
storageFactory
.
AddCohabitatingResources
(
extensions
.
Resource
(
"daemonsets"
),
apps
.
Resource
(
"daemonsets"
))
storageFactory
.
AddCohabitatingResources
(
extensions
.
Resource
(
"replicasets"
),
apps
.
Resource
(
"replicasets"
))
storageFactory
.
AddCohabitatingResources
(
api
.
Resource
(
"events"
),
events
.
Resource
(
"events"
))
storageFactory
.
AddCohabitatingResources
(
api
.
Resource
(
"events"
),
events
.
Resource
(
"events"
))
for
_
,
override
:=
range
s
.
Etcd
.
EtcdServersOverrides
{
for
_
,
override
:=
range
s
.
Etcd
.
EtcdServersOverrides
{
tokens
:=
strings
.
Split
(
override
,
"#"
)
tokens
:=
strings
.
Split
(
override
,
"#"
)
...
...
pkg/apis/apps/install/install.go
View file @
e4f3232e
...
@@ -38,7 +38,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
...
@@ -38,7 +38,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
if
err
:=
announced
.
NewGroupMetaFactory
(
if
err
:=
announced
.
NewGroupMetaFactory
(
&
announced
.
GroupMetaFactoryArgs
{
&
announced
.
GroupMetaFactoryArgs
{
GroupName
:
apps
.
GroupName
,
GroupName
:
apps
.
GroupName
,
VersionPreferenceOrder
:
[]
string
{
v1
beta1
.
SchemeGroupVersion
.
Version
,
v1beta2
.
SchemeGroupVersion
.
Version
,
v
1
.
SchemeGroupVersion
.
Version
},
VersionPreferenceOrder
:
[]
string
{
v1
.
SchemeGroupVersion
.
Version
,
v1beta2
.
SchemeGroupVersion
.
Version
,
v1beta
1
.
SchemeGroupVersion
.
Version
},
AddInternalObjectsToScheme
:
apps
.
AddToScheme
,
AddInternalObjectsToScheme
:
apps
.
AddToScheme
,
},
},
announced
.
VersionToSchemeFunc
{
announced
.
VersionToSchemeFunc
{
...
...
test/integration/etcd/etcd_storage_path_test.go
View file @
e4f3232e
...
@@ -132,15 +132,17 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
...
@@ -132,15 +132,17 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
gvr
(
"apps"
,
"v1beta1"
,
"statefulsets"
)
:
{
gvr
(
"apps"
,
"v1beta1"
,
"statefulsets"
)
:
{
stub
:
`{"metadata": {"name": "ss1"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}}}}`
,
stub
:
`{"metadata": {"name": "ss1"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}}}}`
,
expectedEtcdPath
:
"/registry/statefulsets/etcdstoragepathtestnamespace/ss1"
,
expectedEtcdPath
:
"/registry/statefulsets/etcdstoragepathtestnamespace/ss1"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1"
,
"StatefulSet"
),
},
},
gvr
(
"apps"
,
"v1beta1"
,
"deployments"
)
:
{
gvr
(
"apps"
,
"v1beta1"
,
"deployments"
)
:
{
stub
:
`{"metadata": {"name": "deployment2"}, "spec": {"selector": {"matchLabels": {"f": "z"}}, "template": {"metadata": {"labels": {"f": "z"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
stub
:
`{"metadata": {"name": "deployment2"}, "spec": {"selector": {"matchLabels": {"f": "z"}}, "template": {"metadata": {"labels": {"f": "z"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
expectedEtcdPath
:
"/registry/deployments/etcdstoragepathtestnamespace/deployment2"
,
expectedEtcdPath
:
"/registry/deployments/etcdstoragepathtestnamespace/deployment2"
,
expectedGVK
:
gvkP
(
"
extensions"
,
"v1beta
1"
,
"Deployment"
),
expectedGVK
:
gvkP
(
"
apps"
,
"v
1"
,
"Deployment"
),
},
},
gvr
(
"apps"
,
"v1beta1"
,
"controllerrevisions"
)
:
{
gvr
(
"apps"
,
"v1beta1"
,
"controllerrevisions"
)
:
{
stub
:
`{"metadata":{"name":"crs1"},"data":{"name":"abc","namespace":"default","creationTimestamp":null,"Spec":{"Replicas":0,"Selector":{"matchLabels":{"foo":"bar"}},"Template":{"creationTimestamp":null,"labels":{"foo":"bar"},"Spec":{"Volumes":null,"InitContainers":null,"Containers":null,"RestartPolicy":"Always","TerminationGracePeriodSeconds":null,"ActiveDeadlineSeconds":null,"DNSPolicy":"ClusterFirst","NodeSelector":null,"ServiceAccountName":"","AutomountServiceAccountToken":null,"NodeName":"","SecurityContext":null,"ImagePullSecrets":null,"Hostname":"","Subdomain":"","Affinity":null,"SchedulerName":"","Tolerations":null,"HostAliases":null}},"VolumeClaimTemplates":null,"ServiceName":""},"Status":{"ObservedGeneration":null,"Replicas":0}},"revision":0}`
,
stub
:
`{"metadata":{"name":"crs1"},"data":{"name":"abc","namespace":"default","creationTimestamp":null,"Spec":{"Replicas":0,"Selector":{"matchLabels":{"foo":"bar"}},"Template":{"creationTimestamp":null,"labels":{"foo":"bar"},"Spec":{"Volumes":null,"InitContainers":null,"Containers":null,"RestartPolicy":"Always","TerminationGracePeriodSeconds":null,"ActiveDeadlineSeconds":null,"DNSPolicy":"ClusterFirst","NodeSelector":null,"ServiceAccountName":"","AutomountServiceAccountToken":null,"NodeName":"","SecurityContext":null,"ImagePullSecrets":null,"Hostname":"","Subdomain":"","Affinity":null,"SchedulerName":"","Tolerations":null,"HostAliases":null}},"VolumeClaimTemplates":null,"ServiceName":""},"Status":{"ObservedGeneration":null,"Replicas":0}},"revision":0}`
,
expectedEtcdPath
:
"/registry/controllerrevisions/etcdstoragepathtestnamespace/crs1"
,
expectedEtcdPath
:
"/registry/controllerrevisions/etcdstoragepathtestnamespace/crs1"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1"
,
"ControllerRevision"
),
},
},
// --
// --
...
@@ -148,27 +150,27 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
...
@@ -148,27 +150,27 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
gvr
(
"apps"
,
"v1beta2"
,
"statefulsets"
)
:
{
gvr
(
"apps"
,
"v1beta2"
,
"statefulsets"
)
:
{
stub
:
`{"metadata": {"name": "ss2"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}}}}`
,
stub
:
`{"metadata": {"name": "ss2"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}}}}`
,
expectedEtcdPath
:
"/registry/statefulsets/etcdstoragepathtestnamespace/ss2"
,
expectedEtcdPath
:
"/registry/statefulsets/etcdstoragepathtestnamespace/ss2"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1
beta1
"
,
"StatefulSet"
),
expectedGVK
:
gvkP
(
"apps"
,
"v1"
,
"StatefulSet"
),
},
},
gvr
(
"apps"
,
"v1beta2"
,
"deployments"
)
:
{
gvr
(
"apps"
,
"v1beta2"
,
"deployments"
)
:
{
stub
:
`{"metadata": {"name": "deployment3"}, "spec": {"selector": {"matchLabels": {"f": "z"}}, "template": {"metadata": {"labels": {"f": "z"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
stub
:
`{"metadata": {"name": "deployment3"}, "spec": {"selector": {"matchLabels": {"f": "z"}}, "template": {"metadata": {"labels": {"f": "z"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
expectedEtcdPath
:
"/registry/deployments/etcdstoragepathtestnamespace/deployment3"
,
expectedEtcdPath
:
"/registry/deployments/etcdstoragepathtestnamespace/deployment3"
,
expectedGVK
:
gvkP
(
"
extensions"
,
"v1beta
1"
,
"Deployment"
),
expectedGVK
:
gvkP
(
"
apps"
,
"v
1"
,
"Deployment"
),
},
},
gvr
(
"apps"
,
"v1beta2"
,
"daemonsets"
)
:
{
gvr
(
"apps"
,
"v1beta2"
,
"daemonsets"
)
:
{
stub
:
`{"metadata": {"name": "ds5"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
stub
:
`{"metadata": {"name": "ds5"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
expectedEtcdPath
:
"/registry/daemonsets/etcdstoragepathtestnamespace/ds5"
,
expectedEtcdPath
:
"/registry/daemonsets/etcdstoragepathtestnamespace/ds5"
,
expectedGVK
:
gvkP
(
"
extensions"
,
"v1beta
1"
,
"DaemonSet"
),
expectedGVK
:
gvkP
(
"
apps"
,
"v
1"
,
"DaemonSet"
),
},
},
gvr
(
"apps"
,
"v1beta2"
,
"replicasets"
)
:
{
gvr
(
"apps"
,
"v1beta2"
,
"replicasets"
)
:
{
stub
:
`{"metadata": {"name": "rs2"}, "spec": {"selector": {"matchLabels": {"g": "h"}}, "template": {"metadata": {"labels": {"g": "h"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container4"}]}}}}`
,
stub
:
`{"metadata": {"name": "rs2"}, "spec": {"selector": {"matchLabels": {"g": "h"}}, "template": {"metadata": {"labels": {"g": "h"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container4"}]}}}}`
,
expectedEtcdPath
:
"/registry/replicasets/etcdstoragepathtestnamespace/rs2"
,
expectedEtcdPath
:
"/registry/replicasets/etcdstoragepathtestnamespace/rs2"
,
expectedGVK
:
gvkP
(
"
extensions"
,
"v1beta
1"
,
"ReplicaSet"
),
expectedGVK
:
gvkP
(
"
apps"
,
"v
1"
,
"ReplicaSet"
),
},
},
gvr
(
"apps"
,
"v1beta2"
,
"controllerrevisions"
)
:
{
gvr
(
"apps"
,
"v1beta2"
,
"controllerrevisions"
)
:
{
stub
:
`{"metadata":{"name":"crs2"},"data":{"name":"abc","namespace":"default","creationTimestamp":null,"Spec":{"Replicas":0,"Selector":{"matchLabels":{"foo":"bar"}},"Template":{"creationTimestamp":null,"labels":{"foo":"bar"},"Spec":{"Volumes":null,"InitContainers":null,"Containers":null,"RestartPolicy":"Always","TerminationGracePeriodSeconds":null,"ActiveDeadlineSeconds":null,"DNSPolicy":"ClusterFirst","NodeSelector":null,"ServiceAccountName":"","AutomountServiceAccountToken":null,"NodeName":"","SecurityContext":null,"ImagePullSecrets":null,"Hostname":"","Subdomain":"","Affinity":null,"SchedulerName":"","Tolerations":null,"HostAliases":null}},"VolumeClaimTemplates":null,"ServiceName":""},"Status":{"ObservedGeneration":null,"Replicas":0}},"revision":0}`
,
stub
:
`{"metadata":{"name":"crs2"},"data":{"name":"abc","namespace":"default","creationTimestamp":null,"Spec":{"Replicas":0,"Selector":{"matchLabels":{"foo":"bar"}},"Template":{"creationTimestamp":null,"labels":{"foo":"bar"},"Spec":{"Volumes":null,"InitContainers":null,"Containers":null,"RestartPolicy":"Always","TerminationGracePeriodSeconds":null,"ActiveDeadlineSeconds":null,"DNSPolicy":"ClusterFirst","NodeSelector":null,"ServiceAccountName":"","AutomountServiceAccountToken":null,"NodeName":"","SecurityContext":null,"ImagePullSecrets":null,"Hostname":"","Subdomain":"","Affinity":null,"SchedulerName":"","Tolerations":null,"HostAliases":null}},"VolumeClaimTemplates":null,"ServiceName":""},"Status":{"ObservedGeneration":null,"Replicas":0}},"revision":0}`
,
expectedEtcdPath
:
"/registry/controllerrevisions/etcdstoragepathtestnamespace/crs2"
,
expectedEtcdPath
:
"/registry/controllerrevisions/etcdstoragepathtestnamespace/crs2"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1
beta1
"
,
"ControllerRevision"
),
expectedGVK
:
gvkP
(
"apps"
,
"v1"
,
"ControllerRevision"
),
},
},
// --
// --
...
@@ -176,27 +178,22 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
...
@@ -176,27 +178,22 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
gvr
(
"apps"
,
"v1"
,
"daemonsets"
)
:
{
gvr
(
"apps"
,
"v1"
,
"daemonsets"
)
:
{
stub
:
`{"metadata": {"name": "ds6"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
stub
:
`{"metadata": {"name": "ds6"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
expectedEtcdPath
:
"/registry/daemonsets/etcdstoragepathtestnamespace/ds6"
,
expectedEtcdPath
:
"/registry/daemonsets/etcdstoragepathtestnamespace/ds6"
,
expectedGVK
:
gvkP
(
"extensions"
,
"v1beta1"
,
"DaemonSet"
),
},
},
gvr
(
"apps"
,
"v1"
,
"deployments"
)
:
{
gvr
(
"apps"
,
"v1"
,
"deployments"
)
:
{
stub
:
`{"metadata": {"name": "deployment4"}, "spec": {"selector": {"matchLabels": {"f": "z"}}, "template": {"metadata": {"labels": {"f": "z"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
stub
:
`{"metadata": {"name": "deployment4"}, "spec": {"selector": {"matchLabels": {"f": "z"}}, "template": {"metadata": {"labels": {"f": "z"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
expectedEtcdPath
:
"/registry/deployments/etcdstoragepathtestnamespace/deployment4"
,
expectedEtcdPath
:
"/registry/deployments/etcdstoragepathtestnamespace/deployment4"
,
expectedGVK
:
gvkP
(
"extensions"
,
"v1beta1"
,
"Deployment"
),
},
},
gvr
(
"apps"
,
"v1"
,
"statefulsets"
)
:
{
gvr
(
"apps"
,
"v1"
,
"statefulsets"
)
:
{
stub
:
`{"metadata": {"name": "ss3"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}}}}`
,
stub
:
`{"metadata": {"name": "ss3"}, "spec": {"selector": {"matchLabels": {"a": "b"}}, "template": {"metadata": {"labels": {"a": "b"}}}}}`
,
expectedEtcdPath
:
"/registry/statefulsets/etcdstoragepathtestnamespace/ss3"
,
expectedEtcdPath
:
"/registry/statefulsets/etcdstoragepathtestnamespace/ss3"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1beta1"
,
"StatefulSet"
),
},
},
gvr
(
"apps"
,
"v1"
,
"replicasets"
)
:
{
gvr
(
"apps"
,
"v1"
,
"replicasets"
)
:
{
stub
:
`{"metadata": {"name": "rs3"}, "spec": {"selector": {"matchLabels": {"g": "h"}}, "template": {"metadata": {"labels": {"g": "h"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container4"}]}}}}`
,
stub
:
`{"metadata": {"name": "rs3"}, "spec": {"selector": {"matchLabels": {"g": "h"}}, "template": {"metadata": {"labels": {"g": "h"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container4"}]}}}}`
,
expectedEtcdPath
:
"/registry/replicasets/etcdstoragepathtestnamespace/rs3"
,
expectedEtcdPath
:
"/registry/replicasets/etcdstoragepathtestnamespace/rs3"
,
expectedGVK
:
gvkP
(
"extensions"
,
"v1beta1"
,
"ReplicaSet"
),
},
},
gvr
(
"apps"
,
"v1"
,
"controllerrevisions"
)
:
{
gvr
(
"apps"
,
"v1"
,
"controllerrevisions"
)
:
{
stub
:
`{"metadata":{"name":"crs3"},"data":{"name":"abc","namespace":"default","creationTimestamp":null,"Spec":{"Replicas":0,"Selector":{"matchLabels":{"foo":"bar"}},"Template":{"creationTimestamp":null,"labels":{"foo":"bar"},"Spec":{"Volumes":null,"InitContainers":null,"Containers":null,"RestartPolicy":"Always","TerminationGracePeriodSeconds":null,"ActiveDeadlineSeconds":null,"DNSPolicy":"ClusterFirst","NodeSelector":null,"ServiceAccountName":"","AutomountServiceAccountToken":null,"NodeName":"","SecurityContext":null,"ImagePullSecrets":null,"Hostname":"","Subdomain":"","Affinity":null,"SchedulerName":"","Tolerations":null,"HostAliases":null}},"VolumeClaimTemplates":null,"ServiceName":""},"Status":{"ObservedGeneration":null,"Replicas":0}},"revision":0}`
,
stub
:
`{"metadata":{"name":"crs3"},"data":{"name":"abc","namespace":"default","creationTimestamp":null,"Spec":{"Replicas":0,"Selector":{"matchLabels":{"foo":"bar"}},"Template":{"creationTimestamp":null,"labels":{"foo":"bar"},"Spec":{"Volumes":null,"InitContainers":null,"Containers":null,"RestartPolicy":"Always","TerminationGracePeriodSeconds":null,"ActiveDeadlineSeconds":null,"DNSPolicy":"ClusterFirst","NodeSelector":null,"ServiceAccountName":"","AutomountServiceAccountToken":null,"NodeName":"","SecurityContext":null,"ImagePullSecrets":null,"Hostname":"","Subdomain":"","Affinity":null,"SchedulerName":"","Tolerations":null,"HostAliases":null}},"VolumeClaimTemplates":null,"ServiceName":""},"Status":{"ObservedGeneration":null,"Replicas":0}},"revision":0}`
,
expectedEtcdPath
:
"/registry/controllerrevisions/etcdstoragepathtestnamespace/crs3"
,
expectedEtcdPath
:
"/registry/controllerrevisions/etcdstoragepathtestnamespace/crs3"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1beta1"
,
"ControllerRevision"
),
},
},
// --
// --
...
@@ -256,6 +253,7 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
...
@@ -256,6 +253,7 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
gvr
(
"extensions"
,
"v1beta1"
,
"daemonsets"
)
:
{
gvr
(
"extensions"
,
"v1beta1"
,
"daemonsets"
)
:
{
stub
:
`{"metadata": {"name": "ds1"}, "spec": {"selector": {"matchLabels": {"u": "t"}}, "template": {"metadata": {"labels": {"u": "t"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container5"}]}}}}`
,
stub
:
`{"metadata": {"name": "ds1"}, "spec": {"selector": {"matchLabels": {"u": "t"}}, "template": {"metadata": {"labels": {"u": "t"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container5"}]}}}}`
,
expectedEtcdPath
:
"/registry/daemonsets/etcdstoragepathtestnamespace/ds1"
,
expectedEtcdPath
:
"/registry/daemonsets/etcdstoragepathtestnamespace/ds1"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1"
,
"DaemonSet"
),
},
},
gvr
(
"extensions"
,
"v1beta1"
,
"podsecuritypolicies"
)
:
{
gvr
(
"extensions"
,
"v1beta1"
,
"podsecuritypolicies"
)
:
{
stub
:
`{"metadata": {"name": "psp1"}, "spec": {"fsGroup": {"rule": "RunAsAny"}, "privileged": true, "runAsUser": {"rule": "RunAsAny"}, "seLinux": {"rule": "MustRunAs"}, "supplementalGroups": {"rule": "RunAsAny"}}}`
,
stub
:
`{"metadata": {"name": "psp1"}, "spec": {"fsGroup": {"rule": "RunAsAny"}, "privileged": true, "runAsUser": {"rule": "RunAsAny"}, "seLinux": {"rule": "MustRunAs"}, "supplementalGroups": {"rule": "RunAsAny"}}}`
,
...
@@ -273,10 +271,12 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
...
@@ -273,10 +271,12 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
gvr
(
"extensions"
,
"v1beta1"
,
"deployments"
)
:
{
gvr
(
"extensions"
,
"v1beta1"
,
"deployments"
)
:
{
stub
:
`{"metadata": {"name": "deployment1"}, "spec": {"selector": {"matchLabels": {"f": "z"}}, "template": {"metadata": {"labels": {"f": "z"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
stub
:
`{"metadata": {"name": "deployment1"}, "spec": {"selector": {"matchLabels": {"f": "z"}}, "template": {"metadata": {"labels": {"f": "z"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container6"}]}}}}`
,
expectedEtcdPath
:
"/registry/deployments/etcdstoragepathtestnamespace/deployment1"
,
expectedEtcdPath
:
"/registry/deployments/etcdstoragepathtestnamespace/deployment1"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1"
,
"Deployment"
),
},
},
gvr
(
"extensions"
,
"v1beta1"
,
"replicasets"
)
:
{
gvr
(
"extensions"
,
"v1beta1"
,
"replicasets"
)
:
{
stub
:
`{"metadata": {"name": "rs1"}, "spec": {"selector": {"matchLabels": {"g": "h"}}, "template": {"metadata": {"labels": {"g": "h"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container4"}]}}}}`
,
stub
:
`{"metadata": {"name": "rs1"}, "spec": {"selector": {"matchLabels": {"g": "h"}}, "template": {"metadata": {"labels": {"g": "h"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container4"}]}}}}`
,
expectedEtcdPath
:
"/registry/replicasets/etcdstoragepathtestnamespace/rs1"
,
expectedEtcdPath
:
"/registry/replicasets/etcdstoragepathtestnamespace/rs1"
,
expectedGVK
:
gvkP
(
"apps"
,
"v1"
,
"ReplicaSet"
),
},
},
// --
// --
...
...
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