Skip to content

Commit 6df6dfb

Browse files
pramodbindaltekton-robot
authored andcommitted
Fix: Syncer Service Transformer
1. Default Kueue Namespace on openshiftr must be openshift-kueue-operator bit kueue-system update the image prefix as container name in deployment is controller not workload-controller
1 parent 4f9fdfa commit 6df6dfb

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

pkg/reconciler/common/transformers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const (
5555
PrunerImagePrefix = "IMAGE_PRUNER_"
5656
SchedulerImagePrefix = "IMAGE_SCHEDULER_"
5757
MulticlusterProxyAAEImagePrefix = "IMAGE_MULTICLUSTERPROXYAAE_"
58-
SyncerServiceImagePrefix = "IMAGE_SYNCER_SERVICE_"
58+
SyncerServiceImagePrefix = "IMAGE_SYNCER_SERVICE_WORKLOAD_"
5959
ResultsImagePrefix = "IMAGE_RESULTS_"
6060
HubImagePrefix = "IMAGE_HUB_"
6161
DashboardImagePrefix = "IMAGE_DASHBOARD_"

pkg/reconciler/openshift/const.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package openshift
22

33
const (
4+
KueueNameSpace = "openshift-kueue-operator"
45
OperandOpenShiftPipelinesAddons = "openshift-pipelines-addons"
56
OperandOpenShiftPipelineAsCode = "openshift-pipeline-as-code"
67
// NamespaceSCCAnnotation is used to set SCC for a given namespace

pkg/reconciler/openshift/syncerservice/extension.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ import (
2222
mf "github.com/manifestival/manifestival"
2323
"github.com/tektoncd/operator/pkg/apis/operator/v1alpha1"
2424
"github.com/tektoncd/operator/pkg/reconciler/common"
25+
"github.com/tektoncd/operator/pkg/reconciler/openshift"
2526
occommon "github.com/tektoncd/operator/pkg/reconciler/openshift/common"
27+
corev1 "k8s.io/api/core/v1"
2628
)
2729

2830
func OpenShiftExtension(ctx context.Context) common.Extension {
@@ -36,6 +38,12 @@ func (oe openshiftExtension) Transformers(comp v1alpha1.TektonComponent) []mf.Tr
3638
occommon.RemoveRunAsUser(),
3739
occommon.RemoveRunAsGroup(),
3840
occommon.ApplyCABundlesToDeployment,
41+
common.DeploymentEnvVars([]corev1.EnvVar{
42+
{
43+
Name: "KUEUE_NAMESPACE",
44+
Value: openshift.KueueNameSpace,
45+
},
46+
}),
3947
}
4048
}
4149

pkg/reconciler/openshift/tektonmulticlusterproxyaae/extension.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"context"
2121

2222
mf "github.com/manifestival/manifestival"
23+
"github.com/tektoncd/operator/pkg/reconciler/openshift"
2324
corev1 "k8s.io/api/core/v1"
2425

2526
"github.com/tektoncd/operator/pkg/apis/operator/v1alpha1"
@@ -40,7 +41,7 @@ func (oe openshiftExtension) Transformers(comp v1alpha1.TektonComponent) []mf.Tr
4041
common.DeploymentEnvVars([]corev1.EnvVar{
4142
{
4243
Name: "WORKERS_SECRET_NAMESPACE",
43-
Value: "openshift-kueue-operator",
44+
Value: openshift.KueueNameSpace,
4445
},
4546
}),
4647
}

pkg/reconciler/openshift/tektonmulticlusterproxyaae/extension_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
mf "github.com/manifestival/manifestival"
2525
"github.com/tektoncd/operator/pkg/apis/operator/v1alpha1"
2626
"github.com/tektoncd/operator/pkg/reconciler/common"
27+
"github.com/tektoncd/operator/pkg/reconciler/openshift"
2728
appsv1 "k8s.io/api/apps/v1"
2829
corev1 "k8s.io/api/core/v1"
2930
"k8s.io/apimachinery/pkg/runtime"
@@ -40,7 +41,7 @@ func TestOpenShiftExtensionTransformers(t *testing.T) {
4041
t.Fatalf("unexpected error applying transformers: %v", err)
4142
}
4243

43-
assertDeploymentEnvVar(t, newManifest, "WORKERS_SECRET_NAMESPACE", "openshift-kueue-operator")
44+
assertDeploymentEnvVar(t, newManifest, "WORKERS_SECRET_NAMESPACE", openshift.KueueNameSpace)
4445
})
4546

4647
// spec.options.deployments allows users to override env vars set by the extension.

0 commit comments

Comments
 (0)