Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/apps/apis/apps/v1/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func Convert_apps_RollingDeploymentStrategyParams_To_v1_RollingDeploymentStrateg

func Convert_v1_DeploymentTriggerPolicies_To_apps_DeploymentTriggerPolicy(in *DeploymentTriggerPolicies, out *[]newer.DeploymentTriggerPolicy, s conversion.Scope) error {
if in != nil {
policies := *out
policies := []newer.DeploymentTriggerPolicy{}
for i := range *in {
tmp := newer.DeploymentTriggerPolicy{}
if err := s.Convert(&(*in)[i], &tmp, 0); err != nil {
Expand All @@ -123,7 +123,7 @@ func Convert_v1_DeploymentTriggerPolicies_To_apps_DeploymentTriggerPolicy(in *De

func Convert_apps_DeploymentTriggerPolicy_To_v1_DeploymentTriggerPolicies(in *[]newer.DeploymentTriggerPolicy, out *DeploymentTriggerPolicies, s conversion.Scope) error {
if in != nil {
policies := *out
policies := DeploymentTriggerPolicies{}
for i := range *in {
tmp := DeploymentTriggerPolicy{}
if err := s.Convert(&(*in)[i], &tmp, 0); err != nil {
Expand Down
6 changes: 4 additions & 2 deletions test/integration/deploy_defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ func setEssentialDefaults(dc *deployapi.DeploymentConfig) *deployapi.DeploymentC
MaxSurge: intstr.FromString("25%"),
}
dc.Spec.Strategy.ActiveDeadlineSeconds = int64ptr(21600)
dc.Spec.Triggers = []deployapi.DeploymentTriggerPolicy{}
dc.Spec.Triggers = []deployapi.DeploymentTriggerPolicy{
{Type: deployapi.DeploymentTriggerOnConfigChange},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reflects the reality... if you send an DC with nil triggers to server it will be defaulted to have config change trigger and send back...

@tnozicka @Kargakis probably interesting for you.

}
dc.Spec.Template.Spec.Containers[0].TerminationMessagePath = "/dev/termination-log"
dc.Spec.Template.Spec.Containers[0].TerminationMessagePolicy = "File"
dc.Spec.Template.Spec.Containers[0].ImagePullPolicy = "IfNotPresent"
Expand Down Expand Up @@ -219,7 +221,7 @@ func TestDeploymentConfigDefaults(t *testing.T) {

clearTransient(appsDC)
if !reflect.DeepEqual(appsDC, tc.apps) {
t.Errorf("Apps DC differs from expected output: %s", diff.ObjectReflectDiff(&appsDC, tc.apps))
t.Errorf("Apps DC differs from expected output: %s", diff.ObjectReflectDiff(appsDC, tc.apps))
}
})
}
Expand Down