Skip to content

Commit

Permalink
Fix the Compliance namespace in Voltron's proxy targets (#3145)
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-dekker authored Jan 30, 2024
1 parent 052fa36 commit b00e770
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/controller/manager/manager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"

v3 "github.com/tigera/api/pkg/apis/projectcalico/v3"

operatorv1 "github.com/tigera/operator/api/v1"
"github.com/tigera/operator/pkg/common"
"github.com/tigera/operator/pkg/controller/certificatemanager"
Expand Down Expand Up @@ -658,6 +659,7 @@ func (r *ReconcileManager) Reconcile(ctx context.Context, request reconcile.Requ
Replicas: replicas,
Compliance: complianceCR,
ComplianceLicenseActive: complianceLicenseFeatureActive,
ComplianceNamespace: utils.NewNamespaceHelper(r.multiTenant, render.ComplianceNamespace, request.Namespace).InstallNamespace(),
UsePSP: r.usePSP,
Namespace: helper.InstallNamespace(),
TruthNamespace: helper.TruthNamespace(),
Expand Down
3 changes: 2 additions & 1 deletion pkg/render/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ type ManagerConfiguration struct {
Replicas *int32
Compliance *operatorv1.Compliance
ComplianceLicenseActive bool
ComplianceNamespace string

// Whether the cluster supports pod security policies.
UsePSP bool
Expand Down Expand Up @@ -498,7 +499,7 @@ func (c *managerComponent) voltronContainer() corev1.Container {

env := []corev1.EnvVar{
{Name: "VOLTRON_PORT", Value: defaultVoltronPort},
{Name: "VOLTRON_COMPLIANCE_ENDPOINT", Value: fmt.Sprintf("https://compliance.%s.svc.%s", c.cfg.Namespace, c.cfg.ClusterDomain)},
{Name: "VOLTRON_COMPLIANCE_ENDPOINT", Value: fmt.Sprintf("https://compliance.%s.svc.%s", c.cfg.ComplianceNamespace, c.cfg.ClusterDomain)},
{Name: "VOLTRON_LOGLEVEL", Value: "Info"},
{Name: "VOLTRON_KIBANA_ENDPOINT", Value: rkibana.HTTPSEndpoint(c.SupportedOSType(), c.cfg.ClusterDomain)},
{Name: "VOLTRON_KIBANA_BASE_PATH", Value: fmt.Sprintf("/%s/", KibanaBasePath)},
Expand Down

0 comments on commit b00e770

Please sign in to comment.