Support value overrides
diff --git a/roles/coredns/defaults/main.yml b/roles/coredns/defaults/main.yml
index 9a369db..816b238 100644
--- a/roles/coredns/defaults/main.yml
+++ b/roles/coredns/defaults/main.yml
@@ -17,3 +17,4 @@
coredns_helm_chart_ref: /usr/local/src/coredns
coredns_helm_release_namespace: openstack
+coredns_helm_values: {}
\ No newline at end of file
diff --git a/roles/coredns/tasks/main.yml b/roles/coredns/tasks/main.yml
index 2c5293c..2510fe2 100644
--- a/roles/coredns/tasks/main.yml
+++ b/roles/coredns/tasks/main.yml
@@ -42,56 +42,4 @@
release_namespace: "{{ coredns_helm_release_namespace }}"
create_namespace: true
kubeconfig: /etc/kubernetes/admin.conf
- values:
- image:
- repository: "{{ atmosphere_images['neutron_coredns'] | vexxhost.atmosphere.docker_image('name') }}"
- replicaCount: 3
- prometheus:
- service:
- enabled: true
- service:
- name: neutron-coredns
- clusterIP: "{{ neutron_coredns_cluster_ip | default('10.96.0.20') }}"
- isClusterService: false
- servers:
- - port: 53
- zones:
- - zone: .
- plugins:
- - name: errors
- - name: ready
- - name: health
- configBlock: |-
- lameduck 5s
- - name: prometheus
- parameters: 0.0.0.0:9153
- - name: cache
- - name: reload
- - name: loadbalance
- - name: forward
- parameters: . 127.0.0.1:5301 127.0.0.1:5302
- - port: 5301
- zones:
- - zone: .
- plugins:
- - name: forward
- parameters: . tls://1.1.1.1 tls://1.0.0.1
- configBlock: |-
- tls_servername cloudflare-dns.com
- health_check 5s
- - port: 5302
- zones:
- - zone: .
- plugins:
- - name: forward
- parameters: . tls://8.8.8.8 tls://8.8.4.4
- configBlock: |-
- tls_servername dns.google
- health_check 5s
- nodeSelector:
- openstack-control-plane: enabled
- customLabels:
- application: neutron
- component: coredns
- deployment:
- name: neutron-coredns
+ values: "{{ _coredns_helm_values | combine(coredns_helm_values, recursive=True) }}"
diff --git a/roles/coredns/vars/main.yml b/roles/coredns/vars/main.yml
new file mode 100644
index 0000000..0459a60
--- /dev/null
+++ b/roles/coredns/vars/main.yml
@@ -0,0 +1,67 @@
+# Copyright (c) 2022 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+_coredns_helm_values:
+ image:
+ repository: "{{ atmosphere_images['neutron_coredns'] | vexxhost.atmosphere.docker_image('name') }}"
+ replicaCount: 3
+ prometheus:
+ service:
+ enabled: true
+ service:
+ name: neutron-coredns
+ clusterIP: "{{ neutron_coredns_cluster_ip | default('10.96.0.20') }}"
+ isClusterService: false
+ servers:
+ - port: 53
+ zones:
+ - zone: .
+ plugins:
+ - name: errors
+ - name: ready
+ - name: health
+ configBlock: |-
+ lameduck 5s
+ - name: prometheus
+ parameters: 0.0.0.0:9153
+ - name: cache
+ - name: reload
+ - name: loadbalance
+ - name: forward
+ parameters: . 127.0.0.1:5301 127.0.0.1:5302
+ - port: 5301
+ zones:
+ - zone: .
+ plugins:
+ - name: forward
+ parameters: . tls://1.1.1.1 tls://1.0.0.1
+ configBlock: |-
+ tls_servername cloudflare-dns.com
+ health_check 5s
+ - port: 5302
+ zones:
+ - zone: .
+ plugins:
+ - name: forward
+ parameters: . tls://8.8.8.8 tls://8.8.4.4
+ configBlock: |-
+ tls_servername dns.google
+ health_check 5s
+ nodeSelector:
+ openstack-control-plane: enabled
+ customLabels:
+ application: neutron
+ component: coredns
+ deployment:
+ name: neutron-coredns