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 echo
export ROX_CENTRAL_ADDRESS="$(oc get route central -n stackrox -o go-template='{{.spec.host}}'):443" 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 while ! curl -sfko /dev/null "https://$ROX_CENTRAL_ADDRESS/"; do
echo "Red Hat ACS not ready..." echo "Red Hat ACS not ready..."
sleep 5 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 done
export ROX_CENTRAL_HOSTNAME="$ROX_CENTRAL_ADDRESS"
echo "========================================================================" echo "========================================================================"
echo " Retrieving an API Token for Red Hat ACS" 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 kind: Project
metadata: metadata:
annotations: annotations:
argocd.argoproj.io/sync-wave: "15" argocd.argoproj.io/sync-wave: "10"
openshift.io/description: "" openshift.io/description: ""
openshift.io/display-name: "" openshift.io/display-name: ""
labels: labels:
@ -54,8 +54,10 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: 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: annotations:
argocd.argoproj.io/sync-wave: "15" argocd.argoproj.io/sync-wave: "10"
name: central-admin name: central-admin
namespace: stackrox namespace: stackrox
type: Opaque type: Opaque

Loading…
Cancel
Save