Skip to content

Commit 2da3d40

Browse files
committed
refactor(terraform): merge versions into main and enhance docs with concise troubleshooting
- Refactor and modules by merging [versions.tf] into [main.tf] for self-contained configuration. - Generalize component documentation to reflect platform-wide utility beyond just observability. - Add concise, code-centric troubleshooting sections to all READMEs and manual guides (, , argocd controls a Argo CD server Usage: argocd [flags] argocd [command] Available Commands: account Manage account settings admin Contains a set of commands useful for Argo CD administrators and requires direct Kubernetes access app Manage applications appset Manage ApplicationSets cert Manage repository certificates and SSH known hosts entries cluster Manage cluster credentials completion output shell completion code for the specified shell (bash, zsh or fish) configure Manage local configuration context Switch between contexts gpg Manage GPG keys used for signature verification help Help about any command login Log in to Argo CD logout Log out from Argo CD proj Manage projects relogin Refresh an expired authenticate token repo Manage repository connection parameters repocreds Manage credential templates for repositories version Print version information Flags: --argocd-context string The name of the Argo-CD server context to use --auth-token string Authentication token; set this or the ARGOCD_AUTH_TOKEN environment variable --client-crt string Client certificate file --client-crt-key string Client certificate key file --config string Path to Argo CD config (default "/home/onel/.config/argocd/config") --controller-name string Name of the Argo CD Application controller; set this or the ARGOCD_APPLICATION_CONTROLLER_NAME environment variable when the controller's name label differs from the default, for example when installing via the Helm chart (default "argocd-application-controller") --core If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server --grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. --grpc-web-root-path string Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root. -H, --header strings Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers) -h, --help help for argocd --http-retry-max int Maximum number of retries to establish http connection to Argo CD server --insecure Skip server certificate and domain verification --kube-context string Directs the command to the given kube-context --logformat string Set the logging format. One of: json|text (default "json") --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") --plaintext Disable TLS --port-forward Connect to a random argocd-server port using port forwarding --port-forward-namespace string Namespace name which should be used for port forwarding --prompts-enabled Force optional interactive prompts to be enabled or disabled, overriding local configuration. If not specified, the local configuration value will be used, which is false by default. --redis-compress string Enable this if the application controller is configured with redis compression enabled. (possible values: gzip, none) (default "gzip") --redis-haproxy-name string Name of the Redis HA Proxy; set this or the ARGOCD_REDIS_HAPROXY_NAME environment variable when the HA Proxy's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis-ha-haproxy") --redis-name string Name of the Redis deployment; set this or the ARGOCD_REDIS_NAME environment variable when the Redis's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis") --repo-server-name string Name of the Argo CD Repo server; set this or the ARGOCD_REPO_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-repo-server") --server string Argo CD server address --server-crt string Server certificate file --server-name string Name of the Argo CD API server; set this or the ARGOCD_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-server") Use "argocd [command] --help" for more information about a command., ). - Standardize troubleshooting format using bash code blocks for direct usability. - Update argocd controls a Argo CD server Usage: argocd [flags] argocd [command] Available Commands: account Manage account settings admin Contains a set of commands useful for Argo CD administrators and requires direct Kubernetes access app Manage applications appset Manage ApplicationSets cert Manage repository certificates and SSH known hosts entries cluster Manage cluster credentials completion output shell completion code for the specified shell (bash, zsh or fish) configure Manage local configuration context Switch between contexts gpg Manage GPG keys used for signature verification help Help about any command login Log in to Argo CD logout Log out from Argo CD proj Manage projects relogin Refresh an expired authenticate token repo Manage repository connection parameters repocreds Manage credential templates for repositories version Print version information Flags: --argocd-context string The name of the Argo-CD server context to use --auth-token string Authentication token; set this or the ARGOCD_AUTH_TOKEN environment variable --client-crt string Client certificate file --client-crt-key string Client certificate key file --config string Path to Argo CD config (default "/home/onel/.config/argocd/config") --controller-name string Name of the Argo CD Application controller; set this or the ARGOCD_APPLICATION_CONTROLLER_NAME environment variable when the controller's name label differs from the default, for example when installing via the Helm chart (default "argocd-application-controller") --core If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server --grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. --grpc-web-root-path string Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root. -H, --header strings Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers) -h, --help help for argocd --http-retry-max int Maximum number of retries to establish http connection to Argo CD server --insecure Skip server certificate and domain verification --kube-context string Directs the command to the given kube-context --logformat string Set the logging format. One of: json|text (default "json") --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") --plaintext Disable TLS --port-forward Connect to a random argocd-server port using port forwarding --port-forward-namespace string Namespace name which should be used for port forwarding --prompts-enabled Force optional interactive prompts to be enabled or disabled, overriding local configuration. If not specified, the local configuration value will be used, which is false by default. --redis-compress string Enable this if the application controller is configured with redis compression enabled. (possible values: gzip, none) (default "gzip") --redis-haproxy-name string Name of the Redis HA Proxy; set this or the ARGOCD_REDIS_HAPROXY_NAME environment variable when the HA Proxy's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis-ha-haproxy") --redis-name string Name of the Redis deployment; set this or the ARGOCD_REDIS_NAME environment variable when the Redis's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis") --repo-server-name string Name of the Argo CD Repo server; set this or the ARGOCD_REPO_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-repo-server") --server string Argo CD server address --server-crt string Server certificate file --server-name string Name of the Argo CD API server; set this or the ARGOCD_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-server") Use "argocd [command] --help" for more information about a command. documentation to match the project's standard structure.
1 parent 9a0c817 commit 2da3d40

File tree

10 files changed

+186
-30
lines changed

10 files changed

+186
-30
lines changed

cert-manager/README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,40 @@ Cert-Manager provides:
99

1010
## Deployment Options
1111

12-
You can deploy Cert-Manager using one of the following methods:
13-
1412
### 1. Automated Deployment
1513
This method uses the Terraform configuration located in the `terraform/` directory. It is the recommended approach for automation.
1614

1715
For detailed instructions, see the [Terraform deployment guide](../docs/cert-manager-terraform-deployment.md).
1816

1917
### 2. Manual (Helm & Kubectl)
2018
If you prefer to deploy manually using CLI tools, you can follow the [manual deployment guide](../docs/cert-manager-manual-deployment.md).
19+
20+
## Troubleshooting
21+
22+
### Deployment Flags
23+
Ensure variables are set correctly in `terraform.tfvars`:
24+
```hcl
25+
install_cert_manager = true
26+
```
27+
28+
### Common Issues
29+
30+
**Webhook Pod Not Ready**
31+
```bash
32+
# Check pod status (look for CrashLoopBackOff)
33+
kubectl get pods -n cert-manager
34+
35+
# Fix: Ensure installCRDs=true is set in Helm release
36+
```
37+
38+
**Certificate Stuck in "False" State**
39+
```bash
40+
# Check certificate events for challenge failures
41+
kubectl describe certificate <name> -n <namespace>
42+
```
43+
44+
**Issuer Not Ready**
45+
```bash
46+
# Check issuer status and ACME server URL
47+
kubectl describe clusterissuer letsencrypt-prod
48+
```

cert-manager/terraform/main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
terraform {
2+
required_version = ">= 1.0"
3+
required_providers {
4+
kubernetes = {
5+
source = "hashicorp/kubernetes"
6+
version = "~> 2.0"
7+
}
8+
helm = {
9+
source = "hashicorp/helm"
10+
version = "~> 2.12"
11+
}
12+
}
13+
}
14+
115
resource "helm_release" "cert_manager" {
216
count = var.install_cert_manager ? 1 : 0
317

cert-manager/terraform/versions.tf

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/cert-manager-manual-deployment.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,28 @@ Check the status of the ClusterIssuer:
7272
kubectl get clusterissuer letsencrypt-prod -o wide
7373
```
7474
It should say `True` in the `READY` column.
75+
76+
## 5. Troubleshooting
77+
78+
### Pods Not Starting
79+
```bash
80+
# Check for ImagePullBackOff or CrashLoopBackOff
81+
kubectl describe pod <pod-name> -n cert-manager
82+
83+
# Fix: Verify internet access to pull images
84+
```
85+
86+
### CRD Errors
87+
```bash
88+
# Fix: Ensure installCRDs=true was passed to Helm
89+
helm upgrade cert-manager jetstack/cert-manager -n cert-manager --set installCRDs=true
90+
```
91+
92+
### Certificate Issuance Failed
93+
```bash
94+
# Check certificate lifecycle events
95+
kubectl describe certificate <name>
96+
kubectl describe challengerequest <name>
97+
98+
# Fix: Ensure Ingress is publicly reachable for Let's Encrypt validation
99+
```

docs/ingress-controller-manual-deployment.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,27 @@ kubectl config current-context
4848
kubectl get svc -n ingress-nginx # Adjust namespace if changed above
4949
```
5050
Wait for the `EXTERNAL-IP` to be assigned.
51+
52+
## 4. Troubleshooting
53+
54+
### External IP Pending
55+
```bash
56+
# Check service status
57+
kubectl get svc -n ingress-nginx
58+
59+
# Fix: Check Cloud Provider LoadBalancer quotas or usage
60+
```
61+
62+
### 404 on Access
63+
```bash
64+
# Verify Ingress resource exists and has valid backend
65+
kubectl get ingress -A
66+
67+
# Fix: Define an Ingress resource routing to your service
68+
```
69+
70+
### Ingress Class Conflict
71+
```bash
72+
# Fix: Ensure controller.ingressClass is unique (default: nginx)
73+
helm upgrade ... --set controller.ingressClass=unique-name
74+
```

docs/kubernetes-observability.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,26 @@ terraform destroy
244244
```
245245

246246
> **Warning**: Google Cloud Storage buckets containing observability data have `force_destroy` set to `false` to prevent accidental data loss. If you intend to delete the data, you must empty the buckets manually before running destroy.
247+
248+
## Troubleshooting
249+
250+
### Terraform State Locks
251+
```bash
252+
# Fix: Unlock state if sure no other process is running
253+
terraform force-unlock <LOCK_ID>
254+
```
255+
256+
### Provider Authentication Errors
257+
```bash
258+
# Fix: Re-authenticate with GCP
259+
gcloud auth application-default login
260+
```
261+
262+
### Pods Pending (Resources)
263+
```bash
264+
# Check for InsufficientCpu/Memory events
265+
kubectl describe pod <pod-name>
266+
267+
# Fix: Enable GKE Autoscaling or resize node pool
268+
```
269+

docs/manual-lgtm-deployment.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,27 @@ To stop and remove the stack:
8282
```bash
8383
docker compose down
8484
```
85+
86+
## 7. Troubleshooting
87+
88+
### Network Not Found Error
89+
```bash
90+
# Fix: Create missing network
91+
docker network create netbird_netbird
92+
```
93+
94+
### Port Conflicts
95+
```bash
96+
# Check what is using port 3000
97+
lsof -i :3000
98+
99+
# Fix: Stop conflicting service or change port mapping in docker-compose.yml
100+
```
101+
102+
### Container Exits Immediately
103+
```bash
104+
# Check crash logs
105+
docker compose logs <service_name>
106+
107+
# Fix: Common issue is permission on mounted volumes (chown -R 10001:10001)
108+
```

ingress-controller/README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,42 @@ The Ingress Controller provides:
99

1010
## Deployment Options
1111

12-
You can deploy the Ingress Controller using one of the following methods:
13-
1412
### 1. Automated Deployment
1513
This method uses the Terraform configuration located in the `terraform/` directory.
1614

1715
For detailed instructions, see the [Terraform deployment guide](../docs/ingress-controller-terraform-deployment.md).
1816

1917
### 2. Manual (Helm)
2018
If you prefer to deploy manually using Helm, you can follow the [manual deployment guide](../docs/ingress-controller-manual-deployment.md).
19+
20+
## Troubleshooting
21+
22+
### Deployment Flags
23+
Ensure variables are set correctly in `terraform.tfvars`:
24+
```hcl
25+
install_nginx_ingress = true
26+
```
27+
28+
### Common Issues
29+
30+
**LoadBalancer External IP Pending**
31+
```bash
32+
# Check service status for EXTERNAL-IP
33+
kubectl get svc -n ingress-nginx
34+
35+
# Fix: Verify GCP LoadBalancer quota or cloud-controller logs
36+
```
37+
38+
**404 Not Found**
39+
```bash
40+
# Verify Ingress resource points to valid Service/Port
41+
kubectl describe ingress <name> -n <namespace>
42+
43+
# Fix: Ensure Ingress Class is set to 'nginx'
44+
```
45+
46+
**SSL Certificate Issues**
47+
```bash
48+
# Check secret name in TLS section matches Cert-Manager secret
49+
kubectl describe ingress <name> -n <namespace>
50+
```

ingress-controller/terraform/main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
terraform {
2+
required_version = ">= 1.0"
3+
required_providers {
4+
kubernetes = {
5+
source = "hashicorp/kubernetes"
6+
version = "~> 2.0"
7+
}
8+
helm = {
9+
source = "hashicorp/helm"
10+
version = "~> 2.12"
11+
}
12+
}
13+
}
14+
115
resource "helm_release" "nginx_ingress" {
216
count = var.install_nginx_ingress ? 1 : 0
317

ingress-controller/terraform/versions.tf

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)