Add lighthouse-coredns charts

1. Adds deployment amd configmap
2. Updates RBAC
This commit is contained in:
Vishal Thapar
2020-06-09 13:27:07 +02:00
committed by Miguel Angel Ajo Pelayo
parent c905d9fdca
commit b217b75f96
4 changed files with 88 additions and 1 deletions
+7
View File
@@ -74,3 +74,10 @@ Create the name of the submariner-lighthouse service account to use
{{ default "default" .Values.serviceAccounts.lighthouse.name }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the submariner-lighthouse-coredns service name to use
*/}}
{{- define "submariner.lighthouseDnsName" -}}
{{- default (printf "%s-lighthouse-coredns" (include "submariner.fullname" .)) .Values.lighthouseCoredns.name }}
{{- end -}}
@@ -0,0 +1,74 @@
{{- if .Values.submariner.serviceDiscovery }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "submariner.lighthouseDnsName" . }}
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.lighthouseDnsName" . }}
component: lighthouse-coredns
spec:
selector:
matchLabels:
app: {{ template "submariner.lighthouseDnsName" . }}
replicas: 2
template:
metadata:
labels:
app: {{ template "submariner.lighthouseDnsName" . }}
spec:
containers:
- args:
- -conf
- /etc/coredns/Corefile
image: {{ .Values.lighthouseCoredns.image.repository }}:{{ .Values.lighthouseCoredns.image.tag }}
imagePullPolicy: {{ .Values.lighthouseCoredns.image.pullPolicy }}
name: {{ template "submariner.fullname" . }}-lighthouse-agent
volumeMounts:
- mountPath: /etc/coredns
name: config-volume
readOnly: true
serviceAccountName: {{ template "submariner.lighthouseServiceAccountName" . }}
volumes:
- configMap:
defaultMode: 420
items:
- key: Corefile
path: Corefile
name: {{ template "submariner.lighthouseDnsName" . }}
name: config-volume
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "submariner.lighthouseDnsName" . }}
labels:
app: {{ template "submariner.lighthouseDnsName" . }}
spec:
ports:
- name: udp
port: 53
protocol: UDP
targetPort: 53
selector:
app: {{ template "submariner.lighthouseDnsName" . }}
type: ClusterIP
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "submariner.lighthouseDnsName" . }}
data:
Corefile: |
supercluster.local:53 {
{{- if .Values.submariner.debug }}
log
{{- end }}
lighthouse
errors
health
ready
}
{{- end }}
+1 -1
View File
@@ -118,7 +118,7 @@ metadata:
name: {{ template "submariner.fullname" . }}:lighthouse
rules:
- apiGroups: [""]
resources: ["services", "namespaces"]
resources: ["services", "namespaces", "configmaps"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["lighthouse.submariner.io"]
resources: ["*"]
+6
View File
@@ -64,6 +64,12 @@ lighthouse:
repository: lighthouse-agent
tag: local
pullPolicy: IfNotPresent
lighthouseCoredns:
name: ""
image:
repository: lighthouse-coredns
tag: local
pullPolicy: IfNotPresent
serviceAccounts:
engine:
create: true