Skip to content

Commit 48e96fb

Browse files
Merge pull request #10 from darkradish/feature/repo-registration
Add : repository configuration (login, ca etc ...)
2 parents 4f838b5 + 2227e5d commit 48e96fb

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ module jenkins {
102102
| app | an application to deploy | `map(any)` | n/a | yes |
103103
| namespace | namespace where to deploy an application | `string` | n/a | yes |
104104
| repository | Helm repository | `string` | n/a | yes |
105+
| repository\_config | repository configuration | `map(any)` | n/a | yes |
105106
| 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 |
106107
| 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 |
107108
| values | Extra values | `list(string)` | `[]` | no |
@@ -117,10 +118,10 @@ module jenkins {
117118

118119
<!-- START makefile-doc -->
119120
```
120-
$ make help
121+
$ make help
121122
hooks Commit hooks setup
122123
validate Validate with pre-commit hooks
123-
changelog Update changelog
124+
changelog Update changelog
124125
```
125126
<!-- END makefile-doc -->
126127

main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ resource "helm_release" "this" {
22
count = var.app["deploy"] ? 1 : 0
33
namespace = var.namespace
44
repository = var.repository
5+
repository_key_file = lookup(var.repository_config, "repository_key_file", null)
6+
repository_cert_file = lookup(var.repository_config, "repository_cert_file", null)
7+
repository_ca_file = lookup(var.repository_config, "repository_ca_file", null)
8+
repository_username = lookup(var.repository_config, "repository_username", null)
9+
repository_password = lookup(var.repository_config, "repository_password", null)
510
name = var.app["name"]
611
version = var.app["version"]
712
chart = var.app["chart"]

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ variable "app" {
88
type = map(any)
99
}
1010

11+
variable "repository_config" {
12+
description = "repository configuration"
13+
type = map(any)
14+
default = {}
15+
}
16+
1117
variable "values" {
1218
description = "Extra values"
1319
type = list(string)

0 commit comments

Comments
 (0)