added repo
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: coredns
|
||||
description: A Helm chart for Kubernetes (in-house CoreDNS stub-domain forwarder)
|
||||
version: 1.0.0
|
||||
appVersion: 1.13.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{{- define "labels.common" -}}
|
||||
env: {{ .Values.labels.env }}
|
||||
team: {{ .Values.labels.team }}
|
||||
bu: {{ .Values.labels.bu }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,45 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
Corefile: |
|
||||
|
||||
.:53 {
|
||||
log {
|
||||
class all
|
||||
}
|
||||
health {
|
||||
lameduck 5s
|
||||
}
|
||||
ready
|
||||
kubernetes cluster.local {
|
||||
fallthrough in-addr.arpa ip6.arpa
|
||||
}
|
||||
{{- range $k, $v := .Values.rewrites }}
|
||||
{{- $firstSplit := (split "/" $v)._0 }}
|
||||
{{- if and (or ($.Values.overwriteRegion) ($.Values.communicationType)) (or (and (eq (split "-" $v)._1 "external") (eq (split "-" $v)._2 $.Values.labels.bu)) (and (ne (split "-" $v)._1 "external") (eq (split "-" $v)._3 $.Values.labels.bu))) }}
|
||||
{{- if eq (split "-" $v)._1 "external" }}
|
||||
rewrite name {{ $k }}.svc.cluster.local {{ (split "-" $firstSplit)._0 }}-{{ (split "-" $firstSplit)._1 }}-{{ (split "-" $firstSplit)._2 }}{{ if $.Values.overwriteRegion }}-{{ $.Values.overwriteRegion }}{{- end }}-{{ (split "-" $firstSplit)._3 }}-envoy{{ if gt ((split "/" $v) | len) 1 }}-headless{{ end }}.{{ (split "/" $v)._0 }}.svc.cluster.local
|
||||
{{- else }}
|
||||
rewrite name {{ $k }}.svc.cluster.local {{ (split "-" $firstSplit)._0 }}-{{ (split "-" $firstSplit)._1 }}-{{ (split "-" $firstSplit)._2 }}-{{ (split "-" $firstSplit)._3 }}{{ if $.Values.overwriteRegion }}-{{ $.Values.overwriteRegion }}{{- end }}{{ if $.Values.communicationType }}-{{ $.Values.communicationType }}{{- end }}-{{ (split "-" $firstSplit)._4 }}-envoy{{ if gt ((split "/" $v) | len) 1 }}-headless{{ end }}.{{ (split "/" $v)._0 }}{{ if $.Values.communicationType }}-{{ $.Values.communicationType }}{{- end }}.svc.cluster.local
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
rewrite name {{ $k }}.svc.cluster.local {{ if eq (split "-" $v)._1 "external" }}{{ if ne (split "-" $v)._2 $.Values.labels.bu }}externalname-{{ end }}{{ else }}{{ if ne (split "-" $v)._3 $.Values.labels.bu }}externalname-{{ end }}{{ end }}{{ (split "/" $v)._0 }}-envoy{{ if gt ((split "/" $v) | len) 1 }}-headless{{ end }}.{{ (split "/" $v)._0 }}.svc.cluster.local
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
prometheus :9153
|
||||
forward . /etc/resolv.conf {
|
||||
max_concurrent 1000
|
||||
prefer_udp
|
||||
}
|
||||
cache 300 {
|
||||
success 9984
|
||||
denial 9984 15 15
|
||||
prefetch 2 1m 70%
|
||||
}
|
||||
loop
|
||||
reload
|
||||
loadbalance
|
||||
}
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
@@ -0,0 +1,90 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: coredns
|
||||
kubernetes.io/name: "CoreDNS"
|
||||
annotations:
|
||||
prometheus.io/port: "9153"
|
||||
prometheus.io/scrape: "true"
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 0
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: coredns
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: coredns
|
||||
{{ include "labels.common" . | indent 8 }}
|
||||
annotations:
|
||||
prometheus.io/port: "9153"
|
||||
prometheus.io/scrape: "true"
|
||||
spec:
|
||||
priorityClassName: system-cluster-critical
|
||||
serviceAccountName: coredns
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: coredns
|
||||
image: coredns/coredns:1.13.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
args: [ "-conf", "/etc/coredns/Corefile" ]
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/coredns
|
||||
readOnly: true
|
||||
ports:
|
||||
- containerPort: 53
|
||||
name: dns
|
||||
protocol: UDP
|
||||
- containerPort: 53
|
||||
name: dns-tcp
|
||||
protocol: TCP
|
||||
- containerPort: 9153
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
add:
|
||||
- NET_BIND_SERVICE
|
||||
drop:
|
||||
- all
|
||||
readOnlyRootFilesystem: true
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: 8181
|
||||
scheme: HTTP
|
||||
dnsPolicy: Default
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: coredns
|
||||
items:
|
||||
- key: Corefile
|
||||
path: Corefile
|
||||
@@ -0,0 +1,41 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
kubernetes.io/bootstrapping: rbac-defaults
|
||||
name: system:coredns
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
- services
|
||||
- pods
|
||||
- namespaces
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
annotations:
|
||||
rbac.authorization.kubernetes.io/autoupdate: "true"
|
||||
labels:
|
||||
kubernetes.io/bootstrapping: rbac-defaults
|
||||
name: system:coredns
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:coredns
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/port: "9153"
|
||||
prometheus.io/scrape: "true"
|
||||
labels:
|
||||
eks.amazonaws.com/component: kube-dns
|
||||
k8s-app: coredns
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: CoreDNS
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
spec:
|
||||
clusterIP: {{ .Values.clusterIP }}
|
||||
clusterIPs:
|
||||
- {{ .Values.clusterIP }}
|
||||
ports:
|
||||
- name: dns
|
||||
port: 53
|
||||
protocol: UDP
|
||||
targetPort: 53
|
||||
- name: dns-tcp
|
||||
port: 53
|
||||
protocol: TCP
|
||||
targetPort: 53
|
||||
selector:
|
||||
k8s-app: coredns
|
||||
type: ClusterIP
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
Reference in New Issue
Block a user