Skip to content

Commit 9c9f668

Browse files
Merge pull request #20777 from deads2k/server-22-scrub-start
clean up construction to make creating types more obvious
2 parents 2f53b45 + 3563995 commit 9c9f668

File tree

47 files changed

+275
-510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+275
-510
lines changed

pkg/apps/apiserver/registry/deployconfig/etcd/etcd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"github.com/openshift/origin/pkg/apps/apiserver/registry/deployconfig"
2828
appsutil "github.com/openshift/origin/pkg/apps/util"
2929
printersinternal "github.com/openshift/origin/pkg/printers/internalversion"
30-
"github.com/openshift/origin/pkg/util/restoptions"
3130
)
3231

3332
// REST contains the REST storage for DeploymentConfig objects.
@@ -52,7 +51,7 @@ func (r *REST) ShortNames() []string {
5251
// NewREST returns a deploymentConfigREST containing the REST storage for DeploymentConfig objects,
5352
// a statusREST containing the REST storage for changing the status of a DeploymentConfig,
5453
// and a scaleREST containing the REST storage for the Scale subresources of DeploymentConfigs.
55-
func NewREST(optsGetter restoptions.Getter) (*REST, *StatusREST, *ScaleREST, error) {
54+
func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST, *ScaleREST, error) {
5655
store := &registry.Store{
5756
NewFunc: func() runtime.Object { return &appsapi.DeploymentConfig{} },
5857
NewListFunc: func() runtime.Object { return &appsapi.DeploymentConfigList{} },

pkg/authorization/apiserver/registry/rolebindingrestriction/etcd/etcd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
authorizationapi "github.com/openshift/origin/pkg/authorization/apis/authorization"
1313
"github.com/openshift/origin/pkg/authorization/apiserver/registry/rolebindingrestriction"
1414
printersinternal "github.com/openshift/origin/pkg/printers/internalversion"
15-
"github.com/openshift/origin/pkg/util/restoptions"
1615
)
1716

1817
type REST struct {
@@ -22,7 +21,7 @@ type REST struct {
2221
var _ rest.StandardStorage = &REST{}
2322

2423
// NewREST returns a RESTStorage object that will work against nodes.
25-
func NewREST(optsGetter restoptions.Getter) (*REST, error) {
24+
func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) {
2625
store := &registry.Store{
2726
NewFunc: func() runtime.Object { return &authorizationapi.RoleBindingRestriction{} },
2827
NewListFunc: func() runtime.Object { return &authorizationapi.RoleBindingRestrictionList{} },

pkg/build/apiserver/registry/build/etcd/etcd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
buildapi "github.com/openshift/origin/pkg/build/apis/build"
1616
buildregistry "github.com/openshift/origin/pkg/build/apiserver/registry/build"
1717
printersinternal "github.com/openshift/origin/pkg/printers/internalversion"
18-
"github.com/openshift/origin/pkg/util/restoptions"
1918
)
2019

2120
type REST struct {
@@ -31,7 +30,7 @@ func (r *REST) Categories() []string {
3130
}
3231

3332
// NewREST returns a RESTStorage object that will work against Build objects.
34-
func NewREST(optsGetter restoptions.Getter) (*REST, *DetailsREST, error) {
33+
func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *DetailsREST, error) {
3534
store := &registry.Store{
3635
NewFunc: func() runtime.Object { return &buildapi.Build{} },
3736
NewListFunc: func() runtime.Object { return &buildapi.BuildList{} },

pkg/build/apiserver/registry/buildconfig/etcd/etcd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
buildapi "github.com/openshift/origin/pkg/build/apis/build"
1313
"github.com/openshift/origin/pkg/build/apiserver/registry/buildconfig"
1414
printersinternal "github.com/openshift/origin/pkg/printers/internalversion"
15-
"github.com/openshift/origin/pkg/util/restoptions"
1615
)
1716

1817
type REST struct {
@@ -34,7 +33,7 @@ func (r *REST) ShortNames() []string {
3433
}
3534

3635
// NewREST returns a RESTStorage object that will work against BuildConfig.
37-
func NewREST(optsGetter restoptions.Getter) (*REST, error) {
36+
func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) {
3837
store := &registry.Store{
3938
NewFunc: func() runtime.Object { return &buildapi.BuildConfig{} },
4039
NewListFunc: func() runtime.Object { return &buildapi.BuildConfigList{} },

pkg/cmd/openshift-apiserver/openshiftapiserver/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"github.com/openshift/origin/pkg/cmd/openshift-apiserver/openshiftapiserver/configprocessing"
2626
configapi "github.com/openshift/origin/pkg/cmd/server/apis/config"
2727
originadmission "github.com/openshift/origin/pkg/cmd/server/origin/admission"
28-
originrest "github.com/openshift/origin/pkg/cmd/server/origin/rest"
2928
"github.com/openshift/origin/pkg/image/apiserver/registryhostname"
3029
sccstorage "github.com/openshift/origin/pkg/security/apiserver/registry/securitycontextconstraints/etcd"
3130
usercache "github.com/openshift/origin/pkg/user/cache"
@@ -49,7 +48,7 @@ func NewOpenshiftAPIConfig(openshiftAPIServerConfig *configapi.MasterConfig) (*O
4948
if err != nil {
5049
return nil, err
5150
}
52-
restOptsGetter, err := originrest.StorageOptions(*openshiftAPIServerConfig)
51+
restOptsGetter, err := NewRESTOptionsGetter(*openshiftAPIServerConfig)
5352
if err != nil {
5453
return nil, err
5554
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package configprocessing
2+
3+
import "fmt"
4+
5+
func GetCloudProviderConfigFile(args map[string][]string) (string, error) {
6+
filenames, ok := args["cloud-config"]
7+
if !ok {
8+
return "", nil
9+
}
10+
if len(filenames) != 1 {
11+
return "", fmt.Errorf(`one or zero "--cloud-config" required, not %v`, filenames)
12+
}
13+
14+
return filenames[0], nil
15+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package configprocessing
2+
3+
import (
4+
configapi "github.com/openshift/origin/pkg/cmd/server/apis/config"
5+
cmdflags "github.com/openshift/origin/pkg/cmd/util/flags"
6+
"k8s.io/apimachinery/pkg/runtime/schema"
7+
utilerrors "k8s.io/apimachinery/pkg/util/errors"
8+
"k8s.io/apiserver/pkg/server/options"
9+
"k8s.io/apiserver/pkg/storage/storagebackend"
10+
)
11+
12+
// GetEtcdOptions takes configuration information and flag overrides to produce the upstream etcdoptions.
13+
func GetEtcdOptions(startingFlags map[string][]string, etcdConnectionInfo configapi.EtcdConnectionInfo, storagePrefix string, defaultWatchCacheSizes map[schema.GroupResource]int) (*options.EtcdOptions, error) {
14+
storageConfig := storagebackend.NewDefaultConfig(storagePrefix, nil)
15+
storageConfig.Type = "etcd3"
16+
storageConfig.ServerList = etcdConnectionInfo.URLs
17+
storageConfig.KeyFile = etcdConnectionInfo.ClientCert.KeyFile
18+
storageConfig.CertFile = etcdConnectionInfo.ClientCert.CertFile
19+
storageConfig.CAFile = etcdConnectionInfo.CA
20+
21+
etcdOptions := options.NewEtcdOptions(storageConfig)
22+
etcdOptions.DefaultStorageMediaType = "application/vnd.kubernetes.protobuf"
23+
etcdOptions.DefaultWatchCacheSize = 0
24+
if err := cmdflags.ResolveIgnoreMissing(startingFlags, etcdOptions.AddFlags); len(err) > 0 {
25+
return nil, utilerrors.NewAggregate(err)
26+
}
27+
28+
if etcdOptions.EnableWatchCache {
29+
watchCacheSizes := map[schema.GroupResource]int{}
30+
for k, v := range defaultWatchCacheSizes {
31+
watchCacheSizes[k] = v
32+
}
33+
34+
if userSpecified, err := options.ParseWatchCacheSizes(etcdOptions.WatchCacheSizes); err == nil {
35+
for resource, size := range userSpecified {
36+
watchCacheSizes[resource] = size
37+
}
38+
}
39+
40+
var err error
41+
etcdOptions.WatchCacheSizes, err = options.WriteWatchCacheSizes(watchCacheSizes)
42+
if err != nil {
43+
return nil, err
44+
}
45+
}
46+
47+
return etcdOptions, nil
48+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
package openshiftapiserver
2+
3+
import (
4+
"strconv"
5+
6+
"k8s.io/apimachinery/pkg/runtime/schema"
7+
genericregistry "k8s.io/apiserver/pkg/registry/generic"
8+
"k8s.io/apiserver/pkg/server/options"
9+
apiserverstorage "k8s.io/apiserver/pkg/server/storage"
10+
serverstorage "k8s.io/apiserver/pkg/server/storage"
11+
"k8s.io/kubernetes/pkg/api/legacyscheme"
12+
13+
"github.com/openshift/origin/pkg/cmd/openshift-apiserver/openshiftapiserver/configprocessing"
14+
configapi "github.com/openshift/origin/pkg/cmd/server/apis/config"
15+
)
16+
17+
// NewConfigGetter returns a restoptions.Getter implemented using information from the provided master config.
18+
func NewRESTOptionsGetter(masterOptions configapi.MasterConfig) (genericregistry.RESTOptionsGetter, error) {
19+
var err error
20+
targetRAMMB := 0
21+
if targetRamString := masterOptions.KubernetesMasterConfig.APIServerArguments["target-ram-mb"]; len(targetRamString) == 1 {
22+
targetRAMMB, err = strconv.Atoi(targetRamString[0])
23+
if err != nil {
24+
return nil, err
25+
}
26+
}
27+
28+
etcdOptions, err := configprocessing.GetEtcdOptions(
29+
masterOptions.KubernetesMasterConfig.APIServerArguments,
30+
masterOptions.EtcdClientInfo,
31+
masterOptions.EtcdStorageConfig.OpenShiftStoragePrefix,
32+
newHeuristicWatchCacheSizes(targetRAMMB),
33+
)
34+
35+
storageFactory := apiserverstorage.NewDefaultStorageFactory(
36+
etcdOptions.StorageConfig,
37+
etcdOptions.DefaultStorageMediaType,
38+
legacyscheme.Codecs,
39+
apiserverstorage.NewDefaultResourceEncodingConfig(legacyscheme.Scheme),
40+
&serverstorage.ResourceConfig{},
41+
specialDefaultResourcePrefixes,
42+
)
43+
restOptionsGetter := &options.StorageFactoryRestOptionsFactory{
44+
Options: *etcdOptions,
45+
StorageFactory: storageFactory,
46+
}
47+
return restOptionsGetter, nil
48+
}
49+
50+
// newHeuristicWatchCacheSizes returns a map of suggested watch cache sizes based on total
51+
// memory. It reuses the upstream heuristic and adds OpenShift specific resources.
52+
func newHeuristicWatchCacheSizes(expectedRAMCapacityMB int) map[schema.GroupResource]int {
53+
// TODO: Revisit this heuristic, copied from upstream
54+
clusterSize := expectedRAMCapacityMB / 60
55+
56+
// default enable watch caches for resources that will have a high number of clients accessing it
57+
// and where the write rate may be significant
58+
watchCacheSizes := make(map[schema.GroupResource]int)
59+
watchCacheSizes[schema.GroupResource{Group: "network.openshift.io", Resource: "hostsubnets"}] = maxInt(5*clusterSize, 100)
60+
watchCacheSizes[schema.GroupResource{Group: "network.openshift.io", Resource: "netnamespaces"}] = maxInt(5*clusterSize, 100)
61+
watchCacheSizes[schema.GroupResource{Group: "network.openshift.io", Resource: "egressnetworkpolicies"}] = maxInt(10*clusterSize, 100)
62+
return watchCacheSizes
63+
}
64+
65+
func maxInt(a, b int) int {
66+
if a > b {
67+
return a
68+
}
69+
return b
70+
}
71+
72+
// specialDefaultResourcePrefixes are prefixes compiled into Kubernetes.
73+
var specialDefaultResourcePrefixes = map[schema.GroupResource]string{
74+
{Resource: "clusterpolicies"}: "authorization/cluster/policies",
75+
{Resource: "clusterpolicies", Group: "authorization.openshift.io"}: "authorization/cluster/policies",
76+
{Resource: "clusterpolicybindings"}: "authorization/cluster/policybindings",
77+
{Resource: "clusterpolicybindings", Group: "authorization.openshift.io"}: "authorization/cluster/policybindings",
78+
{Resource: "policies"}: "authorization/local/policies",
79+
{Resource: "policies", Group: "authorization.openshift.io"}: "authorization/local/policies",
80+
{Resource: "policybindings"}: "authorization/local/policybindings",
81+
{Resource: "policybindings", Group: "authorization.openshift.io"}: "authorization/local/policybindings",
82+
83+
{Resource: "oauthaccesstokens"}: "oauth/accesstokens",
84+
{Resource: "oauthaccesstokens", Group: "oauth.openshift.io"}: "oauth/accesstokens",
85+
{Resource: "oauthauthorizetokens"}: "oauth/authorizetokens",
86+
{Resource: "oauthauthorizetokens", Group: "oauth.openshift.io"}: "oauth/authorizetokens",
87+
{Resource: "oauthclients"}: "oauth/clients",
88+
{Resource: "oauthclients", Group: "oauth.openshift.io"}: "oauth/clients",
89+
{Resource: "oauthclientauthorizations"}: "oauth/clientauthorizations",
90+
{Resource: "oauthclientauthorizations", Group: "oauth.openshift.io"}: "oauth/clientauthorizations",
91+
92+
{Resource: "identities"}: "useridentities",
93+
{Resource: "identities", Group: "user.openshift.io"}: "useridentities",
94+
95+
{Resource: "clusternetworks"}: "registry/sdnnetworks",
96+
{Resource: "clusternetworks", Group: "network.openshift.io"}: "registry/sdnnetworks",
97+
{Resource: "egressnetworkpolicies"}: "registry/egressnetworkpolicy",
98+
{Resource: "egressnetworkpolicies", Group: "network.openshift.io"}: "registry/egressnetworkpolicy",
99+
{Resource: "hostsubnets"}: "registry/sdnsubnets",
100+
{Resource: "hostsubnets", Group: "network.openshift.io"}: "registry/sdnsubnets",
101+
{Resource: "netnamespaces"}: "registry/sdnnetnamespaces",
102+
{Resource: "netnamespaces", Group: "network.openshift.io"}: "registry/sdnnetnamespaces",
103+
}

pkg/cmd/openshift-apiserver/server.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
configapi "github.com/openshift/origin/pkg/cmd/server/apis/config"
1515
"github.com/openshift/origin/pkg/cmd/server/apis/config/validation"
1616
"github.com/openshift/origin/pkg/cmd/util"
17-
"github.com/openshift/origin/pkg/cmd/util/variable"
1817
)
1918

2019
func RunOpenShiftAPIServer(masterConfig *configapi.MasterConfig) error {
@@ -51,11 +50,6 @@ func RunOpenShiftAPIServer(masterConfig *configapi.MasterConfig) error {
5150
preparedOpenshiftAPIServer := openshiftAPIServer.GenericAPIServer.PrepareRun()
5251

5352
glog.Infof("Starting master on %s (%s)", masterConfig.ServingInfo.BindAddress, version.Get().String())
54-
glog.Infof("Public master address is %s", masterConfig.MasterPublicURL)
55-
imageTemplate := variable.NewDefaultImageTemplate()
56-
imageTemplate.Format = masterConfig.ImageConfig.Format
57-
imageTemplate.Latest = masterConfig.ImageConfig.Latest
58-
glog.Infof("Using images from %q", imageTemplate.ExpandOrDie("<component>"))
5953

6054
if err := preparedOpenshiftAPIServer.Run(utilwait.NeverStop); err != nil {
6155
return err

pkg/cmd/openshift-controller-manager/controller_manager.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
origincontrollers "github.com/openshift/origin/pkg/cmd/openshift-controller-manager/controller"
1111
configapi "github.com/openshift/origin/pkg/cmd/server/apis/config"
1212
"github.com/openshift/origin/pkg/cmd/util"
13+
"github.com/openshift/origin/pkg/cmd/util/variable"
1314
"github.com/openshift/origin/pkg/version"
1415
"k8s.io/api/core/v1"
1516
"k8s.io/apimachinery/pkg/util/wait"
@@ -38,6 +39,19 @@ func RunOpenShiftControllerManager(config *configapi.OpenshiftControllerConfig,
3839
}
3940
}
4041

42+
{
43+
imageTemplate := variable.NewDefaultImageTemplate()
44+
imageTemplate.Format = config.Deployer.ImageTemplateFormat.Format
45+
imageTemplate.Latest = config.Deployer.ImageTemplateFormat.Latest
46+
glog.Infof("DeploymentConfig controller using images from %q", imageTemplate.ExpandOrDie("<component>"))
47+
}
48+
{
49+
imageTemplate := variable.NewDefaultImageTemplate()
50+
imageTemplate.Format = config.Build.ImageTemplateFormat.Format
51+
imageTemplate.Latest = config.Build.ImageTemplateFormat.Latest
52+
glog.Infof("Build controller using images from %q", imageTemplate.ExpandOrDie("<component>"))
53+
}
54+
4155
originControllerManager := func(stopCh <-chan struct{}) {
4256
if err := waitForHealthyAPIServer(kubeClient.Discovery().RESTClient()); err != nil {
4357
glog.Fatal(err)

pkg/cmd/server/kubernetes/master/master_config.go

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
apiserverstorage "k8s.io/apiserver/pkg/server/storage"
3131
"k8s.io/apiserver/pkg/storage"
3232
storagefactory "k8s.io/apiserver/pkg/storage/storagebackend/factory"
33-
utilflag "k8s.io/apiserver/pkg/util/flag"
3433
"k8s.io/client-go/rest"
3534
"k8s.io/kube-aggregator/pkg/apis/apiregistration"
3635
apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1"
@@ -73,15 +72,6 @@ var LegacyAPIGroupPrefixes = sets.NewString(apiserver.DefaultLegacyAPIPrefix, le
7372
// BuildKubeAPIserverOptions constructs the appropriate kube-apiserver run options.
7473
// It returns an error if no KubernetesMasterConfig was defined.
7574
func BuildKubeAPIserverOptions(masterConfig configapi.MasterConfig) (*kapiserveroptions.ServerRunOptions, error) {
76-
host, portString, err := net.SplitHostPort(masterConfig.ServingInfo.BindAddress)
77-
if err != nil {
78-
return nil, err
79-
}
80-
port, err := strconv.Atoi(portString)
81-
if err != nil {
82-
return nil, err
83-
}
84-
8575
portRange, err := knet.ParsePortRange(masterConfig.KubernetesMasterConfig.ServicesNodePortRange)
8676
if err != nil {
8777
return nil, err
@@ -97,11 +87,10 @@ func BuildKubeAPIserverOptions(masterConfig configapi.MasterConfig) (*kapiserver
9787
server.ServiceNodePortRange = *portRange
9888
server.Features.EnableProfiling = true
9989

100-
server.SecureServing.BindAddress = net.ParseIP(host)
101-
server.SecureServing.BindPort = port
102-
server.SecureServing.BindNetwork = masterConfig.ServingInfo.BindNetwork
103-
server.SecureServing.ServerCert.CertKey.CertFile = masterConfig.ServingInfo.ServerCert.CertFile
104-
server.SecureServing.ServerCert.CertKey.KeyFile = masterConfig.ServingInfo.ServerCert.KeyFile
90+
server.SecureServing, err = configprocessing.ToServingOptions(masterConfig.ServingInfo)
91+
if err != nil {
92+
return nil, err
93+
}
10594
server.InsecureServing.BindPort = 0
10695

10796
// disable anonymous authentication
@@ -121,29 +110,15 @@ func BuildKubeAPIserverOptions(masterConfig configapi.MasterConfig) (*kapiserver
121110
}
122111
}
123112

124-
server.Etcd.EnableGarbageCollection = true
125-
server.Etcd.StorageConfig.Type = "etcd3"
126-
server.Etcd.DefaultStorageMediaType = "application/json" // TODO(post-1.6.1-rebase): enable protobuf with etcd3 as upstream
127-
server.Etcd.StorageConfig.Quorum = true
128-
server.Etcd.StorageConfig.Prefix = masterConfig.EtcdStorageConfig.KubernetesStoragePrefix
129-
server.Etcd.StorageConfig.ServerList = masterConfig.EtcdClientInfo.URLs
130-
server.Etcd.StorageConfig.KeyFile = masterConfig.EtcdClientInfo.ClientCert.KeyFile
131-
server.Etcd.StorageConfig.CertFile = masterConfig.EtcdClientInfo.ClientCert.CertFile
132-
server.Etcd.StorageConfig.CAFile = masterConfig.EtcdClientInfo.CA
133-
server.Etcd.DefaultWatchCacheSize = 0
113+
server.Etcd, err = configprocessing.GetEtcdOptions(masterConfig.KubernetesMasterConfig.APIServerArguments, masterConfig.EtcdClientInfo, masterConfig.EtcdStorageConfig.KubernetesStoragePrefix, nil)
114+
if err != nil {
115+
return nil, err
116+
}
134117

135118
server.GenericServerRunOptions.CorsAllowedOriginList = masterConfig.CORSAllowedOrigins
136119
server.GenericServerRunOptions.MaxRequestsInFlight = masterConfig.ServingInfo.MaxRequestsInFlight
137120
server.GenericServerRunOptions.MaxMutatingRequestsInFlight = masterConfig.ServingInfo.MaxRequestsInFlight / 2
138121
server.GenericServerRunOptions.MinRequestTimeout = masterConfig.ServingInfo.RequestTimeoutSeconds
139-
for _, nc := range masterConfig.ServingInfo.NamedCertificates {
140-
sniCert := utilflag.NamedCertKey{
141-
CertFile: nc.CertFile,
142-
KeyFile: nc.KeyFile,
143-
Names: nc.Names,
144-
}
145-
server.SecureServing.SNICertKeys = append(server.SecureServing.SNICertKeys, sniCert)
146-
}
147122

148123
server.KubeletConfig.ReadOnlyPort = 0
149124
server.KubeletConfig.Port = masterConfig.KubeletClientInfo.Port

0 commit comments

Comments
 (0)