Merge pull request #41136 from deads2k/apiserver-10-example

Automatic merge from submit-queue (batch tested with PRs 41121, 40048, 40502, 41136, 40759)

add k8s.io/sample-apiserver to demonstrate how to build an aggregated API server

builds on https://github.com/kubernetes/kubernetes/pull/41093

This creates a sample API server is a separate staging repo to guarantee no cheating with `k8s.io/kubernetes` dependencies.  The sample is run during integration tests (simple tests on it so far) to ensure that it continues to run.

@sttts @kubernetes/sig-api-machinery-misc ptal
@pwittrock @pmorie @kris-nova an aggregated API server example that will stay up to date.
This commit is contained in:
Kubernetes Submit Queue
2017-02-09 14:27:48 -08:00
committed by GitHub
53 changed files with 1571 additions and 223 deletions

View File

@@ -47,7 +47,7 @@ const (
func newStorageFactory() genericapiserver.StorageFactory {
config := storagebackend.Config{
Prefix: genericoptions.DefaultEtcdPathPrefix,
Prefix: kubeoptions.DefaultEtcdPathPrefix,
ServerList: []string{"http://127.0.0.1:2379"},
Copier: api.Scheme,
}
@@ -68,7 +68,7 @@ type ServerRunOptions struct {
func NewServerRunOptions() *ServerRunOptions {
s := ServerRunOptions{
GenericServerRunOptions: genericoptions.NewServerRunOptions(),
Etcd: genericoptions.NewEtcdOptions(api.Scheme),
Etcd: genericoptions.NewEtcdOptions(kubeoptions.DefaultEtcdPathPrefix, api.Scheme, nil),
SecureServing: genericoptions.NewSecureServingOptions(),
InsecureServing: genericoptions.NewInsecureServingOptions(),
Authentication: kubeoptions.NewBuiltInAuthenticationOptions().WithAll(),