@@ -2,14 +2,11 @@ package acr_controller
22
33import (
44 "context"
5- "crypto/tls"
65 "fmt"
76 "net"
87 "net/http"
98 "time"
109
11- applisters "github.com/argoproj/argo-cd/v3/pkg/client/listers/application/v1alpha1"
12- settings_util "github.com/argoproj/argo-cd/v3/util/settings"
1310 "github.com/redis/go-redis/v9"
1411 log "github.com/sirupsen/logrus"
1512 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -36,15 +33,11 @@ var backoff = wait.Backoff{
3633type ACRServer struct {
3734 ACRServerOpts
3835
39- settings * settings_util.ArgoCDSettings
40- log * log.Entry
4136 appInformer cache.SharedIndexInformer
42- appLister applisters.ApplicationLister
4337 applicationClientset appclientset.Interface
4438
4539 // stopCh is the channel which when closed, will shutdown the Event Reporter server
46- stopCh chan struct {}
47- serviceSet * ACRServerSet
40+ stopCh chan struct {}
4841}
4942
5043type ACRServerSet struct {}
@@ -163,10 +156,6 @@ func (a *ACRServer) Listen() (*Listeners, error) {
163156// golang/protobuf).
164157func (a * ACRServer ) Run (ctx context.Context , lns * Listeners ) {
165158 httpS := a .newHTTPServer (ctx , a .ListenPort )
166- tlsConfig := tls.Config {}
167- tlsConfig .GetCertificate = func (_ * tls.ClientHelloInfo ) (* tls.Certificate , error ) {
168- return a .settings .Certificate , nil
169- }
170159 go func () { a .checkServeErr ("httpS" , httpS .Serve (lns .Main )) }()
171160 go a .RunController (ctx )
172161
@@ -187,13 +176,10 @@ func NewApplicationChangeRevisionServer(_ context.Context, opts ACRServerOpts) *
187176 appFactory := appinformer .NewSharedInformerFactoryWithOptions (opts .AppClientset , 0 , appinformer .WithNamespace (appInformerNs ), appinformer .WithTweakListOptions (func (_ * metav1.ListOptions ) {}))
188177
189178 appInformer := appFactory .Argoproj ().V1alpha1 ().Applications ().Informer ()
190- appLister := appFactory .Argoproj ().V1alpha1 ().Applications ().Lister ()
191179
192180 server := & ACRServer {
193181 ACRServerOpts : opts ,
194- log : log .NewEntry (log .StandardLogger ()),
195182 appInformer : appInformer ,
196- appLister : appLister ,
197183 applicationClientset : opts .AppClientset ,
198184 }
199185
0 commit comments