Skip to content

Commit

Permalink
Prevent shadow-service creation for CoreDNS and a custom release name
Browse files Browse the repository at this point in the history
  • Loading branch information
jspdown committed Jul 28, 2020
1 parent fb506d0 commit 545ba7a
Show file tree
Hide file tree
Showing 24 changed files with 159 additions and 116 deletions.
7 changes: 4 additions & 3 deletions helm/chart/maesh/charts/metrics/templates/grafana-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ kind: PodDisruptionBudget
metadata:
name: grafana
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: grafana
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
minAvailable: 1
selector:
matchLabels:
app: grafana
component: core
app: maesh
component: grafana
25 changes: 13 additions & 12 deletions helm/chart/maesh/charts/metrics/templates/grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ metadata:
name: grafana-core
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: grafana
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
component: grafana
spec:
replicas: 1
selector:
matchLabels:
app: grafana
component: core
app: maesh
component: grafana
template:
metadata:
labels:
app: grafana
component: core
app: maesh
component: grafana
spec:
serviceAccountName: grafana-k8s
automountServiceAccountToken: false
Expand Down Expand Up @@ -100,11 +100,11 @@ metadata:
name: grafana-config
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: grafana
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
component: grafana
data:
grafana.ini: |-
instance_name = containous-grafana
Expand Down Expand Up @@ -155,11 +155,11 @@ metadata:
name: grafana
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: grafana
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
component: grafana
spec:
type: {{ .Values.grafana.service.type }}
ports:
Expand All @@ -169,8 +169,8 @@ spec:
nodePort: {{ .Values.grafana.service.nodePort }}
{{- end }}
selector:
app: grafana
component: core
app: maesh
component: grafana

---
{{- $files := .Files }}
Expand All @@ -183,6 +183,7 @@ metadata:
name: grafana-dashboard-{{ $filename }}
namespace: {{ $ns }}
labels:
app: maesh
component: grafana
data:
{{ base $path }}: '{{ $files.Get $path }}'
Expand Down
7 changes: 4 additions & 3 deletions helm/chart/maesh/charts/metrics/templates/prometheus-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ kind: PodDisruptionBudget
metadata:
name: prometheus
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
minAvailable: 1
selector:
matchLabels:
app: prometheus
component: core
app: maesh
component: prometheus
28 changes: 14 additions & 14 deletions helm/chart/maesh/charts/metrics/templates/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ metadata:
name: prometheus-rules
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
component: prometheus
data:
general.yaml: |
groups:
Expand All @@ -29,11 +29,11 @@ metadata:
name: prometheus-core
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
component: prometheus
data:
prometheus.yaml: |
global:
Expand Down Expand Up @@ -71,23 +71,23 @@ metadata:
name: prometheus-core
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
component: prometheus
spec:
replicas: 1
selector:
matchLabels:
app: prometheus
component: core
app: maesh
component: prometheus
template:
metadata:
name: prometheus-main
labels:
app: prometheus
component: core
app: maesh
component: prometheus
spec:
serviceAccountName: prometheus-k8s
automountServiceAccountToken: true
Expand Down Expand Up @@ -175,11 +175,11 @@ metadata:
name: prometheus
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
component: prometheus
annotations:
prometheus.io/scrape: 'true'
spec:
Expand All @@ -193,5 +193,5 @@ spec:
protocol: TCP
name: webui
selector:
app: prometheus
component: core
app: maesh
component: prometheus
8 changes: 8 additions & 0 deletions helm/chart/maesh/charts/metrics/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: ClusterRoleBinding
metadata:
name: prometheus
labels:
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
Expand All @@ -22,6 +24,8 @@ kind: ClusterRole
metadata:
name: prometheus
labels:
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
Expand Down Expand Up @@ -51,6 +55,8 @@ metadata:
name: prometheus-k8s
namespace: {{ .Release.Namespace }}
labels:
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
Expand All @@ -62,6 +68,8 @@ metadata:
name: grafana-k8s
namespace: {{ .Release.Namespace }}
labels:
app: maesh
component: grafana
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
4 changes: 4 additions & 0 deletions helm/chart/maesh/charts/metrics/templates/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: metrics-storage
namespace: {{ .Release.Namespace }}
labels:
app: maesh
component: grafana
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
Expand All @@ -25,6 +27,8 @@ metadata:
name: prometheus-storage
namespace: {{ .Release.Namespace }}
labels:
app: maesh
component: prometheus
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
Expand Down
98 changes: 49 additions & 49 deletions helm/chart/maesh/charts/tracing/templates/jaeger-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,52 +47,52 @@ spec:
runAsNonRoot: true
runAsUser: 999
containers:
- env:
- name: COLLECTOR_ZIPKIN_HTTP_PORT
value: "9411"
image: {{ .Values.image.jaeger | quote }}
name: jaeger
ports:
- containerPort: 5775
protocol: UDP
name: thrift-legacy
- containerPort: 6831
protocol: UDP
name: compact-thrift
- containerPort: 6832
protocol: UDP
name: binary-thrift
- containerPort: 5778
protocol: TCP
name: serve-configs
- containerPort: 9411
protocol: TCP
name: collector-zip
- containerPort: 14267
protocol: TCP
name: collector-tch
- containerPort: 14268
protocol: TCP
name: collector-http
- containerPort: 14269
protocol: TCP
name: readiness
- containerPort: 16686
protocol: TCP
name: serve-frontend
readinessProbe:
httpGet:
path: "/"
port: readiness
initialDelaySeconds: 5
livenessProbe:
tcpSocket:
port: readiness
initialDelaySeconds: 5
resources:
requests:
memory: "50Mi"
cpu: "100m"
limits:
memory: "100Mi"
cpu: "200m"
- env:
- name: COLLECTOR_ZIPKIN_HTTP_PORT
value: "9411"
image: {{ .Values.image.jaeger | quote }}
name: jaeger
ports:
- containerPort: 5775
protocol: UDP
name: thrift-legacy
- containerPort: 6831
protocol: UDP
name: compact-thrift
- containerPort: 6832
protocol: UDP
name: binary-thrift
- containerPort: 5778
protocol: TCP
name: serve-configs
- containerPort: 9411
protocol: TCP
name: collector-zip
- containerPort: 14267
protocol: TCP
name: collector-tch
- containerPort: 14268
protocol: TCP
name: collector-http
- containerPort: 14269
protocol: TCP
name: readiness
- containerPort: 16686
protocol: TCP
name: serve-frontend
readinessProbe:
httpGet:
path: "/"
port: readiness
initialDelaySeconds: 5
livenessProbe:
tcpSocket:
port: readiness
initialDelaySeconds: 5
resources:
requests:
memory: "50Mi"
cpu: "100m"
limits:
memory: "100Mi"
cpu: "200m"
2 changes: 1 addition & 1 deletion helm/chart/maesh/charts/tracing/templates/jaeger-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: PodDisruptionBudget
metadata:
name: jaeger
labels:
app: {{ .Release.Name | quote }}
app: jaeger
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
Expand Down
2 changes: 1 addition & 1 deletion helm/chart/maesh/charts/tracing/templates/jaeger-sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: jaeger
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote}}
app: jaeger
chart: {{ include "maesh.chartLabel" . | quote}}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ metadata:
name: maesh-controller
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: controller
chart: {{ include "maesh.chartLabel" . | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name | quote }}
app: maesh
component: controller
release: {{ .Release.Name | quote }}
template:
metadata:
labels:
app: {{ .Release.Name | quote }}
app: maesh
component: controller
release: {{ .Release.Name | quote }}
annotations:
Expand Down
Loading

0 comments on commit 545ba7a

Please sign in to comment.