Browse Source

wip

pull/1/head
Nicolas Massé 3 years ago
parent
commit
13c86908ce
  1. 6
      infrastructure/files/stackrox-init-hook/configure-acs.sh
  2. 6
      infrastructure/templates/acs.yaml

6
infrastructure/files/stackrox-init-hook/configure-acs.sh

@ -15,11 +15,15 @@ echo "========================================================================"
echo
export ROX_CENTRAL_ADDRESS="$(oc get route central -n stackrox -o go-template='{{.spec.host}}'):443"
export ROX_CENTRAL_HOSTNAME="$ROX_CENTRAL_ADDRESS"
while ! curl -sfko /dev/null "https://$ROX_CENTRAL_ADDRESS/"; do
echo "Red Hat ACS not ready..."
sleep 5
# There is a risk the central's route to be created after this script started
# so we need to periodically refresh it
export ROX_CENTRAL_ADDRESS="$(oc get route central -n stackrox -o go-template='{{.spec.host}}'):443"
done
export ROX_CENTRAL_HOSTNAME="$ROX_CENTRAL_ADDRESS"
echo "========================================================================"
echo " Retrieving an API Token for Red Hat ACS"

6
infrastructure/templates/acs.yaml

@ -41,7 +41,7 @@ apiVersion: project.openshift.io/v1
kind: Project
metadata:
annotations:
argocd.argoproj.io/sync-wave: "15"
argocd.argoproj.io/sync-wave: "10"
openshift.io/description: ""
openshift.io/display-name: ""
labels:
@ -54,8 +54,10 @@ spec:
apiVersion: v1
kind: Secret
metadata:
# The secret needs to be created before the creation of the "Central" Custom Resource.
# Otherwise, a race condition is possible and the installation of the Central might get stuck.
annotations:
argocd.argoproj.io/sync-wave: "15"
argocd.argoproj.io/sync-wave: "10"
name: central-admin
namespace: stackrox
type: Opaque

Loading…
Cancel
Save