File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 5
5
"io"
6
6
"net"
7
7
8
+ "github.com/appscode/stash/apis/repositories/v1alpha1"
8
9
"github.com/appscode/stash/pkg/controller"
9
10
"github.com/appscode/stash/pkg/server"
10
11
"github.com/spf13/pflag"
@@ -59,6 +60,19 @@ func (o StashOptions) Config() (*server.StashConfig, error) {
59
60
if err := o .RecommendedOptions .ApplyTo (serverConfig ); err != nil {
60
61
return nil , err
61
62
}
63
+ serverConfig .OpenAPIConfig = genericapiserver .DefaultOpenAPIConfig (v1alpha1 .GetOpenAPIDefinitions , server .Scheme )
64
+ serverConfig .OpenAPIConfig .Info .Title = "stash-server"
65
+ serverConfig .OpenAPIConfig .Info .Version = v1alpha1 .SchemeGroupVersion .Version
66
+ serverConfig .OpenAPIConfig .IgnorePrefixes = []string {
67
+ "/swaggerapi" ,
68
+ "/apis/admission.stash.appscode.com/v1alpha1/restics" ,
69
+ "/apis/admission.stash.appscode.com/v1alpha1/recoveries" ,
70
+ "/apis/admission.stash.appscode.com/v1alpha1/deployments" ,
71
+ "/apis/admission.stash.appscode.com/v1alpha1/daemonsets" ,
72
+ "/apis/admission.stash.appscode.com/v1alpha1/statefulsets" ,
73
+ "/apis/admission.stash.appscode.com/v1alpha1/replicationcontrollers" ,
74
+ "/apis/admission.stash.appscode.com/v1alpha1/replicasets" ,
75
+ }
62
76
63
77
controllerConfig := controller .NewControllerConfig (serverConfig .ClientConfig )
64
78
if err := o .ControllerOptions .ApplyTo (controllerConfig ); err != nil {
You can’t perform that action at this time.
0 commit comments