switching acm bootstrap repo

This commit is contained in:
2025-04-14 23:43:19 -05:00
parent d76d8f8e05
commit 0a25edab88
53 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1 @@
Experimental, not used at the momentgit add

View File

@@ -0,0 +1,58 @@
#!/bin/bash
LANG=C
SLEEP_SECONDS=45
echo ""
echo "Installing GitOps Operator."
kustomize build ../../components/policies/gitops/base/manifests/gitops-subscription | oc apply -f -
echo "Pause $SLEEP_SECONDS seconds for the creation of the gitops-operator..."
sleep $SLEEP_SECONDS
echo "Waiting for operator to start"
until oc get deployment gitops-operator-controller-manager -n openshift-operators
do
sleep 5;
done
echo "Waiting for openshift-gitops namespace to be created"
until oc get ns openshift-gitops
do
sleep 5;
done
echo "Waiting for deployments to start"
until oc get deployment cluster -n openshift-gitops
do
sleep 5;
done
echo "Waiting for all pods to be created"
deployments=(cluster kam openshift-gitops-applicationset-controller openshift-gitops-redis openshift-gitops-repo-server openshift-gitops-server)
for i in "${deployments[@]}";
do
echo "Waiting for deployment $i";
oc rollout status deployment $i -n openshift-gitops
done
echo "Apply overlay to override default instance"
# echo "Create default instance of gitops operator"
kustomize build ../../components/policies/gitops/base/manifests/gitops-instance/base |
yq -y ".spec.repo.env |= map(select(.name == \"INFRASTRUCTURE_ID\").value=\"$INFRASTRUCTURE_ID\")" |
yq -y ".spec.repo.env |= map(select(.name == \"CLUSTER_ID\").value=\"$CLUSTER_ID\")" |
yq -y ".spec.repo.env |= map(select(.name == \"CLUSTER_NAME\").value=\"$CLUSTER_NAME\")" |
yq -y ".spec.repo.env |= map(select(.name == \"SUB_DOMAIN\").value=\"$SUB_DOMAIN\")" |
oc apply -f -
sleep 10
echo "Waiting for all pods to redeploy"
deployments=(cluster kam openshift-gitops-applicationset-controller openshift-gitops-redis openshift-gitops-repo-server openshift-gitops-server)
for i in "${deployments[@]}";
do
echo "Waiting for deployment $i";
oc rollout status deployment $i -n openshift-gitops
done
echo "GitOps Operator ready"

View File

@@ -0,0 +1,8 @@
namespace: acm-policies
namespace: acm-policies
resources:
# - ../../../../components/policies/compliance/base
- ../../../../components/policies/cert-expiration/base
- ../../../../components/policies/gitops/base

View File

@@ -0,0 +1 @@
Bootstrap tokens for ESO to access Doppler projects, note that these secrets are not in git.

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: hub-secrets

View File

@@ -0,0 +1,10 @@
resources:
- namespace.yaml
- hub-secrets-namespace.yaml
# Note these secrets are not stored in git and only applied during bootstrap process
# They are the tokens for accessing the Doppler secrets SaaS service where secrets are stored
- eso-token-cluster-push-secret.yaml
- eso-token-cluster-home-secret.yaml
- eso-token-cluster-hub-secret.yaml
- eso-token-cluster-rhdp-secret.yaml
- eso-token-cluster-microshift-secret.yaml

View File

@@ -0,0 +1,8 @@
apiVersion: v1
kind: Namespace
metadata:
annotations:
openshift.io/description: ACM Policies
openshift.io/display-name: ACM Policies
labels:
name: acm-policies