blob: 7c5ff6477c227179528184b2622da2a0273e462f [file] [log] [blame]
Mohammed Naser462cd792022-08-22 14:17:20 -04001# 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
15- name: Deploy Helm chart
16 kubernetes.core.k8s:
17 state: present
18 definition:
Mohammed Naser462cd792022-08-22 14:17:20 -040019 - apiVersion: helm.toolkit.fluxcd.io/v2beta1
20 kind: HelmRelease
21 metadata:
22 name: neutron-coredns
23 namespace: openstack
24 spec:
25 interval: 60s
26 chart:
27 spec:
28 chart: coredns
29 version: 1.19.4
30 sourceRef:
31 kind: HelmRepository
32 name: coredns
33 values:
34 replicaCount: 3
Mohammed Naser05124452022-08-22 17:24:03 -040035 prometheus:
36 service:
37 enabled: true
Mohammed Naser462cd792022-08-22 14:17:20 -040038 service:
39 name: neutron-coredns
40 clusterIP: 10.96.0.20
41 isClusterService: false
42 servers:
43 - port: 53
44 zones:
45 - zone: .
46 plugins:
47 - name: errors
48 - name: ready
49 - name: health
50 configBlock: |-
51 lameduck 5s
52 - name: prometheus
53 parameters: 0.0.0.0:9153
54 - name: cache
55 - name: reload
56 - name: loadbalance
57 - name: forward
58 parameters: . 127.0.0.1:5301 127.0.0.1:5302
59 - port: 5301
60 zones:
61 - zone: .
62 plugins:
63 - name: forward
64 parameters: . tls://1.1.1.1 tls://1.0.0.1
65 configBlock: |-
66 tls_servername cloudflare-dns.com
67 health_check 5s
68 - port: 5302
69 zones:
70 - zone: .
71 plugins:
72 - name: forward
73 parameters: . tls://8.8.8.8 tls://8.8.4.4
74 configBlock: |-
75 tls_servername dns.google
76 health_check 5s
77 nodeSelector:
78 openstack-control-plane: enabled
79 customLabels:
80 application: neutron
81 component: coredns
82 deployment:
83 name: neutron-coredns
Mohammed Naser05124452022-08-22 17:24:03 -040084
85 - apiVersion: monitoring.coreos.com/v1
86 kind: ServiceMonitor
87 metadata:
88 name: neutron-coredns
89 namespace: monitoring
90 labels:
91 release: kube-prometheus-stack
92 spec:
93 jobLabel: app.kubernetes.io/name
94 endpoints:
95 - port: "metrics"
96 path: "/metrics"
97 relabelings:
98 - sourceLabels: ["__meta_kubernetes_pod_label_application"]
99 targetLabel: "application"
100 - sourceLabels: ["__meta_kubernetes_pod_name"]
101 targetLabel: "instance"
102 - action: "labeldrop"
103 regex: "^(container|endpoint|namespace|pod|service)$"
104 namespaceSelector:
105 matchNames:
106 - openstack
107 selector:
108 matchLabels:
109 app.kubernetes.io/name: coredns
110 app.kubernetes.io/component: metrics