Skip to content

Commit 7ad9ae5

Browse files
committed
fix: remove unused variables and resources
The velero module is a left over from jx2 and the support in jx3-versions is not working
1 parent fd9977d commit 7ad9ae5

File tree

15 files changed

+9
-457
lines changed

15 files changed

+9
-457
lines changed

README.md

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ This repository contains a Terraform module for creating an EKS cluster and all
1818
- [ExternalDNS](#externaldns)
1919
- [cert-manager](#cert-manager)
2020
- [Customer's CA certificates](#customers-ca-certificates)
21-
- [Velero Backups](#velero-backups)
22-
- [Enabling backups on pre-existing clusters](#enabling-backups-on-pre-existing-clusters)
2321
- [Production cluster considerations](#production-cluster-considerations)
2422
- [Configuring a Terraform backend](#configuring-a-terraform-backend)
2523
- [Examples](#examples)
@@ -333,25 +331,6 @@ tls_cert = "/opt/CA/cert.crt"
333331
tls_key = "LS0tLS1C....BLRVktLS0tLQo="
334332
```
335333

336-
### Velero Backups
337-
338-
This module can set up the resources required for running backups with Velero on your cluster by setting the flag `enable_backup` to `true`.
339-
340-
#### Enabling backups on pre-existing clusters
341-
342-
If your cluster is pre-existing and already contains a namespace named `velero`, then enabling backups will initially fail with an error that you are trying to create a namespace which already exists.
343-
344-
```
345-
Error: namespaces "velero" already exists
346-
```
347-
348-
If you get this error, consider it a warning - you may then adjust accordingly by importing that namespace to be managed by Terraform, deleting the previously existing ns if it wasn't actually in use, or setting `enable_backup` back to `false` to continue managing Velero in the previous manner.
349-
350-
The recommended way is to import the namespace and then run another Terraform plan and apply:
351-
352-
```
353-
terraform import module.eks-jx.module.backup.kubernetes_namespace.velero_namespace velero
354-
```
355334
### Production cluster considerations
356335

357336
The configuration, as seen in [Cluster provisioning](#cluster-provisioning), is not suited for creating and maintaining a production Jenkins X cluster.
@@ -411,7 +390,6 @@ Each example generates a valid _jx-requirements.yml_ file that can be used to bo
411390

412391
| Name | Source | Version |
413392
|------|--------|---------|
414-
| <a name="module_backup"></a> [backup](#module\_backup) | ./modules/backup | n/a |
415393
| <a name="module_cluster"></a> [cluster](#module\_cluster) | ./modules/cluster | n/a |
416394
| <a name="module_dns"></a> [dns](#module\_dns) | ./modules/dns | n/a |
417395
| <a name="module_health"></a> [health](#module\_health) | ./modules/health | n/a |
@@ -434,7 +412,7 @@ Each example generates a valid _jx-requirements.yml_ file that can be used to bo
434412
| <a name="input_apex_domain"></a> [apex\_domain](#input\_apex\_domain) | The main domain to either use directly or to configure a subdomain from | `string` | `""` | no |
435413
| <a name="input_asm_role"></a> [asm\_role](#input\_asm\_role) | DEPRECATED: Use the new bot\_iam\_role input with he same semantics instead. | `string` | `""` | no |
436414
| <a name="input_boot_iam_role"></a> [boot\_iam\_role](#input\_boot\_iam\_role) | Specify arn of the role to apply to the boot job service account | `string` | `""` | no |
437-
| <a name="input_boot_secrets"></a> [boot\_secrets](#input\_boot\_secrets) | n/a | <pre>list(object({<br> name = string<br> value = string<br> type = string<br> }))</pre> | `[]` | no |
415+
| <a name="input_boot_secrets"></a> [boot\_secrets](#input\_boot\_secrets) | n/a | <pre>list(object({<br/> name = string<br/> value = string<br/> type = string<br/> }))</pre> | `[]` | no |
438416
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Variable to provide your desired name for the cluster | `string` | n/a | yes |
439417
| <a name="input_cluster_oidc_issuer_url"></a> [cluster\_oidc\_issuer\_url](#input\_cluster\_oidc\_issuer\_url) | The oidc provider url for the clustrer | `string` | n/a | yes |
440418
| <a name="input_create_and_configure_subdomain"></a> [create\_and\_configure\_subdomain](#input\_create\_and\_configure\_subdomain) | Flag to create an NS record set for the subdomain in the apex domain's Hosted Zone | `bool` | `false` | no |
@@ -450,12 +428,8 @@ Each example generates a valid _jx-requirements.yml_ file that can be used to bo
450428
| <a name="input_create_pipeline_vis_role"></a> [create\_pipeline\_vis\_role](#input\_create\_pipeline\_vis\_role) | Flag to control pipeline visualizer role | `bool` | `true` | no |
451429
| <a name="input_create_ssm_role"></a> [create\_ssm\_role](#input\_create\_ssm\_role) | Flag to control AWS Parameter Store iam roles creation | `bool` | `false` | no |
452430
| <a name="input_create_tekton_role"></a> [create\_tekton\_role](#input\_create\_tekton\_role) | Flag to control tekton iam role creation | `bool` | `true` | no |
453-
| <a name="input_create_velero_role"></a> [create\_velero\_role](#input\_create\_velero\_role) | Flag to control velero iam role creation | `bool` | `true` | no |
454-
| <a name="input_eks_cluster_tags"></a> [eks\_cluster\_tags](#input\_eks\_cluster\_tags) | Add tags for the EKS Cluster | `map(any)` | `{}` | no |
455431
| <a name="input_enable_acl"></a> [enable\_acl](#input\_enable\_acl) | Flag to enable ACL instead of bucket ownership for S3 storage | `bool` | `false` | no |
456-
| <a name="input_enable_backup"></a> [enable\_backup](#input\_enable\_backup) | Whether or not Velero backups should be enabled | `bool` | `false` | no |
457432
| <a name="input_enable_external_dns"></a> [enable\_external\_dns](#input\_enable\_external\_dns) | Flag to enable or disable External DNS in the final `jx-requirements.yml` file | `bool` | `false` | no |
458-
| <a name="input_enable_key_rotation"></a> [enable\_key\_rotation](#input\_enable\_key\_rotation) | Flag to enable kms key rotation | `bool` | `true` | no |
459433
| <a name="input_enable_logs_storage"></a> [enable\_logs\_storage](#input\_enable\_logs\_storage) | Flag to enable or disable long term storage for logs | `bool` | `true` | no |
460434
| <a name="input_enable_reports_storage"></a> [enable\_reports\_storage](#input\_enable\_reports\_storage) | Flag to enable or disable long term storage for reports | `bool` | `true` | no |
461435
| <a name="input_enable_repository_storage"></a> [enable\_repository\_storage](#input\_enable\_repository\_storage) | Flag to enable or disable the repository bucket storage | `bool` | `true` | no |
@@ -470,7 +444,6 @@ Each example generates a valid _jx-requirements.yml_ file that can be used to bo
470444
| <a name="input_jx_bot_username"></a> [jx\_bot\_username](#input\_jx\_bot\_username) | Bot username used to interact with the Jenkins X cluster git repository | `string` | `""` | no |
471445
| <a name="input_jx_git_operator_values"></a> [jx\_git\_operator\_values](#input\_jx\_git\_operator\_values) | Extra values for jx-git-operator chart as a list of yaml formated strings | `list(string)` | `[]` | no |
472446
| <a name="input_jx_git_url"></a> [jx\_git\_url](#input\_jx\_git\_url) | URL for the Jenkins X cluster git repository | `string` | `""` | no |
473-
| <a name="input_local-exec-interpreter"></a> [local-exec-interpreter](#input\_local-exec-interpreter) | If provided, this is a list of interpreter arguments used to execute the command | `list(string)` | <pre>[<br> "/bin/bash",<br> "-c"<br>]</pre> | no |
474447
| <a name="input_manage_apex_domain"></a> [manage\_apex\_domain](#input\_manage\_apex\_domain) | Flag to control if apex domain should be managed/updated by this module. Set this to false,if your apex domain is managed in a different AWS account or different provider | `bool` | `true` | no |
475448
| <a name="input_manage_subdomain"></a> [manage\_subdomain](#input\_manage\_subdomain) | Flag to control subdomain creation/management | `bool` | `true` | no |
476449
| <a name="input_nginx_chart_version"></a> [nginx\_chart\_version](#input\_nginx\_chart\_version) | nginx chart version | `string` | n/a | yes |
@@ -483,7 +456,6 @@ Each example generates a valid _jx-requirements.yml_ file that can be used to bo
483456
| <a name="input_s3_extra_tags"></a> [s3\_extra\_tags](#input\_s3\_extra\_tags) | Add new tags for s3 buckets | `map(any)` | `{}` | no |
484457
| <a name="input_s3_kms_arn"></a> [s3\_kms\_arn](#input\_s3\_kms\_arn) | ARN of the kms key used for encrypting s3 buckets | `string` | `""` | no |
485458
| <a name="input_subdomain"></a> [subdomain](#input\_subdomain) | The subdomain to be added to the apex domain. If subdomain is set, it will be appended to the apex domain in `jx-requirements-eks.yml` file | `string` | `""` | no |
486-
| <a name="input_subnets"></a> [subnets](#input\_subnets) | The subnet ids to create EKS cluster in if create\_vpc is false | `list(string)` | `[]` | no |
487459
| <a name="input_tls_cert"></a> [tls\_cert](#input\_tls\_cert) | TLS certificate encrypted with Base64 | `string` | `""` | no |
488460
| <a name="input_tls_email"></a> [tls\_email](#input\_tls\_email) | The email to register the LetsEncrypt certificate with. Added to the `jx-requirements.yml` file | `string` | `""` | no |
489461
| <a name="input_tls_key"></a> [tls\_key](#input\_tls\_key) | TLS key encrypted with Base64 | `string` | `""` | no |
@@ -493,23 +465,17 @@ Each example generates a valid _jx-requirements.yml_ file that can be used to bo
493465
| <a name="input_vault_instance_values"></a> [vault\_instance\_values](#input\_vault\_instance\_values) | Extra values for vault-instance chart as a list of yaml formated strings | `list(string)` | `[]` | no |
494466
| <a name="input_vault_operator_values"></a> [vault\_operator\_values](#input\_vault\_operator\_values) | Extra values for vault-operator chart as a list of yaml formated strings | `list(string)` | `[]` | no |
495467
| <a name="input_vault_url"></a> [vault\_url](#input\_vault\_url) | URL to an external Vault instance in case Jenkins X does not create its own system Vault | `string` | `""` | no |
496-
| <a name="input_velero_namespace"></a> [velero\_namespace](#input\_velero\_namespace) | Kubernetes namespace for Velero | `string` | `"velero"` | no |
497-
| <a name="input_velero_schedule"></a> [velero\_schedule](#input\_velero\_schedule) | The Velero backup schedule in cron notation to be set in the Velero Schedule CRD (see [default-backup.yaml](https://github.com/jenkins-x/jenkins-x-boot-config/blob/master/systems/velero-backups/templates/default-backup.yaml)) | `string` | `"0 * * * *"` | no |
498-
| <a name="input_velero_ttl"></a> [velero\_ttl](#input\_velero\_ttl) | The the lifetime of a velero backup to be set in the Velero Schedule CRD (see [default-backup.yaml](https://github.com/jenkins-x/jenkins-x-boot-config/blob/master/systems/velero-backups/templates/default-backup)) | `string` | `"720h0m0s"` | no |
499-
| <a name="input_velero_username"></a> [velero\_username](#input\_velero\_username) | The username to be assigned to the Velero IAM user | `string` | `"velero"` | no |
500-
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The VPC to create EKS cluster in if create\_vpc is false | `string` | `""` | no |
501468
#### Outputs
502469

503470
| Name | Description |
504471
|------|-------------|
505-
| <a name="output_backup_bucket_url"></a> [backup\_bucket\_url](#output\_backup\_bucket\_url) | The bucket where backups from velero will be stored |
506472
| <a name="output_cert_manager_iam_role"></a> [cert\_manager\_iam\_role](#output\_cert\_manager\_iam\_role) | The IAM Role that the Cert Manager pod will assume to authenticate |
507473
| <a name="output_cluster_asm_iam_role"></a> [cluster\_asm\_iam\_role](#output\_cluster\_asm\_iam\_role) | The IAM Role that the External Secrets pod will assume to authenticate (Secrets Manager) |
508474
| <a name="output_cluster_autoscaler_iam_role"></a> [cluster\_autoscaler\_iam\_role](#output\_cluster\_autoscaler\_iam\_role) | The IAM Role that the Jenkins X UI pod will assume to authenticate |
509475
| <a name="output_cluster_name"></a> [cluster\_name](#output\_cluster\_name) | The name of the created cluster |
510476
| <a name="output_cluster_ssm_iam_role"></a> [cluster\_ssm\_iam\_role](#output\_cluster\_ssm\_iam\_role) | The IAM Role that the External Secrets pod will assume to authenticate (Parameter Store) |
511477
| <a name="output_cm_cainjector_iam_role"></a> [cm\_cainjector\_iam\_role](#output\_cm\_cainjector\_iam\_role) | The IAM Role that the CM CA Injector pod will assume to authenticate |
512-
| <a name="output_connect"></a> [connect](#output\_connect) | "The cluster connection string to use once Terraform apply finishes,<br>this command is already executed as part of the apply, you may have to provide the region and<br>profile as environment variables " |
478+
| <a name="output_connect"></a> [connect](#output\_connect) | The cluster connection string to use once Terraform apply finishes. You may have to provide the region and<br/>profile (as options or environment variables) |
513479
| <a name="output_controllerbuild_iam_role"></a> [controllerbuild\_iam\_role](#output\_controllerbuild\_iam\_role) | The IAM Role that the ControllerBuild pod will assume to authenticate |
514480
| <a name="output_external_dns_iam_role"></a> [external\_dns\_iam\_role](#output\_external\_dns\_iam\_role) | The IAM Role that the External DNS pod will assume to authenticate |
515481
| <a name="output_jx_requirements"></a> [jx\_requirements](#output\_jx\_requirements) | The jx-requirements rendered output |

examples/basic/outputs.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ output "cluster_id" {
66
value = module.eks.cluster_id
77
}
88

9-
//// Storage (backup, logs, reports, repo)
10-
//output "backup_bucket_url" {
11-
// value = module.eks-jx.backup_bucket_url
12-
// description = "The bucket where backups from velero will be stored"
13-
//}
9+
//// Storage (logs, reports, repo)
1410
//
1511
//output "lts_logs_bucket" {
1612
// value = module.eks-jx.lts_logs_bucket

local.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ locals {
2424
use_vault = var.use_vault
2525
// AWS Secrets Manager
2626
use_asm = var.use_asm
27-
// Velero
28-
enable_backup = var.enable_backup
29-
backup_bucket_url = module.backup.backup_bucket_url
30-
velero_namespace = var.velero_namespace
31-
velero_schedule = var.velero_schedule
32-
velero_ttl = var.velero_ttl
3327
// DNS
3428
tls_secret_name = local.tls_secret_name
3529
enable_external_dns = var.enable_external_dns

main.tf

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ data "aws_caller_identity" "current" {}
88
module "cluster" {
99
source = "./modules/cluster"
1010
region = var.region
11-
vpc_id = var.vpc_id
12-
subnets = var.subnets
1311
cluster_name = var.cluster_name
1412
force_destroy = var.force_destroy
1513
use_kms_s3 = var.use_kms_s3
@@ -33,13 +31,11 @@ module "cluster" {
3331
additional_tekton_role_policy_arns = var.additional_tekton_role_policy_arns
3432
tls_cert = var.tls_cert
3533
tls_key = var.tls_key
36-
local-exec-interpreter = var.local-exec-interpreter
3734
enable_logs_storage = var.enable_logs_storage
3835
expire_logs_after_days = var.expire_logs_after_days
3936
enable_reports_storage = var.enable_reports_storage
4037
enable_repository_storage = var.enable_repository_storage
4138
boot_secrets = var.boot_secrets
42-
use_asm = var.use_asm
4339
boot_iam_role = "${var.asm_role}${var.boot_iam_role}"
4440
enable_acl = var.enable_acl
4541
cluster_oidc_issuer_url = var.cluster_oidc_issuer_url
@@ -56,21 +52,6 @@ module "vault" {
5652
vault_instance_values = var.vault_instance_values
5753
}
5854

59-
// ----------------------------------------------------------------------------
60-
// Setup all required resources for using Velero for cluster backups
61-
// ----------------------------------------------------------------------------
62-
module "backup" {
63-
source = "./modules/backup"
64-
65-
enable_backup = var.enable_backup
66-
cluster_name = var.cluster_name
67-
force_destroy = var.force_destroy
68-
velero_username = var.velero_username
69-
create_velero_role = var.create_velero_role
70-
enable_acl = var.enable_acl
71-
s3_extra_tags = var.s3_extra_tags
72-
}
73-
7455
// ----------------------------------------------------------------------------
7556
// Setup all required Route 53 resources if External DNS / Cert Manager is enabled
7657
// ----------------------------------------------------------------------------

modules/backup/README.md

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

0 commit comments

Comments
 (0)