Add prod namespace

This commit is contained in:
Kasper Juul Hermansen 2022-05-08 21:08:41 +02:00
parent e92c44f7f1
commit 5be8d177ae
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
3 changed files with 70 additions and 15 deletions

View File

@ -18,6 +18,18 @@ resource "kubernetes_namespace" "flux_system" {
} }
} }
resource "kubernetes_namespace" "prod" {
metadata {
name = "prod"
}
lifecycle {
ignore_changes = [
metadata[0].labels,
]
}
}
data "kubectl_file_documents" "apply" { data "kubectl_file_documents" "apply" {
content = data.flux_install.main.content content = data.flux_install.main.content
} }

View File

@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.1.7", "terraform_version": "1.1.7",
"serial": 194, "serial": 196,
"lineage": "04d648e3-bdd4-2cef-384a-6564647940db", "lineage": "04d648e3-bdd4-2cef-384a-6564647940db",
"outputs": {}, "outputs": {},
"resources": [ "resources": [
@ -1233,6 +1233,35 @@
} }
] ]
}, },
{
"module": "module.flux",
"mode": "managed",
"type": "kubernetes_namespace",
"name": "prod",
"provider": "module.flux.provider[\"registry.terraform.io/hashicorp/kubernetes\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"id": "prod",
"metadata": [
{
"annotations": null,
"generate_name": "",
"generation": 0,
"labels": null,
"name": "prod",
"resource_version": "81720",
"uid": "44c5b774-db65-4ba1-95bd-b3f13f388eb6"
}
],
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjozMDAwMDAwMDAwMDB9fQ=="
}
]
},
{ {
"module": "module.flux", "module": "module.flux",
"mode": "managed", "mode": "managed",
@ -1282,9 +1311,11 @@
], ],
"private": "bnVsbA==", "private": "bnVsbA==",
"dependencies": [ "dependencies": [
"module.flux.data.flux_install.main",
"module.flux.data.flux_sync.main", "module.flux.data.flux_sync.main",
"module.flux.data.kubectl_file_documents.apply", "module.flux.data.kubectl_file_documents.apply",
"module.flux.kubectl_manifest.apply" "module.flux.kubectl_manifest.apply",
"module.flux.kubernetes_namespace.flux_system"
] ]
} }
] ]
@ -2085,7 +2116,6 @@
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "bnVsbA==", "private": "bnVsbA==",
"dependencies": [ "dependencies": [
"module.kube-hetzner.hcloud_firewall.k3s",
"module.kube-hetzner.hcloud_network.k3s", "module.kube-hetzner.hcloud_network.k3s",
"module.kube-hetzner.hcloud_network_subnet.agent", "module.kube-hetzner.hcloud_network_subnet.agent",
"module.kube-hetzner.hcloud_network_subnet.control_plane", "module.kube-hetzner.hcloud_network_subnet.control_plane",
@ -2093,9 +2123,10 @@
"module.kube-hetzner.hcloud_placement_group.control_plane", "module.kube-hetzner.hcloud_placement_group.control_plane",
"module.kube-hetzner.hcloud_ssh_key.k3s", "module.kube-hetzner.hcloud_ssh_key.k3s",
"module.kube-hetzner.module.agents.data.cloudinit_config.config", "module.kube-hetzner.module.agents.data.cloudinit_config.config",
"module.kube-hetzner.module.agents.random_string.server",
"module.kube-hetzner.module.agents.hcloud_server.server",
"module.kube-hetzner.module.agents.hcloud_server.server", "module.kube-hetzner.module.agents.hcloud_server.server",
"module.kube-hetzner.module.agents.hcloud_server_network.server", "module.kube-hetzner.module.agents.hcloud_server_network.server",
"module.kube-hetzner.module.agents.random_string.server",
"module.kube-hetzner.module.control_planes.data.cloudinit_config.config", "module.kube-hetzner.module.control_planes.data.cloudinit_config.config",
"module.kube-hetzner.module.control_planes.hcloud_server.server", "module.kube-hetzner.module.control_planes.hcloud_server.server",
"module.kube-hetzner.module.control_planes.hcloud_server_network.server", "module.kube-hetzner.module.control_planes.hcloud_server_network.server",
@ -2116,7 +2147,6 @@
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "bnVsbA==", "private": "bnVsbA==",
"dependencies": [ "dependencies": [
"module.kube-hetzner.hcloud_firewall.k3s",
"module.kube-hetzner.hcloud_network.k3s", "module.kube-hetzner.hcloud_network.k3s",
"module.kube-hetzner.hcloud_network_subnet.agent", "module.kube-hetzner.hcloud_network_subnet.agent",
"module.kube-hetzner.hcloud_network_subnet.control_plane", "module.kube-hetzner.hcloud_network_subnet.control_plane",
@ -2124,9 +2154,10 @@
"module.kube-hetzner.hcloud_placement_group.control_plane", "module.kube-hetzner.hcloud_placement_group.control_plane",
"module.kube-hetzner.hcloud_ssh_key.k3s", "module.kube-hetzner.hcloud_ssh_key.k3s",
"module.kube-hetzner.module.agents.data.cloudinit_config.config", "module.kube-hetzner.module.agents.data.cloudinit_config.config",
"module.kube-hetzner.module.agents.random_string.server",
"module.kube-hetzner.module.agents.hcloud_server.server",
"module.kube-hetzner.module.agents.hcloud_server.server", "module.kube-hetzner.module.agents.hcloud_server.server",
"module.kube-hetzner.module.agents.hcloud_server_network.server", "module.kube-hetzner.module.agents.hcloud_server_network.server",
"module.kube-hetzner.module.agents.random_string.server",
"module.kube-hetzner.module.control_planes.data.cloudinit_config.config", "module.kube-hetzner.module.control_planes.data.cloudinit_config.config",
"module.kube-hetzner.module.control_planes.hcloud_server.server", "module.kube-hetzner.module.control_planes.hcloud_server.server",
"module.kube-hetzner.module.control_planes.hcloud_server_network.server", "module.kube-hetzner.module.control_planes.hcloud_server_network.server",

View File

@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.1.7", "terraform_version": "1.1.7",
"serial": 192, "serial": 194,
"lineage": "04d648e3-bdd4-2cef-384a-6564647940db", "lineage": "04d648e3-bdd4-2cef-384a-6564647940db",
"outputs": {}, "outputs": {},
"resources": [ "resources": [
@ -1265,14 +1265,26 @@
], ],
"type": "Opaque" "type": "Opaque"
}, },
"sensitive_attributes": [], "sensitive_attributes": [
[
{
"type": "get_attr",
"value": "data"
},
{
"type": "index",
"value": {
"value": "identity",
"type": "string"
}
}
]
],
"private": "bnVsbA==", "private": "bnVsbA==",
"dependencies": [ "dependencies": [
"module.flux.data.flux_install.main",
"module.flux.data.flux_sync.main", "module.flux.data.flux_sync.main",
"module.flux.data.kubectl_file_documents.apply", "module.flux.data.kubectl_file_documents.apply",
"module.flux.kubectl_manifest.apply", "module.flux.kubectl_manifest.apply"
"module.flux.kubernetes_namespace.flux_system"
] ]
} }
] ]
@ -2012,16 +2024,16 @@
"private": "bnVsbA==", "private": "bnVsbA==",
"dependencies": [ "dependencies": [
"module.kube-hetzner.hcloud_firewall.k3s", "module.kube-hetzner.hcloud_firewall.k3s",
"module.kube-hetzner.hcloud_network_subnet.agent",
"module.kube-hetzner.hcloud_network.k3s", "module.kube-hetzner.hcloud_network.k3s",
"module.kube-hetzner.module.agents.random_string.server", "module.kube-hetzner.hcloud_network_subnet.agent",
"module.kube-hetzner.hcloud_network_subnet.control_plane",
"module.kube-hetzner.hcloud_placement_group.agent", "module.kube-hetzner.hcloud_placement_group.agent",
"module.kube-hetzner.hcloud_placement_group.control_plane", "module.kube-hetzner.hcloud_placement_group.control_plane",
"module.kube-hetzner.hcloud_ssh_key.k3s", "module.kube-hetzner.hcloud_ssh_key.k3s",
"module.kube-hetzner.module.agents.data.cloudinit_config.config", "module.kube-hetzner.module.agents.data.cloudinit_config.config",
"module.kube-hetzner.module.agents.hcloud_server.server", "module.kube-hetzner.module.agents.hcloud_server.server",
"module.kube-hetzner.module.agents.hcloud_server_network.server", "module.kube-hetzner.module.agents.hcloud_server_network.server",
"module.kube-hetzner.hcloud_network_subnet.control_plane", "module.kube-hetzner.module.agents.random_string.server",
"module.kube-hetzner.module.control_planes.data.cloudinit_config.config", "module.kube-hetzner.module.control_planes.data.cloudinit_config.config",
"module.kube-hetzner.module.control_planes.hcloud_server.server", "module.kube-hetzner.module.control_planes.hcloud_server.server",
"module.kube-hetzner.module.control_planes.hcloud_server_network.server", "module.kube-hetzner.module.control_planes.hcloud_server_network.server",
@ -2105,8 +2117,8 @@
"private": "bnVsbA==", "private": "bnVsbA==",
"dependencies": [ "dependencies": [
"module.kube-hetzner.hcloud_firewall.k3s", "module.kube-hetzner.hcloud_firewall.k3s",
"module.kube-hetzner.hcloud_network_subnet.agent",
"module.kube-hetzner.hcloud_network.k3s", "module.kube-hetzner.hcloud_network.k3s",
"module.kube-hetzner.hcloud_network_subnet.agent",
"module.kube-hetzner.hcloud_network_subnet.control_plane", "module.kube-hetzner.hcloud_network_subnet.control_plane",
"module.kube-hetzner.hcloud_placement_group.agent", "module.kube-hetzner.hcloud_placement_group.agent",
"module.kube-hetzner.hcloud_placement_group.control_plane", "module.kube-hetzner.hcloud_placement_group.control_plane",