Mohammed Naser | 462cd79 | 2022-08-22 14:17:20 -0400 | [diff] [blame] | 1 | # Copyright (c) 2022 VEXXHOST, Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
okozachenko1203 | ceff992 | 2023-01-27 00:29:16 +1100 | [diff] [blame^] | 15 | - name: Uninstall the legacy HelmRelease |
| 16 | run_once: true |
| 17 | block: |
| 18 | - name: Suspend the existing HelmRelease |
| 19 | kubernetes.core.k8s: |
| 20 | state: patched |
| 21 | api_version: helm.toolkit.fluxcd.io/v2beta1 |
Mohammed Naser | 462cd79 | 2022-08-22 14:17:20 -0400 | [diff] [blame] | 22 | kind: HelmRelease |
okozachenko1203 | ceff992 | 2023-01-27 00:29:16 +1100 | [diff] [blame^] | 23 | name: "{{ coredns_helm_release_name }}" |
| 24 | namespace: "{{ coredns_helm_release_namespace }}" |
| 25 | definition: |
| 26 | spec: |
| 27 | suspend: true |
| 28 | |
| 29 | - name: Remove the existing HelmRelease |
| 30 | kubernetes.core.k8s: |
| 31 | state: absent |
| 32 | api_version: helm.toolkit.fluxcd.io/v2beta1 |
| 33 | kind: HelmRelease |
| 34 | name: "{{ coredns_helm_release_name }}" |
| 35 | namespace: "{{ coredns_helm_release_namespace }}" |
| 36 | |
| 37 | - name: Deploy Helm chart |
| 38 | run_once: true |
| 39 | kubernetes.core.helm: |
| 40 | name: "{{ coredns_helm_release_name }}" |
| 41 | chart_ref: "{{ coredns_helm_chart_ref }}" |
| 42 | release_namespace: "{{ coredns_helm_release_namespace }}" |
| 43 | create_namespace: true |
| 44 | kubeconfig: /etc/kubernetes/admin.conf |
| 45 | values: |
| 46 | image: |
| 47 | repository: "{{ atmosphere_images['neutron_coredns'] | vexxhost.atmosphere.docker_image('name') }}" |
| 48 | replicaCount: 3 |
| 49 | prometheus: |
| 50 | service: |
| 51 | enabled: true |
| 52 | service: |
| 53 | name: neutron-coredns |
| 54 | clusterIP: "{{ neutron_coredns_cluster_ip | default('10.96.0.20') }}" |
| 55 | isClusterService: false |
| 56 | servers: |
| 57 | - port: 53 |
| 58 | zones: |
| 59 | - zone: . |
| 60 | plugins: |
| 61 | - name: errors |
| 62 | - name: ready |
| 63 | - name: health |
| 64 | configBlock: |- |
| 65 | lameduck 5s |
| 66 | - name: prometheus |
| 67 | parameters: 0.0.0.0:9153 |
| 68 | - name: cache |
| 69 | - name: reload |
| 70 | - name: loadbalance |
| 71 | - name: forward |
| 72 | parameters: . 127.0.0.1:5301 127.0.0.1:5302 |
| 73 | - port: 5301 |
| 74 | zones: |
| 75 | - zone: . |
| 76 | plugins: |
| 77 | - name: forward |
| 78 | parameters: . tls://1.1.1.1 tls://1.0.0.1 |
| 79 | configBlock: |- |
| 80 | tls_servername cloudflare-dns.com |
| 81 | health_check 5s |
| 82 | - port: 5302 |
| 83 | zones: |
| 84 | - zone: . |
| 85 | plugins: |
| 86 | - name: forward |
| 87 | parameters: . tls://8.8.8.8 tls://8.8.4.4 |
| 88 | configBlock: |- |
| 89 | tls_servername dns.google |
| 90 | health_check 5s |
| 91 | nodeSelector: |
| 92 | openstack-control-plane: enabled |
| 93 | customLabels: |
| 94 | application: neutron |
| 95 | component: coredns |
| 96 | deployment: |
| 97 | name: neutron-coredns |