https://github.com/cert-manager/testing-addons
Tooling to deploy cert-manager with external dependencies for local testing
https://github.com/cert-manager/testing-addons
Last synced: 4 months ago
JSON representation
Tooling to deploy cert-manager with external dependencies for local testing
- Host: GitHub
- URL: https://github.com/cert-manager/testing-addons
- Owner: cert-manager
- Created: 2022-06-15T08:36:16.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-08T11:37:37.000Z (over 2 years ago)
- Last Synced: 2024-05-27T12:40:17.735Z (about 1 year ago)
- Language: HCL
- Size: 58.6 KB
- Stars: 3
- Watchers: 6
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
![]()
# Testing Addons
This repository contains testing addons for the cert-manager project.
It is to save time when testing cert-manager working with external dependencies.
Mainly refer this [proposal](https://docs.google.com/document/d/14oJux-d-91Do3DLi5eRG-wUEE4R3Hh7D4u0Yfje3auw/edit#heading=h.9chr39ggpwbe).
**Current Available Workflows**:
- [Cert-manager and Vault](./cm-vault/)
- [Cert-manager and Gateway](./cm-gateway/)
- [Cert-manager and Ingress](./cm-ingress/)## Precondition
### [Install Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
Kubectl is used to perform actions that are not supported by native Terraform resources
### [Install Helm](https://helm.sh/docs/intro/install/)
Helm is the best way to find, share, and use software built for Kubernetes.
### [Install Terraform](https://www.terraform.io/downloads)
Terraform is an IT infrastructure automation orchestration tool.
### [Install Terragrunt](https://terragrunt.gruntwork.io/docs/getting-started/install/)
Terragrunt is a thin wrapper that provides extra tools for keeping your configurations DRY, working with multiple Terraform modules, and managing remote state.
### Configure Terraform Plugin Cache.
The configuration directory of each dependence can share the cache to improve the execution speed.
```
$ mkdir -p $HOME/.terraform.d/plugin-cache
$ export TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache"
```## Usage Steps
Take Vault as an example.
### 1. Go to the installation directory of specific dependency.
```
cd cm-vault
```### 2. Execute `terragrunt run-all init`
```
$ terragrunt run-all init
INFO[0000] The stack at /root/lonelyCZ/testing-addons/cm-vault will be processed in the following order for command init:
Group 1
- Module /root/lonelyCZ/testing-addons/cm-vault/cm-install
- Module /root/lonelyCZ/testing-addons/cm-vault/vault-installGroup 2
- Module /root/lonelyCZ/testing-addons/cm-vault/vault-configGroup 3
- Module /root/lonelyCZ/testing-addons/cm-vault/cm-configInitializing the backend...
```### 3. Execute `terragrunt run-all apply`
```
$ terragrunt run-all apply
INFO[0000] The stack at /root/lonelyCZ/testing-addons/cm-vault will be processed in the following order for command apply:
Group 1
- Module /root/lonelyCZ/testing-addons/cm-vault/cm-install
- Module /root/lonelyCZ/testing-addons/cm-vault/vault-installGroup 2
- Module /root/lonelyCZ/testing-addons/cm-vault/vault-configGroup 3
- Module /root/lonelyCZ/testing-addons/cm-vault/cm-configAre you sure you want to run 'terragrunt apply' in each folder of the stack described above? (y/n) y
```### 4. Destroy Test Environment.
```
$ terragrunt run-all destroy
INFO[0000] The stack at /root/lonelyCZ/testing-addons/cm-vault will be processed in the following order for command destroy:
Group 1
- Module /root/lonelyCZ/testing-addons/cm-vault/cm-configGroup 2
- Module /root/lonelyCZ/testing-addons/cm-vault/cm-install
- Module /root/lonelyCZ/testing-addons/cm-vault/vault-configGroup 3
- Module /root/lonelyCZ/testing-addons/cm-vault/vault-installWARNING: Are you sure you want to run `terragrunt destroy` in each folder of the stack described above? There is no undo! (y/n) y
```