diff --git a/share/dns/config.tf b/share/dns/config.tf index d64495b..f04e4b1 100644 --- a/share/dns/config.tf +++ b/share/dns/config.tf @@ -11,6 +11,17 @@ locals { ready EOF end-core = <<-EOF + log . {combined} { + class denial error + } + kubernetes cluster.local + k8s_external ns.${var.domain-name} + prometheus 0.0.0.0:9153 + forward . ${var.forward} + cache 30 + loop + reload + loadbalance } EOF soa-ns = <<-EOF diff --git a/share/dns/datas.tf b/share/dns/datas.tf index 3e70482..baed5aa 100644 --- a/share/dns/datas.tf +++ b/share/dns/datas.tf @@ -12,8 +12,8 @@ locals { "key" = "Corefile" "path" = "Corefile" }],[for z in var.zones: { - "key" = z.name - "path" = z.name + "key" = "${z.name}.db" + "path" = "${z.name}.db" }]) } diff --git a/share/dns/index.yaml b/share/dns/index.yaml index 1cdb454..f93328a 100644 --- a/share/dns/index.yaml +++ b/share/dns/index.yaml @@ -6,6 +6,26 @@ metadata: name: dns description: null options: + sub-domain: + default: dns + examples: + - dns + type: string + domain: + default: your-company + examples: + - your-company + type: string + domain-name: + default: your_company.com + examples: + - your_company.com + type: string + forward: + default: 192.168.1.254 + examples: + - 192.168.1.254 + type: string zones: default: [] items: @@ -30,21 +50,6 @@ options: type: string type: object type: array - sub-domain: - default: dns - examples: - - dns - type: string - domain: - default: your-company - examples: - - your-company - type: string - domain-name: - default: your_company.com - examples: - - your_company.com - type: string image: default: pullPolicy: IfNotPresent