There are two types of settings that can be managed using the declarative approach:
- End users/developers specific settings such as
- Platform-specific settings such as IP allow lists, system accounts and availability of additional Argo CD components.
Declarative management allows you to use the Argo CD control plane on the Akuity platform to host
AppProject resources. This is used for implementing:
- Argo CD's app of apps pattern to declaratively specify one Argo CD
Applicationresource that points to a Git repository consisting only of other
ApplicationSetresources to manage a set of Argo CD
The resources deployed into the control plane must specify the namespace
argocd and the destination name
https://kubernetes.default.svc). The child
Applications (that deploy anything other than an
AppProject) must target a connected cluster other than
Example: App of Apps
Application created via the Argo CD dashboard:
helm: # Set the destination cluster for the child Applications in the Helm chart.
argocd. This will deploy child
Applications into the Argo CD control plane on the Akuity Platform.
Application created by the parent app:
my-cluster, which is an external cluster connected to the Argo CD instance on the Akuity Platform (See "Connect a Kubernetes cluster "). This is where the resources for the
guestbookapp will be deployed (i.e., the
Enabling declarative management
To enable declarative management:
Navigate to Argo CD → your instance → Settings → Declarative Management.
Toggle the Enabled switch to Enabled.
Once the Argo CD instance has finished progressing, the
in-cluster destination will be available.
Permitting the platform in IP Allow lists
When using Declarative Management, if the source for an ApplicationSet or "App of Apps" Application is behind an IP allow list (e.g., a private Git server), add the following addresses to permit access for the Akuity Platform:
Declarative management of platform-specific settings is implemented using akuity cli.
Use the following steps to start managing existing Argo CD instance managed by the Akuity Platform:
Export existing instance configuration using
akuity argocd export <name> --organization-name <org-name>command:
yqprovides a convenient way to split the output into multiple files.
akuity argocd export demo --organization-name demo | yq -s '.metadata.name' -
Compare local configuration with the current state of the Akuity Platform using
akuity argocd diff <name> --organization-name <org-name>command:
akuity argocd diff demo --organization-name demo -f argocd/demo/
===== argoproj.io/v1alpha1/ArgoCD/demo ======
< description: Demo purposes (https://demo.cd.akuity.cloud/)
> description: Demo purposes
▸ print diff: exit status 1%
Apply changes to the Akuity Platform using
akuity argocd apply -f <configuration-path>command:
akuity argocd apply -f argocd/demo/
The declarative configuration that defines Argo CD instance state has the same format as open-source Argo CD and described
here. The Akuity Platform specific settings,
such as instance name, IP allows lists and other additional features are defined using
Example of the declarative configuration:
- ip: "220.127.116.11"
description: dummy entry
The reference specifications are available here.
The GitOps workflow is implemented using GitHub Actions and is provides the following experience:
- Engineers make changes to the declarative configuration of the Akuity Platform in the
argocddirectory and create Pull Request with the proposed changes.
- GitHub action workflow compares the proposed changes with the current state of the Akuity Platform and posts detected changes as a comment to the Pull Request.
- Reviewers review the proposed changes and detected changes report and approve the Pull Request.
- GitHub action workflow applies the proposed changes to the Akuity Platform.
See the example live demo at https://github.com/akuity/akp-declarative/.