Setting up an OpenShift cluster using Kustomize and ArgoCD.
Content heavily borrowed from Christianh814's OpenShift-cluster-config repo:
| Directory | Description |
|---|---|
| gitops-operator | Contains Kustomize manifests that allow you to install the gitops operator using a single OC command |
| gitops-config | Contains Kustomize manifests with the ArgoCD projects and applications used to configure your cluster. This allows you to configure your ArgoCD applications with a single OC command |
| manifests | Contains Kustomize manifests with the actual cluster configuration YAML. These files are referenced by the ArgoCD Applications defined in the gitops-config directory |
⚠️ This is based on the OpenShift GitOps operator using an "Automatic" update strategy on OpenShift 4.7. As of 4.7, the operator is stillTech Preview
You can install the operator using this repo by running the following OC command:
until oc apply -k https://github.com/beelandc/openshift4-gitops-demo/gitops-operator/install; do sleep 2; done
This will start the installation of the GitOps operator in the openshift-operators namespace. As part of the operator install, a default instance of argocd will be created in the openshift-gitops namespace.
To get your argocd route (where you can login)
oc get route argocd-cluster-server -n openshift-gitops -o jsonpath='{.spec.host}{"\n"}'
To configure your cluster based this repo, run:
oc apply -k https://github.com/beelandc/openshift4-gitops-demo/gitops-config/config/overlays/default
This will create ArgoCD applications that will configure your server with the following:
Cluster Configurations:
- machineconfigs applied -- Example Hardening configuration
- Two Groups created
adminsocp-adminis part ofadmins
developerocp-developeris part ofdeveloper
- ClusterRole/Role Bindings setup
adminsgroup hascluster-adminon OpenShift- The
developergroup hasediton thepricelistnamespace on OpenShift
- Compliance Operator
- Container Security Operator installed
Application Deployments:
- Deploy Pricelist in an ArgoCD project called
pricelist- One
applicationConsisting of...- Frontend Web Application
- Backend Database store
- Job that creates database tables and the such
- One
ArgoCD Configurations
- The
cluster-configArgoCD project has all "cluster wide" configurations- Can only be seen/synced by ArgoCD admins
- The
pricelistArgoCD project has all application components to run the Pricelist application- Can be seen/synced by ArgoCD admins or ArgoCD users
- Autosync is turned on