-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set default for DeploymentConfigSpec.RevisionHistoryLimit in apps/v1 …
…to 10. Fix tests now that we are really not doing cascade delete for legacy API. (Brings group API into tests.)
- Loading branch information
Showing
18 changed files
with
478 additions
and
36 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
api/protobuf-spec/github_com_openshift_origin_pkg_deploy_apis_apps_v1.proto
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package clientset | ||
|
||
import ( | ||
discovery "k8s.io/client-go/discovery" | ||
rest "k8s.io/client-go/rest" | ||
flowcontrol "k8s.io/client-go/util/flowcontrol" | ||
|
||
appsV1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/apps/v1" | ||
) | ||
|
||
type Interface interface { | ||
AppsV1() appsV1.AppsV1Interface | ||
} | ||
|
||
// Clientset contains the clients for groups. Each group has exactly one | ||
// version included in a Clientset. | ||
type Clientset struct { | ||
*discovery.DiscoveryClient | ||
appsV1 *appsV1.AppsV1Client | ||
} | ||
|
||
// Make sure Clientset implements Interface | ||
var _ Interface = &Clientset{} | ||
|
||
// AppsV1 retrieves the AppsV1Client | ||
func (c *Clientset) AppsV1() appsV1.AppsV1Interface { | ||
return c.appsV1 | ||
} | ||
|
||
// NewForConfig creates a new Clientset for the given config. | ||
func NewForConfig(c *rest.Config) (*Clientset, error) { | ||
configShallowCopy := *c | ||
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { | ||
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) | ||
} | ||
|
||
var cs Clientset | ||
var err error | ||
|
||
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
cs.appsV1, err = appsV1.NewForConfig(&configShallowCopy) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return &cs, nil | ||
} | ||
|
||
// NewForConfigOrDie creates a new Clientset for the given config and | ||
// panics if there is an error in the config. | ||
func NewForConfigOrDie(c *rest.Config) *Clientset { | ||
cs, err := NewForConfig(c) | ||
if err != nil { | ||
panic(err) | ||
} | ||
return cs | ||
} |
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.