Skip to content

Commit 8608888

Browse files
authored
ROX-21531: Add tenant route config (#2154)
1 parent 6778b74 commit 8608888

File tree

7 files changed

+19
-14
lines changed

7 files changed

+19
-14
lines changed

dev/config/gitops-config.yaml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
rhacsOperators:
22
crdUrls:
3-
- https://raw.githubusercontent.com/stackrox/stackrox/4.5.4/operator/bundle/manifests/platform.stackrox.io_securedclusters.yaml
4-
- https://raw.githubusercontent.com/stackrox/stackrox/4.5.4/operator/bundle/manifests/platform.stackrox.io_centrals.yaml
3+
- https://raw.githubusercontent.com/stackrox/stackrox/4.6.1/operator/bundle/manifests/platform.stackrox.io_securedclusters.yaml
4+
- https://raw.githubusercontent.com/stackrox/stackrox/4.6.1/operator/bundle/manifests/platform.stackrox.io_centrals.yaml
55
operators:
66
- deploymentName: "rhacs-operator-dev"
7-
image: "quay.io/rhacs-eng/stackrox-operator:4.5.4"
7+
image: "quay.io/rhacs-eng/stackrox-operator:4.6.1"
88
centralLabelSelector: "rhacs.redhat.com/version-selector=dev"
99
securedClusterReconcilerEnabled: false
1010
verticalPodAutoscaling:
@@ -41,15 +41,6 @@ tenantResources:
4141
cpu: 100m
4242
memory: 100Mi
4343
44-
labels:
45-
app.kubernetes.io/managed-by: rhacs-fleetshard
46-
app.kubernetes.io/instance: "{{ .Name }}"
47-
rhacs.redhat.com/org-id: "{{ .OrganizationID }}"
48-
rhacs.redhat.com/tenant: "{{ .ID }}"
49-
rhacs.redhat.com/instance-type: "{{ .InstanceType }}"
50-
annotations:
51-
rhacs.redhat.com/org-name: "{{ .OrganizationName }}"
52-
5344
centralRdsCidrBlock: "10.1.0.0/16"
5445
5546
verticalPodAutoscalers:

dev/env/defaults/00-defaults.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export INSTALL_VERTICAL_POD_AUTOSCALER_OLM_DEFAULT="false"
2424
export INSTALL_ARGOCD="true"
2525
export INSTALL_OPENSHIFT_GITOPS="false"
2626
export ARGOCD_NAMESPACE="argocd"
27+
export ARGOCD_TENANT_APP_TARGET_REVISION_DEFAULT="HEAD"
2728
export ENABLE_EMAIL_SENDER_DEFAULT="false"
2829
export EMAIL_SENDER_IMAGE_DEFAULT=""
2930

@@ -58,3 +59,4 @@ export ENABLE_EXTERNAL_CONFIG_DEFAULT="true"
5859
export AWS_AUTH_HELPER_DEFAULT=""
5960

6061
export MANAGED_DB_ENABLED_DEFAULT=false
62+
export ENABLE_EXTERNAL_SECRETS_DEFAULT=false # pragma: allowlist secret

dev/env/defaults/cluster-type-infra-openshift/env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ export FLEETSHARD_SYNC_RESOURCES_DEFAULT='{"requests":{"cpu":"400m","memory":"10
22
export EXPOSE_OPENSHIFT_ROUTER_DEFAULT="true"
33
export ENABLE_EXTERNAL_CONFIG_DEFAULT="true"
44
export AWS_AUTH_HELPER_DEFAULT="aws-saml"
5+
export INHERIT_IMAGEPULLSECRETS_DEFAULT="true" # pragma: allowlist secret

dev/env/manifests/fleetshard-operator/51-fleetshard-cr.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spec:
2323
region: "$AWS_REGION"
2424
gitops:
2525
enabled: true
26+
tenantDefaultAppSourceTargetRevision: "$ARGOCD_TENANT_APP_TARGET_REVISION"
2627
targetedOperatorUpgrades:
2728
enabled: true
2829
secretEncryption:
@@ -47,7 +48,10 @@ spec:
4748
secured-cluster:
4849
enabled: false
4950
external-secrets:
50-
enabled: false
51+
enabled: $ENABLE_EXTERNAL_SECRETS
52+
secretStore:
53+
aws:
54+
enableTokenAuth: false
5155
scc:
5256
enabled: false
5357
verticalPodAutoscaler:

dev/env/scripts/lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ init() {
124124
export EMAIL_SENDER_IMAGE=${EMAIL_SENDER_IMAGE:-$EMAIL_SENDER_IMAGE_DEFAULT}
125125
export EMAIL_SENDER_RESOURCES=${EMAIL_SENDER_RESOURCES:-$EMAIL_SENDER_RESOURCES_DEFAULT}
126126
export MANAGED_DB_ENABLED=${MANAGED_DB_ENABLED:-$MANAGED_DB_ENABLED_DEFAULT}
127+
export ARGOCD_TENANT_APP_TARGET_REVISION=${ARGOCD_TENANT_APP_TARGET_REVISION:-$ARGOCD_TENANT_APP_TARGET_REVISION_DEFAULT}
128+
export ENABLE_EXTERNAL_SECRETS=${ENABLE_EXTERNAL_SECRETS:-$ENABLE_EXTERNAL_SECRETS_DEFAULT}
127129

128130
FLEETSHARD_SYNC_CONTAINER_COMMAND_DEFAULT="/usr/local/bin/fleetshard-sync"
129131
export FLEETSHARD_SYNC_CONTAINER_COMMAND=${FLEETSHARD_SYNC_CONTAINER_COMMAND:-$FLEETSHARD_SYNC_CONTAINER_COMMAND_DEFAULT}
@@ -175,6 +177,7 @@ INSTALL_VERTICAL_POD_AUTOSCALER_OLM: ${INSTALL_VERTICAL_POD_AUTOSCALER_OLM}
175177
INSTALL_ARGOCD: ${INSTALL_ARGOCD}
176178
INSTALL_OPENSHIFT_GITOPS: ${INSTALL_OPENSHIFT_GITOPS}
177179
ARGOCD_NAMESPACE: ${ARGOCD_NAMESPACE}
180+
ARGOCD_TENANT_APP_TARGET_REVISION: ${ARGOCD_TENANT_APP_TARGET_REVISION}
178181
OCM_SERVICE_CLIENT_ID: ********
179182
OCM_SERVICE_CLIENT_SECRET: ********
180183
OCM_SERVICE_TOKEN: ********
@@ -203,6 +206,7 @@ FLEET_MANAGER_IMAGE: ${FLEET_MANAGER_IMAGE}
203206
FLEETSHARD_SYNC_CONTAINER_COMMAND: ${FLEETSHARD_SYNC_CONTAINER_COMMAND}
204207
EMAIL_SENDER_IMAGE: ${EMAIL_SENDER_IMAGE}
205208
EMAIL_SENDER_RESOURCES: ${EMAIL_SENDER_RESOURCES}
209+
ENABLE_EXTERNAL_SECRETS: ${ENABLE_EXTERNAL_SECRETS}
206210
PATH: ${PATH}
207211
EOF
208212
}

fleetshard/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func main() {
5050
glog.Infof("ManagedDB.Enabled: %t", config.ManagedDB.Enabled)
5151
glog.Infof("ManagedDB.SecurityGroup: %s", config.ManagedDB.SecurityGroup)
5252
glog.Infof("ManagedDB.SubnetGroup: %s", config.ManagedDB.SubnetGroup)
53+
glog.Infof("TenantDefaultArgoCdAppSourceTargetRevision: %s", config.TenantDefaultArgoCdAppSourceTargetRevision)
5354
if len(config.TenantImagePullSecret) > 0 {
5455
glog.Infof("Image pull secret configured, will be injected into tenant namespaces.")
5556
}

fleetshard/pkg/central/reconciler/argo_reconciler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type argoReconciler struct {
2424
argoOpts ArgoReconcilerOptions
2525
}
2626

27-
// ArgoReconcilerOptions defines configuration options for the Argo application reconiliation
27+
// ArgoReconcilerOptions defines configuration options for the Argo application reconciliation
2828
type ArgoReconcilerOptions struct {
2929
TenantDefaultArgoCdAppSourceRepoURL string
3030
TenantDefaultArgoCdAppSourceTargetRevision string
@@ -105,6 +105,8 @@ func (r *argoReconciler) makeDesiredArgoCDApplication(remoteCentral private.Mana
105105
values["telemetryStorageEndpoint"] = r.argoOpts.Telemetry.StorageEndpoint
106106
values["centralAdminPasswordEnabled"] = !r.argoOpts.WantsAuthProvider
107107
values["centralEnabled"] = true // TODO: Remove once ROX-27129 fully released
108+
values["centralUIHost"] = remoteCentral.Spec.UiEndpoint.Host
109+
values["centralDataHost"] = remoteCentral.Spec.DataEndpoint.Host
108110

109111
if remoteCentral.Metadata.ExpiredAt != nil {
110112
values["expiredAt"] = remoteCentral.Metadata.ExpiredAt.Format(time.RFC3339)

0 commit comments

Comments
 (0)