-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set default for DeploymentConfigSpec.RevisionHistoryLimit in apps/v1 #15642
Merged
openshift-merge-robot
merged 1 commit into
openshift:master
from
tnozicka:add-default-for-deploymentconfigs
Aug 25, 2017
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have my doubts about if this ever worked -
restStorage
should have beenstore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smarterclayton @mfojtik This seems to be indeed a bug that we have carried for a long time.
What do we want to do with legacy API cascade deletion? We enabled it for new DCs by
origin/pkg/deploy/controller/deploymentconfig/controller_ref_manager.go
Line 143 in e98a1a9
origin/test/extended/deployments/deployments.go
Line 1098 in e98a1a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wrong that the patch would change the propagation policy. (We used to set a finalizer here, but now there is only blockOwnerDeletion which doesn't affect it in that way. So I will rephrase the question:
@smarterclayton @mfojtik I guess we initially wanted DCs created by legacy API not to have cascading deletion but given that we have failed at it due to this bug. Given that it has already been in a release (https://github.com/openshift/origin/blame/master/pkg/cmd/server/origin/legacy.go#L209) do we want to turn it back again? What's the policy for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mfojtik @smarterclayton bump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tnozicka that is right, it should be
store
and notrestStorage
(@deads2k).I think we should fix this bug and backport to 3.5, @deads2k @smarterclayton thoughts?