DocsAmbassador CloudConfiguring Ambassador Cloud for GitOps
Configuring Ambassador Cloud for GitOps
Edge Stack and Emissary-ingress are managed declaratively. This approach lends itself well to a GitOps workflow. Traditionally, adopting a GitOps workflow requires an extensive amount of engineering. With Ambassador Cloud, you can quickly and easily adopt a GitOps workflow without any custom engineering.
This guide walks through how you can configure Edge Stack or Emissary-ingress with GitHub, integrate checks into your GitOps pull request workflow, create Mapping resources without an IDE, and generate preview URLs to share unreleased changes in opened pull requests with your colleagues.
1. Connect your cluster to Ambassador Cloud
Log in to Ambassador Cloud with your preferred identity provider.
Click Add Services at the top, then click Connection Instructions in the
Connect your installation
section.Follow the prompts to name the cluster and click Generate a Cloud Token.
Follow the prompts to install or configure version 2.2 or later of either Edge Stack or Emissary-ingress with a cloud token into your Kubernetes cluster.
If you do not have the latest version installed, you can:
Once the installation is complete, services, environments, and clusters are visible in Ambassador Cloud.
2. Configure the GitHub integration
Navigate to the Teams Settings page in Ambassador Cloud.
Click the INTEGRATIONS button to navigate to the Integration settings, then click the CONFIGURE GitHub settings button.
Click MANAGE PERMISSIONS button. This takes you to github.com where you can choose which account you want to install Ambassador Cloud.
Select the account that contains the git repositories with your Kubernetes manifest files and your application code.
Configure the installation for the desired repositories:
After clicking Install, you will be directed back to Ambassador Cloud.
Once back in Ambassador Cloud, click the CONFIGURE GitHub settings button once more and find the target git repository in the list. Click ENABLE INTEGRATIONS.
Configure Ambassador Cloud to access your cluster information and Kubernetes manifests from Git.
In the
manifest
text box, enter the relative path to your Kubernetes manifest files in your repository.Select the cluster you initialized in step 1 from the
cluster
dropdown.Click the UPDATE REPOSITORY SETTINGS button. This triggers Ambassador Cloud to create a pull request with the information you just entered into your git repository. The pull request adds a file named .a8r.yaml to the root of your repository. The contents will look something like this:
Merge the pull request to the main branch of the git repository.
What's Next?
Activate your GitOps integration by:
- Automating configuration analysis.
- Opening pull requests for Mappings created in the Ambassador Cloud UI.
- Generating preview URLs for your pull requests.