Skip to content

Commit

Permalink
Merge pull request #10 from darkradish/feature/repo-registration
Browse files Browse the repository at this point in the history
Add : repository configuration (login, ca etc ...)
  • Loading branch information
ivankatliarchuk authored Jul 6, 2022
2 parents 4f838b5 + 2227e5d commit 48e96fb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ module jenkins {
| app | an application to deploy | `map(any)` | n/a | yes |
| namespace | namespace where to deploy an application | `string` | n/a | yes |
| repository | Helm repository | `string` | n/a | yes |
| repository\_config | repository configuration | `map(any)` | n/a | yes |
| set | Value block with custom STRING values to be merged with the values yaml. | <pre>list(object({<br> name = string<br> value = string<br> }))</pre> | `null` | no |
| set\_sensitive | Value block with custom sensitive values to be merged with the values yaml that won't be exposed in the plan's diff. | <pre>list(object({<br> path = string<br> value = string<br> }))</pre> | `null` | no |
| values | Extra values | `list(string)` | `[]` | no |
Expand All @@ -117,10 +118,10 @@ module jenkins {

<!-- START makefile-doc -->
```
$ make help
$ make help
hooks Commit hooks setup
validate Validate with pre-commit hooks
changelog Update changelog
changelog Update changelog
```
<!-- END makefile-doc -->

Expand Down
5 changes: 5 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ resource "helm_release" "this" {
count = var.app["deploy"] ? 1 : 0
namespace = var.namespace
repository = var.repository
repository_key_file = lookup(var.repository_config, "repository_key_file", null)
repository_cert_file = lookup(var.repository_config, "repository_cert_file", null)
repository_ca_file = lookup(var.repository_config, "repository_ca_file", null)
repository_username = lookup(var.repository_config, "repository_username", null)
repository_password = lookup(var.repository_config, "repository_password", null)
name = var.app["name"]
version = var.app["version"]
chart = var.app["chart"]
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ variable "app" {
type = map(any)
}

variable "repository_config" {
description = "repository configuration"
type = map(any)
default = {}
}

variable "values" {
description = "Extra values"
type = list(string)
Expand Down

0 comments on commit 48e96fb

Please sign in to comment.