Squashed 'acm-hub-bootstrap/' content from commit aea23ee
git-subtree-dir: acm-hub-bootstrap git-subtree-split: aea23ee88fafd5cab0e2d9189f872159c5f16b8e
This commit is contained in:
1
bootstrap/install-gitops/README.md
Normal file
1
bootstrap/install-gitops/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Experimental, not used at the momentgit add
|
||||
58
bootstrap/install-gitops/setup.sh
Normal file
58
bootstrap/install-gitops/setup.sh
Normal 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"
|
||||
8
bootstrap/policies/overlays/default/kustomization.yaml
Normal file
8
bootstrap/policies/overlays/default/kustomization.yaml
Normal 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
|
||||
1
bootstrap/secrets/base/README.md
Normal file
1
bootstrap/secrets/base/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Bootstrap tokens for ESO to access Doppler projects, note that these secrets are not in git.
|
||||
4
bootstrap/secrets/base/hub-secrets-namespace.yaml
Normal file
4
bootstrap/secrets/base/hub-secrets-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: hub-secrets
|
||||
10
bootstrap/secrets/base/kustomization.yaml
Normal file
10
bootstrap/secrets/base/kustomization.yaml
Normal 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
|
||||
8
bootstrap/secrets/base/namespace.yaml
Normal file
8
bootstrap/secrets/base/namespace.yaml
Normal 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
|
||||
Reference in New Issue
Block a user