Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROX-27131: fix tenant ArgoCD environment variable names #2129

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fleetshard/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ type Config struct {
// It is required when central images need to fetched from a private Quay registry.
// It needs to given as Docker Config JSON object.
TenantImagePullSecret string `env:"TENANT_IMAGE_PULL_SECRET"`
DefaultTenantArgoCdAppSourceRepoURL string `env:"DEFAULT_TENANT_ARGOCD_APP_SOURCE_REPO_URL" envDefault:"https://github.com/stackrox/acscs-manifests.git"`
DefaultTenantArgoCdAppSourceTargetRevision string `env:"DEFAULT_TENANT_ARGOCD_APP_SOURCE_TARGET_REVISION" envDefault:"HEAD"`
DefaultTenantArgoCdAppSourcePath string `env:"DEFAULT_TENANT_ARGOCD_APP_SOURCE_PATH" envDefault:"tenant-resources"`
TenantDefaultArgoCdAppSourceRepoURL string `env:"TENANT_DEFAULT_ARGOCD_APP_SOURCE_REPO_URL" envDefault:"https://github.com/stackrox/acscs-manifests.git"`
TenantDefaultArgoCdAppSourceTargetRevision string `env:"TENANT_DEFAULT_ARGOCD_APP_SOURCE_TARGET_REVISION" envDefault:"HEAD"`
TenantDefaultArgoCdAppSourcePath string `env:"TENANT_DEFAULT_ARGOCD_APP_SOURCE_PATH" envDefault:"tenant-resources"`
ArgoCdNamespace string `env:"ARGOCD_NAMESPACE" envDefault:"openshift-gitops"`
ManagedDB ManagedDB
Telemetry Telemetry
Expand Down
12 changes: 6 additions & 6 deletions fleetshard/pkg/central/reconciler/argo_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ type argoReconciler struct {

// ArgoReconcilerOptions defines configuration options for the Argo application reconiliation
type ArgoReconcilerOptions struct {
DefaultTenantArgoCdAppSourceRepoURL string
DefaultTenantArgoCdAppSourceTargetRevision string
DefaultTenantArgoCdAppSourcePath string
TenantDefaultArgoCdAppSourceRepoURL string
TenantDefaultArgoCdAppSourceTargetRevision string
TenantDefaultArgoCdAppSourcePath string
ArgoCdNamespace string
ManagedDBEnabled bool
ClusterName string
Expand Down Expand Up @@ -158,9 +158,9 @@ func (r *argoReconciler) makeDesiredArgoCDApplication(remoteCentral private.Mana
},
},
Source: &argocd.ApplicationSource{
RepoURL: r.argoOpts.DefaultTenantArgoCdAppSourceRepoURL,
TargetRevision: r.argoOpts.DefaultTenantArgoCdAppSourceTargetRevision,
Path: r.argoOpts.DefaultTenantArgoCdAppSourcePath,
RepoURL: r.argoOpts.TenantDefaultArgoCdAppSourceRepoURL,
TargetRevision: r.argoOpts.TenantDefaultArgoCdAppSourceTargetRevision,
Path: r.argoOpts.TenantDefaultArgoCdAppSourcePath,
Helm: &argocd.ApplicationSourceHelm{
ValuesObject: &runtime.RawExtension{
Raw: valuesBytes,
Expand Down
6 changes: 3 additions & 3 deletions fleetshard/pkg/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ func (r *Runtime) Start() error {
routesAvailable := r.routesAvailable()

argoReconcilerOpts := centralReconciler.ArgoReconcilerOptions{
DefaultTenantArgoCdAppSourceTargetRevision: r.config.DefaultTenantArgoCdAppSourceTargetRevision,
DefaultTenantArgoCdAppSourcePath: r.config.DefaultTenantArgoCdAppSourcePath,
DefaultTenantArgoCdAppSourceRepoURL: r.config.DefaultTenantArgoCdAppSourceRepoURL,
TenantDefaultArgoCdAppSourceTargetRevision: r.config.TenantDefaultArgoCdAppSourceTargetRevision,
TenantDefaultArgoCdAppSourcePath: r.config.TenantDefaultArgoCdAppSourcePath,
TenantDefaultArgoCdAppSourceRepoURL: r.config.TenantDefaultArgoCdAppSourceRepoURL,
ArgoCdNamespace: r.config.ArgoCdNamespace,
ManagedDBEnabled: r.config.ManagedDB.Enabled,
ClusterName: r.config.ClusterName,
Expand Down
Loading