Skip to content

Commit

Permalink
Argo Workflows docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanNWatt committed Oct 29, 2024
1 parent 4d56c36 commit a11e0c5
Show file tree
Hide file tree
Showing 11 changed files with 359 additions and 39 deletions.
45 changes: 44 additions & 1 deletion doc_site/docs/source/terraform/submodule/argo_cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,50 @@

### Overview

This module deploys Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. It sets up the Argo CD server, repo server, and application controller using a Helm chart. The module also configures SSO integration and exposes the Argo CD UI.
This module deploys Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. It sets up the necessary Helm release, configures SSO integration, and exposes the Argo CD server. The module includes OAuth2 configuration for secure access.

```{tip}
This implementation uses the official Argo CD Helm chart. You can find more details in the [Argo CD documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd).
Helm values have been customized from the defaults, and common configuration needs are exposed as variables.
If needed the entire helm chart can be customized by setting the `override_helm_values` variable.
```

### Compute Requirements

For optimal performance, the following resources are recommended:
- 1 CPU core
- 3GB of memory

Argo CD is relatively lightweight compared to other tools, but resource requirements may increase with the number of applications and repositories being managed.

```{warning}
When using SSO with Google OAuth, make sure to configure the correct redirect URIs in your Google Cloud Console. The redirect URI should be `https://your-domain/api/dex/callback`.
```

### Local Deployment

Argo CD will start on port 30088 by default.

### Production Considerations

Argo CD is licensed under the Apache License 2.0, making it suitable for both personal and commercial use.

It has a built in "Dex" server for OAuth2 authentication. Google OAuth is supported out of the box via variables, other providers can be added by passing in a custom `override_helm_values` variable.

### Examples

```{note}
All examples omit the configuration for the kubernetes provider and helm provider. You can find more information about how to configure these providers in the [usage](/usage) section.
```

#### Simple
```hcl
module "argo_cd" {
source = "kadreio/relativistic/kubernetes//modules/argo_cd"
}
```

### Inputs

Expand Down
66 changes: 66 additions & 0 deletions doc_site/docs/source/terraform/submodule/argo_workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,72 @@

This module deploys Argo Workflows, an open-source container-native workflow engine for orchestrating parallel jobs on Kubernetes. It sets up the Argo Workflows controller and server using a Helm chart, configures RBAC, and enables SSO integration for secure access to the Argo Workflows UI.

```{tip}
This implementation uses the official Argo Workflows Helm chart. You can find more details in the [Argo Workflows documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-workflows).
Helm values have been customized from the defaults, and common configuration needs are exposed as variables.
If needed the entire helm chart can be customized by setting the `override_helm_values` variable.
Additionally, there is a large amount of security roles configuration.
```

### Compute Requirements

For optimal performance, the following resources are recommended:
- 1 CPU core
- 2GB of memory

Resource requirements will scale with the number and complexity of workflows being executed.

```{warning}
When using SSO with Google OAuth, make sure to configure the correct redirect URIs in your Google Cloud Console. The redirect URI should be `https://your-domain/oauth2/callback`.
```

### Local Deployment

Argo Workflows will start on port 30083 by default.

### Production Considerations

Argo Workflows is licensed under the Apache License 2.0, making it suitable for both personal and commercial use.

### Examples

```{note}
All examples omit the configuration for the kubernetes provider and helm provider. You can find more information about how to configure these providers in the [usage](/usage) section.
```

#### Simple
```hcl
module "argo_workflows" {
source = "kadreio/relativistic/kubernetes//modules/argo_workflows"
}
```

#### With SSO
```hcl
module "argo_workflows" {
source = "kadreio/relativistic/kubernetes//modules/argo_workflows"
# Enable SSO authentication
auth_mode = "sso"
# Configure Google OAuth
google_oauth_client_id = "your-client-id"
google_oauth_client_secret = "your-client-secret"
# Configure domain for SSO
target_domain = "argo-workflows.yourdomain.com"
# Configure allowed domains for SSO
allowed_domains = ["yourdomain.com"]
# Optional: Configure RBAC rule for admin access
rbac_rule = "email == '[email protected]' or email == '[email protected]'"
}
```

### Inputs

| Name | Description | Type | Default | Required |
Expand Down
45 changes: 41 additions & 4 deletions modules/argo_cd/.terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,46 @@ content: |-
## Overview
This module deploys Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. It sets up the Argo CD server, repo server, and application controller using a Helm chart. The module also configures SSO integration and exposes the Argo CD UI.
This module deploys Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. It sets up the necessary Helm release, configures SSO integration, and exposes the Argo CD server. The module includes OAuth2 configuration for secure access.
```{tip}
This implementation uses the official Argo CD Helm chart. You can find more details in the [Argo CD documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd).
Helm values have been customized from the defaults, and common configuration needs are exposed as variables.
If needed the entire helm chart can be customized by setting the `override_helm_values` variable.
```
## Compute Requirements
For optimal performance, the following resources are recommended:
- 1 CPU core
- 3GB of memory
Argo CD is relatively lightweight compared to other tools, but resource requirements may increase with the number of applications and repositories being managed.
```{warning}
When using SSO with Google OAuth, make sure to configure the correct redirect URIs in your Google Cloud Console. The redirect URI should be `https://your-domain/api/dex/callback`.
```
## Local Deployment
Argo CD will start on port 30088 by default.
## Production Considerations
Argo CD is licensed under the Apache License 2.0, making it suitable for both personal and commercial use.
It has a built in "Dex" server for OAuth2 authentication. Google OAuth is supported out of the box via variables, other providers can be added by passing in a custom `override_helm_values` variable.
## Examples
{{ include "../../doc_site/docs/source/partials/example_note.md" }}
#### Simple
```hcl
{{ include "examples/simple/main.tf" }}
```
{{ .Inputs }}
Expand All @@ -19,8 +58,6 @@ content: |-
{{ .Modules }}
sort:
enabled: true
by: name
Expand All @@ -38,4 +75,4 @@ settings:
read-comments: true
required: true
sensitive: true
type: true
type: true
45 changes: 44 additions & 1 deletion modules/argo_cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,50 @@

### Overview

This module deploys Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. It sets up the Argo CD server, repo server, and application controller using a Helm chart. The module also configures SSO integration and exposes the Argo CD UI.
This module deploys Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. It sets up the necessary Helm release, configures SSO integration, and exposes the Argo CD server. The module includes OAuth2 configuration for secure access.

```{tip}
This implementation uses the official Argo CD Helm chart. You can find more details in the [Argo CD documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd).
Helm values have been customized from the defaults, and common configuration needs are exposed as variables.
If needed the entire helm chart can be customized by setting the `override_helm_values` variable.
```

### Compute Requirements

For optimal performance, the following resources are recommended:
- 1 CPU core
- 3GB of memory

Argo CD is relatively lightweight compared to other tools, but resource requirements may increase with the number of applications and repositories being managed.

```{warning}
When using SSO with Google OAuth, make sure to configure the correct redirect URIs in your Google Cloud Console. The redirect URI should be `https://your-domain/api/dex/callback`.
```

### Local Deployment

Argo CD will start on port 30088 by default.

### Production Considerations

Argo CD is licensed under the Apache License 2.0, making it suitable for both personal and commercial use.

It has a built in "Dex" server for OAuth2 authentication. Google OAuth is supported out of the box via variables, other providers can be added by passing in a custom `override_helm_values` variable.

### Examples

```{note}
All examples omit the configuration for the kubernetes provider and helm provider. You can find more information about how to configure these providers in the [usage](/usage) section.
```

#### Simple
```hcl
module "argo_cd" {
source = "kadreio/relativistic/kubernetes//modules/argo_cd"
}
```

### Inputs

Expand Down
3 changes: 3 additions & 0 deletions modules/argo_cd/examples/simple/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module "argo_cd" {
source = "kadreio/relativistic/kubernetes//modules/argo_cd"
}
31 changes: 0 additions & 31 deletions modules/argo_cd/main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
variable "argo_cd_chart_version" {
description = "Argo CD chart version"
type = string
default = "7.4.3"
}

variable "override_helm_values" {
description = "Override helm values as YAML string"
type = string
default = ""
}

resource "helm_release" "argo_cd" {
name = "argo-cd"
repository = "https://argoproj.github.io/argo-helm"
Expand All @@ -27,25 +15,6 @@ resource "helm_release" "argo_cd" {
timeout = 1200
}

variable "google_oauth_client_id" {
description = "Google OAuth client ID"
type = string
default = ""
}

variable "google_oauth_client_secret" {
description = "Google OAuth client secret"
type = string
default = ""
}

variable "target_domain" {
description = "The url of the deployed application"
type = string
default = "localhost:30088"
}


resource "kubernetes_service" "expose_argo_cd_webserver" {
metadata {
name = "expose-argo-cd-webserver"
Expand Down
29 changes: 29 additions & 0 deletions modules/argo_cd/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
variable "argo_cd_chart_version" {
description = "Argo CD chart version"
type = string
default = "7.4.3"
}

variable "override_helm_values" {
description = "Override helm values as YAML string"
type = string
default = ""
}

variable "google_oauth_client_id" {
description = "Google OAuth client ID"
type = string
default = ""
}

variable "google_oauth_client_secret" {
description = "Google OAuth client secret"
type = string
default = ""
}

variable "target_domain" {
description = "The url of the deployed application"
type = string
default = "localhost:30088"
}
46 changes: 44 additions & 2 deletions modules/argo_workflows/.terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,50 @@ content: |-
This module deploys Argo Workflows, an open-source container-native workflow engine for orchestrating parallel jobs on Kubernetes. It sets up the Argo Workflows controller and server using a Helm chart, configures RBAC, and enables SSO integration for secure access to the Argo Workflows UI.
```{tip}
This implementation uses the official Argo Workflows Helm chart. You can find more details in the [Argo Workflows documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-workflows).
Helm values have been customized from the defaults, and common configuration needs are exposed as variables.
If needed the entire helm chart can be customized by setting the `override_helm_values` variable.
Additionally, there is a large amount of security roles configuration.
```
## Compute Requirements
For optimal performance, the following resources are recommended:
- 1 CPU core
- 2GB of memory
Resource requirements will scale with the number and complexity of workflows being executed.
```{warning}
When using SSO with Google OAuth, make sure to configure the correct redirect URIs in your Google Cloud Console. The redirect URI should be `https://your-domain/oauth2/callback`.
```
## Local Deployment
Argo Workflows will start on port 30083 by default.
## Production Considerations
Argo Workflows is licensed under the Apache License 2.0, making it suitable for both personal and commercial use.
## Examples
{{ include "../../doc_site/docs/source/partials/example_note.md" }}
#### Simple
```hcl
{{ include "examples/simple/main.tf" }}
```
#### With SSO
```hcl
{{ include "examples/with_sso/main.tf" }}
```
{{ .Inputs }}
{{ .Outputs }}
Expand All @@ -19,8 +63,6 @@ content: |-
{{ .Modules }}
sort:
enabled: true
by: name
Expand Down
Loading

0 comments on commit a11e0c5

Please sign in to comment.