Skip to content

Commit fe8c609

Browse files
Merge pull request #20185 from deads2k/deploy-02-scheme
be tolerant on deployment decode and strict on encode
2 parents 73171de + e09f5f4 commit fe8c609

31 files changed

+280
-290
lines changed

pkg/apps/apiserver/apiserver.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import (
44
"sync"
55

66
"k8s.io/apimachinery/pkg/runtime"
7-
"k8s.io/apimachinery/pkg/runtime/schema"
87
"k8s.io/apimachinery/pkg/runtime/serializer"
98
"k8s.io/apiserver/pkg/registry/rest"
109
genericapiserver "k8s.io/apiserver/pkg/server"
1110
"k8s.io/client-go/kubernetes"
1211
restclient "k8s.io/client-go/rest"
13-
"k8s.io/kubernetes/pkg/api/legacyscheme"
1412
kclientsetinternal "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
1513

1614
appsapiv1 "github.com/openshift/api/apps/v1"
@@ -99,9 +97,6 @@ func (c *completedConfig) V1RESTStorage() (map[string]rest.Storage, error) {
9997
}
10098

10199
func (c *completedConfig) newV1RESTStorage() (map[string]rest.Storage, error) {
102-
// TODO sort out who is using this and why. it was hardcoded before the migration and I suspect that it is being used
103-
// to serialize out objects into annotations.
104-
externalVersionCodec := legacyscheme.Codecs.LegacyCodec(schema.GroupVersion{Group: "", Version: "v1"})
105100
openshiftInternalAppsClient, err := appsclientinternal.NewForConfig(c.GenericConfig.LoopbackClientConfig)
106101
if err != nil {
107102
return nil, err
@@ -128,10 +123,9 @@ func (c *completedConfig) newV1RESTStorage() (map[string]rest.Storage, error) {
128123
*deployConfigStorage.Store,
129124
openshiftInternalImageClient,
130125
kubeInternalClient,
131-
externalVersionCodec,
132126
c.GenericConfig.AdmissionControl,
133127
)
134-
deployConfigRollbackStorage := deployrollback.NewREST(openshiftInternalAppsClient, kubeInternalClient, externalVersionCodec)
128+
deployConfigRollbackStorage := deployrollback.NewREST(openshiftInternalAppsClient, kubeInternalClient)
135129

136130
v1Storage := map[string]rest.Storage{}
137131
v1Storage["deploymentConfigs"] = deployConfigStorage

pkg/apps/controller/deployer/deployer_controller.go

+4-7
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ type DeploymentController struct {
9191
// environment is a set of environment variables which should be injected into all
9292
// deployer pod containers.
9393
environment []v1.EnvVar
94-
// codec is used for deserializing deploymentconfigs from replication controller
95-
// annotations.
96-
codec runtime.Codec
9794
// recorder is used to record events.
9895
recorder record.EventRecorder
9996
}
@@ -136,7 +133,7 @@ func (c *DeploymentController) handle(deployment *v1.ReplicationController, will
136133
// deployer pod (quota, etc..) we should respect the timeoutSeconds in the
137134
// config strategy and transition the rollout to failed instead of waiting for
138135
// the deployment pod forever.
139-
config, err := appsutil.DecodeDeploymentConfig(deployment, c.codec)
136+
config, err := appsutil.DecodeDeploymentConfig(deployment)
140137
if err != nil {
141138
return err
142139
}
@@ -281,7 +278,7 @@ func (c *DeploymentController) handle(deployment *v1.ReplicationController, will
281278
// If we are going to transition to failed or complete and scale is non-zero, we'll check one more
282279
// time to see if we are a test deployment to guarantee that we maintain the test invariant.
283280
if *deploymentCopy.Spec.Replicas != 0 && appsutil.IsTerminatedDeployment(deploymentCopy) {
284-
if config, err := appsutil.DecodeDeploymentConfig(deploymentCopy, c.codec); err == nil && config.Spec.Test {
281+
if config, err := appsutil.DecodeDeploymentConfig(deploymentCopy); err == nil && config.Spec.Test {
285282
zero := int32(0)
286283
deploymentCopy.Spec.Replicas = &zero
287284
}
@@ -357,7 +354,7 @@ func nextStatusComp(fromDeployer, fromPath appsapi.DeploymentStatus) appsapi.Dep
357354
// makeDeployerPod creates a pod which implements deployment behavior. The pod is correlated to
358355
// the deployment with an annotation.
359356
func (c *DeploymentController) makeDeployerPod(deployment *v1.ReplicationController) (*v1.Pod, error) {
360-
deploymentConfig, err := appsutil.DecodeDeploymentConfig(deployment, c.codec)
357+
deploymentConfig, err := appsutil.DecodeDeploymentConfig(deployment)
361358
if err != nil {
362359
return nil, err
363360
}
@@ -557,7 +554,7 @@ func (c *DeploymentController) cleanupDeployerPods(deployment *v1.ReplicationCon
557554
}
558555

559556
func (c *DeploymentController) emitDeploymentEvent(deployment *v1.ReplicationController, eventType, title, message string) {
560-
if config, _ := appsutil.DecodeDeploymentConfig(deployment, c.codec); config != nil {
557+
if config, _ := appsutil.DecodeDeploymentConfig(deployment); config != nil {
561558
c.recorder.Eventf(config, eventType, title, message)
562559
} else {
563560
c.recorder.Eventf(deployment, eventType, title, message)

pkg/apps/controller/deployer/deployer_controller_test.go

+20-22
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,14 @@ import (
2727
kapi "k8s.io/kubernetes/pkg/apis/core"
2828
kapihelper "k8s.io/kubernetes/pkg/apis/core/helper"
2929

30-
appsapiv1 "github.com/openshift/api/apps/v1"
3130
appsapi "github.com/openshift/origin/pkg/apps/apis/apps"
3231
_ "github.com/openshift/origin/pkg/apps/apis/apps/install"
3332
appstest "github.com/openshift/origin/pkg/apps/apis/apps/test"
3433
appsutil "github.com/openshift/origin/pkg/apps/util"
3534
)
3635

3736
var (
38-
env = []kapi.EnvVar{{Name: "ENV1", Value: "VAL1"}}
39-
codec = legacyscheme.Codecs.LegacyCodec(appsapiv1.SchemeGroupVersion)
37+
env = []kapi.EnvVar{{Name: "ENV1", Value: "VAL1"}}
4038
)
4139

4240
func alwaysReady() bool { return true }
@@ -51,7 +49,7 @@ func okDeploymentController(client kclientset.Interface, deployment *v1.Replicat
5149
rcInformer := informerFactory.Core().V1().ReplicationControllers()
5250
podInformer := informerFactory.Core().V1().Pods()
5351

54-
c := NewDeployerController(rcInformer, podInformer, client, "sa:test", "openshift/origin-deployer", env, codec)
52+
c := NewDeployerController(rcInformer, podInformer, client, "sa:test", "openshift/origin-deployer", env)
5553
c.podListerSynced = alwaysReady
5654
c.rcListerSynced = alwaysReady
5755

@@ -185,7 +183,7 @@ func TestHandle_createPodOk(t *testing.T) {
185183
// Verify new -> pending
186184
config := appstest.OkDeploymentConfig(1)
187185
config.Spec.Strategy = appstest.OkCustomStrategy()
188-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
186+
deployment, _ := appsutil.MakeDeploymentV1(config)
189187
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusNew)
190188
deployment.Spec.Template.Spec.NodeSelector = map[string]string{"labelKey1": "labelValue1", "labelKey2": "labelValue2"}
191189
deployment.CreationTimestamp = metav1.Now()
@@ -276,7 +274,7 @@ func TestHandle_createPodFail(t *testing.T) {
276274
})
277275

278276
config := appstest.OkDeploymentConfig(1)
279-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
277+
deployment, _ := appsutil.MakeDeploymentV1(config)
280278
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusNew)
281279
deployment.CreationTimestamp = metav1.Now()
282280

@@ -332,7 +330,7 @@ func TestHandle_deployerPodAlreadyExists(t *testing.T) {
332330
var updatedDeployment *v1.ReplicationController
333331

334332
config := appstest.OkDeploymentConfig(1)
335-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
333+
deployment, _ := appsutil.MakeDeploymentV1(config)
336334
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusNew)
337335
deployment.CreationTimestamp = metav1.Now()
338336
deployerPodName := appsutil.DeployerPodNameForDeployment(deployment.Name)
@@ -373,7 +371,7 @@ func TestHandle_unrelatedPodAlreadyExists(t *testing.T) {
373371
var updatedDeployment *v1.ReplicationController
374372

375373
config := appstest.OkDeploymentConfig(1)
376-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
374+
deployment, _ := appsutil.MakeDeploymentV1(config)
377375
deployment.CreationTimestamp = metav1.Now()
378376
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusNew)
379377

@@ -414,7 +412,7 @@ func TestHandle_unrelatedPodAlreadyExistsTestScaled(t *testing.T) {
414412
var updatedDeployment *v1.ReplicationController
415413

416414
config := appstest.TestDeploymentConfig(appstest.OkDeploymentConfig(1))
417-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
415+
deployment, _ := appsutil.MakeDeploymentV1(config)
418416
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusNew)
419417
deployment.CreationTimestamp = metav1.Now()
420418
one := int32(1)
@@ -486,7 +484,7 @@ func TestHandle_noop(t *testing.T) {
486484
for _, test := range tests {
487485
client := fake.NewSimpleClientset()
488486

489-
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1), codec)
487+
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1))
490488
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(test.deploymentPhase)
491489
deployment.CreationTimestamp = metav1.Now()
492490

@@ -531,7 +529,7 @@ func TestHandle_failedTest(t *testing.T) {
531529

532530
// Verify successful cleanup
533531
config := appstest.TestDeploymentConfig(appstest.OkDeploymentConfig(1))
534-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
532+
deployment, _ := appsutil.MakeDeploymentV1(config)
535533
deployment.CreationTimestamp = metav1.Now()
536534
one := int32(1)
537535
deployment.Spec.Replicas = &one
@@ -574,7 +572,7 @@ func TestHandle_cleanupPodOk(t *testing.T) {
574572

575573
// Verify successful cleanup
576574
config := appstest.OkDeploymentConfig(1)
577-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
575+
deployment, _ := appsutil.MakeDeploymentV1(config)
578576
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusComplete)
579577
deployment.CreationTimestamp = metav1.Now()
580578

@@ -619,7 +617,7 @@ func TestHandle_cleanupPodOkTest(t *testing.T) {
619617

620618
// Verify successful cleanup
621619
config := appstest.TestDeploymentConfig(appstest.OkDeploymentConfig(1))
622-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
620+
deployment, _ := appsutil.MakeDeploymentV1(config)
623621
deployment.CreationTimestamp = metav1.Now()
624622
one := int32(1)
625623
deployment.Spec.Replicas = &one
@@ -664,7 +662,7 @@ func TestHandle_cleanupPodNoop(t *testing.T) {
664662

665663
// Verify no-op
666664
config := appstest.OkDeploymentConfig(1)
667-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
665+
deployment, _ := appsutil.MakeDeploymentV1(config)
668666
deployment.CreationTimestamp = metav1.Now()
669667
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusComplete)
670668

@@ -696,7 +694,7 @@ func TestHandle_cleanupPodFail(t *testing.T) {
696694

697695
// Verify error
698696
config := appstest.OkDeploymentConfig(1)
699-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
697+
deployment, _ := appsutil.MakeDeploymentV1(config)
700698
deployment.CreationTimestamp = metav1.Now()
701699
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusComplete)
702700

@@ -727,7 +725,7 @@ func TestHandle_cancelNew(t *testing.T) {
727725
return true, rc, nil
728726
})
729727

730-
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1), codec)
728+
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1))
731729
deployment.CreationTimestamp = metav1.Now()
732730
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusNew)
733731
deployment.Annotations[appsapi.DeploymentCancelledAnnotation] = appsapi.DeploymentCancelledAnnotationValue
@@ -749,7 +747,7 @@ func TestHandle_cleanupNewWithDeployers(t *testing.T) {
749747
var updatedDeployment *v1.ReplicationController
750748
deletedDeployer := false
751749

752-
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1), codec)
750+
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1))
753751
deployment.CreationTimestamp = metav1.Now()
754752
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(appsapi.DeploymentStatusNew)
755753
deployment.Annotations[appsapi.DeploymentCancelledAnnotation] = appsapi.DeploymentCancelledAnnotationValue
@@ -844,7 +842,7 @@ func TestHandle_cleanupPostNew(t *testing.T) {
844842
return true, nil, nil
845843
})
846844

847-
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1), codec)
845+
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1))
848846
deployment.CreationTimestamp = metav1.Now()
849847
deployment.Annotations[appsapi.DeploymentCancelledAnnotation] = appsapi.DeploymentCancelledAnnotationValue
850848
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(test.deploymentPhase)
@@ -903,7 +901,7 @@ func TestHandle_deployerPodDisappeared(t *testing.T) {
903901
return true, nil, nil
904902
})
905903

906-
deployment, err := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1), codec)
904+
deployment, err := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1))
907905
if err != nil {
908906
t.Errorf("%s: unexpected error: %v", test.name, err)
909907
continue
@@ -1043,7 +1041,7 @@ func TestHandle_transitionFromDeployer(t *testing.T) {
10431041
return true, nil, nil
10441042
})
10451043

1046-
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1), codec)
1044+
deployment, _ := appsutil.MakeDeploymentV1(appstest.OkDeploymentConfig(1))
10471045
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(test.deploymentPhase)
10481046
deployment.CreationTimestamp = metav1.Now()
10491047

@@ -1099,7 +1097,7 @@ func TestDeployerCustomLabelsAndAnnotations(t *testing.T) {
10991097
config.Spec.Strategy = test.strategy
11001098
config.Spec.Strategy.Labels = test.labels
11011099
config.Spec.Strategy.Annotations = test.annotations
1102-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
1100+
deployment, _ := appsutil.MakeDeploymentV1(config)
11031101

11041102
client := &fake.Clientset{}
11051103
client.AddReactor("create", "pods", func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
@@ -1130,7 +1128,7 @@ func TestMakeDeployerPod(t *testing.T) {
11301128
client := &fake.Clientset{}
11311129
controller := okDeploymentController(client, nil, nil, true, v1.PodUnknown)
11321130
config := appstest.OkDeploymentConfig(1)
1133-
deployment, _ := appsutil.MakeDeploymentV1(config, codec)
1131+
deployment, _ := appsutil.MakeDeploymentV1(config)
11341132
container := controller.makeDeployerContainer(&config.Spec.Strategy)
11351133
container.Resources = appsutil.CopyApiResourcesToV1Resources(&config.Spec.Strategy.Resources)
11361134
defaultGracePeriod := int64(10)

pkg/apps/controller/deployer/factory.go

-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"github.com/golang/glog"
88
"k8s.io/api/core/v1"
99
"k8s.io/apimachinery/pkg/api/errors"
10-
"k8s.io/apimachinery/pkg/runtime"
1110
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
1211
"k8s.io/apimachinery/pkg/util/wait"
1312
kcoreinformers "k8s.io/client-go/informers/core/v1"
@@ -31,7 +30,6 @@ func NewDeployerController(
3130
sa,
3231
image string,
3332
env []kapi.EnvVar,
34-
codec runtime.Codec,
3533
) *DeploymentController {
3634
eventBroadcaster := record.NewBroadcaster()
3735
eventBroadcaster.StartLogging(glog.Infof)
@@ -53,7 +51,6 @@ func NewDeployerController(
5351
deployerImage: image,
5452
environment: appsutil.CopyApiEnvVarToV1EnvVar(env),
5553
recorder: recorder,
56-
codec: codec,
5754
}
5855

5956
rcInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{

pkg/apps/controller/deploymentconfig/deploymentconfig_controller.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (c *DeploymentConfigController) Handle(config *appsapi.DeploymentConfig) er
150150

151151
configCopy := config.DeepCopy()
152152
// Process triggers and start an initial rollouts
153-
shouldTrigger, shouldSkip, err := triggerActivated(configCopy, latestExists, latestDeployment, c.codec)
153+
shouldTrigger, shouldSkip, err := triggerActivated(configCopy, latestExists, latestDeployment)
154154
if err != nil {
155155
return fmt.Errorf("triggerActivated failed: %v", err)
156156
}
@@ -179,7 +179,7 @@ func (c *DeploymentConfigController) Handle(config *appsapi.DeploymentConfig) er
179179

180180
// No deployments are running and the latest deployment doesn't exist, so
181181
// create the new deployment.
182-
deployment, err := appsutil.MakeDeploymentV1(config, c.codec)
182+
deployment, err := appsutil.MakeDeploymentV1(config)
183183
if err != nil {
184184
return fatalError(fmt.Sprintf("couldn't make deployment from (potentially invalid) deployment config %s: %v", appsutil.LabelForDeploymentConfig(config), err))
185185
}
@@ -541,7 +541,7 @@ func (c *DeploymentConfigController) cleanupOldDeployments(existingDeployments [
541541
// triggers were activated (config change or image change). The first bool indicates that
542542
// the triggers are active and second indicates if we should skip the rollout because we
543543
// are waiting for the trigger to complete update (waiting for image for example).
544-
func triggerActivated(config *appsapi.DeploymentConfig, latestExists bool, latestDeployment *v1.ReplicationController, codec runtime.Codec) (bool, bool, error) {
544+
func triggerActivated(config *appsapi.DeploymentConfig, latestExists bool, latestDeployment *v1.ReplicationController) (bool, bool, error) {
545545
if config.Spec.Paused {
546546
return false, false, nil
547547
}
@@ -598,7 +598,7 @@ func triggerActivated(config *appsapi.DeploymentConfig, latestExists bool, lates
598598
}
599599

600600
if configTrigger {
601-
isLatest, changes, err := appsutil.HasLatestPodTemplate(config, latestDeployment, codec)
601+
isLatest, changes, err := appsutil.HasLatestPodTemplate(config, latestDeployment)
602602
if err != nil {
603603
return false, false, fmt.Errorf("error while checking for latest pod template in replication controller: %v", err)
604604
}

pkg/apps/controller/deploymentconfig/deploymentconfig_controller_test.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ import (
1717
"k8s.io/client-go/kubernetes/fake"
1818
clientgotesting "k8s.io/client-go/testing"
1919
"k8s.io/client-go/tools/cache"
20-
"k8s.io/kubernetes/pkg/api/legacyscheme"
2120
kapi "k8s.io/kubernetes/pkg/apis/core"
2221
kapihelper "k8s.io/kubernetes/pkg/apis/core/helper"
2322

24-
appsv1 "github.com/openshift/api/apps/v1"
2523
appsapi "github.com/openshift/origin/pkg/apps/apis/apps"
2624
_ "github.com/openshift/origin/pkg/apps/apis/apps/install"
2725
appstest "github.com/openshift/origin/pkg/apps/apis/apps/test"
@@ -53,7 +51,7 @@ func TestHandleScenarios(t *testing.T) {
5351
config = appstest.TestDeploymentConfig(config)
5452
}
5553
config.Namespace = "test"
56-
deployment, _ := appsutil.MakeDeploymentV1(config, legacyscheme.Codecs.LegacyCodec(appsv1.SchemeGroupVersion))
54+
deployment, _ := appsutil.MakeDeploymentV1(config)
5755
deployment.Annotations[appsapi.DeploymentStatusAnnotation] = string(d.status)
5856
if d.cancelled {
5957
deployment.Annotations[appsapi.DeploymentCancelledAnnotation] = appsapi.DeploymentCancelledAnnotationValue
@@ -366,7 +364,6 @@ func TestHandleScenarios(t *testing.T) {
366364
deployments[rc.Name] = rc
367365
return true, rc, nil
368366
})
369-
codec := legacyscheme.Codecs.LegacyCodec(appsv1.SchemeGroupVersion)
370367

371368
dcInformer := &fakeDeploymentConfigInformer{
372369
informer: cache.NewSharedIndexInformer(
@@ -386,7 +383,7 @@ func TestHandleScenarios(t *testing.T) {
386383

387384
kubeInformerFactory := kinformers.NewSharedInformerFactory(kc, 0)
388385
rcInformer := kubeInformerFactory.Core().V1().ReplicationControllers()
389-
c := NewDeploymentConfigController(dcInformer, rcInformer, oc, kc, codec)
386+
c := NewDeploymentConfigController(dcInformer, rcInformer, oc, kc)
390387
c.dcStoreSynced = alwaysReady
391388
c.rcListerSynced = alwaysReady
392389

pkg/apps/controller/deploymentconfig/factory.go

-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"github.com/golang/glog"
88
"k8s.io/api/core/v1"
99
"k8s.io/apimachinery/pkg/api/errors"
10-
"k8s.io/apimachinery/pkg/runtime"
1110
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
1211
"k8s.io/apimachinery/pkg/util/wait"
1312
kcoreinformers "k8s.io/client-go/informers/core/v1"
@@ -31,7 +30,6 @@ func NewDeploymentConfigController(
3130
rcInformer kcoreinformers.ReplicationControllerInformer,
3231
appsClientset appsclient.Interface,
3332
kubeClientset kclientset.Interface,
34-
codec runtime.Codec,
3533
) *DeploymentConfigController {
3634
eventBroadcaster := record.NewBroadcaster()
3735
eventBroadcaster.StartLogging(glog.Infof)
@@ -52,7 +50,6 @@ func NewDeploymentConfigController(
5250
},
5351

5452
recorder: recorder,
55-
codec: codec,
5653
}
5754

5855
c.dcLister = dcInformer.Lister()

0 commit comments

Comments
 (0)