-
Notifications
You must be signed in to change notification settings - Fork 1
/
jx.tf
61 lines (53 loc) · 1.45 KB
/
jx.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
resource "google_storage_bucket" "lts-bucket" {
name = "${google_container_cluster.dev_cluster.name}-lts"
location = "US"
}
resource "kubernetes_namespace" "jx-namespace" {
depends_on = [google_container_node_pool.primary_preemptible_nodes_n1_standard_4]
metadata {
name = "jx"
}
lifecycle {
ignore_changes = [metadata[0].labels, metadata[0].annotations]
}
}
resource "kubernetes_secret" "kaniko-secret" {
depends_on = [kubernetes_namespace.jx-namespace]
metadata {
name = "kaniko-secret"
namespace = "jx"
}
data = {
"kaniko-secret" = base64decode(google_service_account_key.kaniko-sa-key.private_key)
}
}
resource "kubernetes_secret" "vault-secret" {
depends_on = [kubernetes_namespace.jx-namespace]
metadata {
name = "vault-secret"
namespace = "jx"
}
data = {
"credentials.json" = base64decode(google_service_account_key.vault-sa-key.private_key)
}
}
resource "kubernetes_secret" "external-dns-gcp-sa" {
depends_on = [kubernetes_namespace.jx-namespace]
metadata {
name = "external-dns-gcp-sa"
namespace = "jx"
}
data = {
"credentials.json" = base64decode(google_service_account_key.external-dns-gcp-sa-key.private_key)
}
}
resource "kubernetes_secret" "npmrc" {
depends_on = [kubernetes_namespace.jx-namespace]
metadata {
name = "npmrc"
namespace = kubernetes_namespace.jx-namespace.metadata[0].name
}
data = {
".npmrc" = file("./secret/.npmrc")
}
}