-
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.
Merge pull request #15642 from tnozicka/add-default-for-deploymentcon…
…figs Automatic merge from submit-queue Set default for DeploymentConfigSpec.RevisionHistoryLimit in apps/v1 At this point we don't default DeploymentConfigSpec.RevisionHistoryLimit in apps/v1 which is causing the deployments to have unlimited history which will lead to performance issues at scale and when deploying regularly. Note that upstream also defaulted RevisionHistoryLimit to 10 for Deployments in kubernetes/kubernetes#49924 Needs to be backported to 3.6.1 as well. cc: @smarterclayton @mfojtik @Kargakis
- Loading branch information
Showing
31 changed files
with
719 additions
and
76 deletions.
There are no files selected for viewing
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
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.