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