Created
January 29, 2015 19:36
-
-
Save smarterclayton/d4145348de9feaf36967 to your computer and use it in GitHub Desktop.
NewTestImageOpenShift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handlerContainer := master.NewHandlerContainer(osMux) | |
_ = master.New(&master.Config{ | |
Client: kubeClient, | |
EtcdHelper: etcdHelper, | |
HealthCheckMinions: false, | |
KubeletClient: kubeletClient, | |
APIPrefix: "/api/v1beta1", | |
RestfulContainer: handlerContainer, | |
}) | |
interfaces, _ := latest.InterfacesFor(latest.Version) | |
imageEtcd := imageetcd.New(etcdHelper, imageetcd.DefaultRegistryFunc(func() (string, bool) { return openshift.dockerServer.URL, true })) | |
storage := map[string]apiserver.RESTStorage{ | |
"images": image.NewREST(imageEtcd), | |
"imageRepositories": imagerepository.NewREST(imageEtcd), | |
"imageRepositoryMappings": imagerepositorymapping.NewREST(imageEtcd, imageEtcd), | |
"imageRepositoryTags": imagerepositorytag.NewREST(imageEtcd, imageEtcd), | |
} | |
osPrefix := "/osapi/v1beta1" | |
apiserver.NewAPIGroupVersion(storage, latest.Codec, osPrefix, interfaces.MetadataAccessor, admit.NewAlwaysAdmit()).InstallREST(handlerContainer, "/osapi", "v1beta1") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment