Quarkus ArgoCD
Features
-
Generate the Argo CD Application or AppProject Kubernetes custom resources for the Quarkus application
-
Command Line interface to install / uninstall and list Argo CD Application(s)
-
Integration with Quarkus Helm
-
DevServices able to install Argo CD on kubernetes cluster: kind or k3s
Requirements
-
Project added under a version control system and pushed on a repository (e.g. GitHub, etc.)
-
A Kubernetes cluster with Argo CD installed and supporting
argoproj.io/v1alpha1
.
Usage
To get the Argo CD custom resources generated, it is needed to add the quarkus-argocd
extension to a Quarkus project.
Add the extension to your project
To add the extension to the project, manually edit the pom.xml
or build.gradle
file.
Using the CLI
The project provides a companion CLI that can be used to generate, install / uninstall and list the Argo CD Applications. The CLI can be added with the following command:
quarkus plug add io.quarkiverse.argocd:quarkus-argocd-cli:999-SNAPSHOT
Regenerating the files:
To re-trigger the file generation:
quarkus argocd project generate
Note: Several parameters can be used to configure the generated CR. Use quarkus argocd generate -h
to display the usage.
To install the generated Application
and AppProject
(optional) custom resources to the currently connected Kubernetes cluster:
quarkus argocd project install
Note: In case of un-committed or un-pushed changes the command will prompt users to decide if they want to proceed with the installation.
The currently connected Kubernetes cluster
is the one that is configured in the ~/.kube/config
file.
It can be overridden by setting in applcation.properties
a different API server URL and token. See the quarkus-kubernetes-client
extension for more details.
To uninstall:
quarkus argocd project uninstall
Installation
If you want to use this extension, you need to add the io.quarkiverse.argocd:quarkus-argocd
extension first to your build file.
For instance, with Maven, add the following dependency to your POM file:
<dependency>
<groupId>io.quarkiverse.argocd</groupId>
<artifactId>quarkus-argocd</artifactId>
<version>0.2.0</version>
</dependency>
Extension Configuration Reference
Remove this section if you don’t have Quarkus configuration properties in your extension. |
Configuration property fixed at build time - All other configuration properties are overridable at runtime
Configuration property |
Type |
Default |
---|---|---|
Enable the ArgoCD DevService. Environment variable: |
boolean |
|
Enable the debugging level. Environment variable: |
boolean |
|
If logs should be shown from the Argocd container. Environment variable: |
boolean |
|
The version of Argocd to be installed from the GitHub repository It can be: "latest" or a tagged release expressed as such: "v2.13.2" Environment variable: |
string |
|
The Argocd control plane namespace where AppProject or Application CR are deployed The default namespace is: argocd Environment variable: |
string |
|
Time to wait till a resource is ready: pod, etc The default value is: 180 seconds Environment variable: |
long |
|
The cluster type to be used: kind or k3 The default value is: kind Environment variable: |
string |
|
The hostname of the argocd ingress route Environment variable: |
string |
|
The host port to be used on the host machine Environment variable: |
string |
|
The version of the Ingress controller to be installed from the GitHub repository If not specified, it will use the resources published on main branch The version to be used should be specified using the tagged release: v1.12.0, etc Environment variable: |
string |
|
Enable to forward the ingress traffic from the container to the local host Environment variable: |
boolean |
|
The Kubernetes API Server URL. Environment variable: |
string |
|
The target/destination namespace where the resources of the runtime should be installed from the Helm chart, kustomize, etc Environment variable: |
string |
|
The target revision of the repository fetched by ArgoCd from the url Defaults to HEAD. Environment variable: |
string |
|
The name of the ArgoCD AppProject CR. A AppProject CR exists by default with full permissions - https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#the-default-project and is named "default" Environment variable: |
string |
|
The AppProject CR namespace. This namespace refers to the Argocd control plane namespace. The value is either 'argocd' or 'openshift-gitops' and is calculated by the extension according to the DeploymentTarget platform: kubernetes or openshift. Remark: It is then not needed for a user to define it Environment variable: |
string |
|
The namespace. The ApplicationCR should be installed under the Argocd control plan namespace like the AppProject CR Remark: It is nevertheless possible to install it in another namespace if "Application in any namespaces is enabled: https://argo-cd.readthedocs.io/en/stable/operator-manual/app-any-namespace/" Environment variable: |
string |