@@ -174,7 +174,7 @@ type managerComponent struct {
174174 tlsSecrets []* corev1.Secret
175175 tlsAnnotations map [string ]string
176176 managerImage string
177- proxyImage string
177+ voltronImage string
178178 uiAPIsImage string
179179}
180180
@@ -189,7 +189,7 @@ func (c *managerComponent) ResolveImages(is *operatorv1.ImageSet) error {
189189 errMsgs = append (errMsgs , err .Error ())
190190 }
191191
192- c .proxyImage , err = components .GetReference (components .ComponentManagerProxy , reg , path , prefix , is )
192+ c .voltronImage , err = components .GetReference (components .ComponentManagerProxy , reg , path , prefix , is )
193193 if err != nil {
194194 errMsgs = append (errMsgs , err .Error ())
195195 }
@@ -567,6 +567,12 @@ func (c *managerComponent) voltronContainer() corev1.Container {
567567 env = append (env , corev1.EnvVar {Name : "VOLTRON_TENANT_NAMESPACE" , Value : c .cfg .Tenant .Namespace })
568568 linseedEndpointEnv = corev1.EnvVar {Name : "VOLTRON_LINSEED_ENDPOINT" , Value : fmt .Sprintf ("https://tigera-linseed.%s.svc" , c .cfg .Tenant .Namespace )}
569569 }
570+
571+ if c .cfg .Tenant .ManagedClusterIsCalico () {
572+ // Enable access to / from Goldmane in Voltron.
573+ env = append (env , corev1.EnvVar {Name : "GOLDMANE_ENABLED" , Value : "true" })
574+ env = append (env , corev1.EnvVar {Name : "MANAGED_CLUSTER_SUPPORTS_IMPERSONATION" , Value : "false" })
575+ }
570576 }
571577 env = append (env , linseedEndpointEnv )
572578
@@ -576,7 +582,7 @@ func (c *managerComponent) voltronContainer() corev1.Container {
576582
577583 return corev1.Container {
578584 Name : VoltronName ,
579- Image : c .proxyImage ,
585+ Image : c .voltronImage ,
580586 ImagePullPolicy : ImagePullPolicy (),
581587 Env : env ,
582588 VolumeMounts : mounts ,
@@ -616,6 +622,14 @@ func (c *managerComponent) managerUIAPIsContainer() corev1.Container {
616622 env = append (env , corev1.EnvVar {Name : "LINSEED_URL" , Value : fmt .Sprintf ("https://tigera-linseed.%s.svc" , c .cfg .Namespace )})
617623 env = append (env , corev1.EnvVar {Name : "TENANT_NAMESPACE" , Value : c .cfg .Namespace })
618624 }
625+
626+ if c .cfg .Tenant .ManagedClusterIsCalico () {
627+ // Calico clusters do not give Guardian impersonation permissions.
628+ env = append (env , corev1.EnvVar {Name : "IMPERSONATE" , Value : "false" })
629+
630+ // Calico clusters use Goldmane for policy metrics and stats.
631+ env = append (env , corev1.EnvVar {Name : "GOLDMANE_ENABLED" , Value : "true" })
632+ }
619633 }
620634
621635 volumeMounts := append (
@@ -837,6 +851,16 @@ func managerClusterRole(managedCluster bool, kubernetesProvider operatorv1.Provi
837851 Verbs : []string {"create" },
838852 },
839853 )
854+
855+ if tenant .ManagedClusterIsCalico () {
856+ // Voltron needs permissions to write flow logs.
857+ cr .Rules = append (cr .Rules ,
858+ rbacv1.PolicyRule {
859+ APIGroups : []string {"linseed.tigera.io" },
860+ Resources : []string {"flowlogs" },
861+ Verbs : []string {"create" },
862+ })
863+ }
840864 }
841865
842866 if kubernetesProvider .IsOpenShift () {
0 commit comments