Skip to content

Commit

Permalink
migrate to control plane
Browse files Browse the repository at this point in the history
  • Loading branch information
joryirving committed Feb 7, 2024
1 parent 57ab71d commit 2e70446
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ spec:
limits:
cpu: 100m
memory: 100Mi
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
service:
main:
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ spec:
memory: 50Mi
limits:
memory: 100Mi
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
service:
main:
enabled: false
Expand Down
11 changes: 10 additions & 1 deletion kubernetes/teyvat/apps/observability/gatus/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: gatus
name: &app gatus
spec:
interval: 30m
chart:
Expand All @@ -26,6 +26,8 @@ spec:
values:
controllers:
main:
replicas: 2
strategy: RollingUpdate
annotations:
reloader.stakater.com/auto: "true"
initContainers:
Expand Down Expand Up @@ -97,6 +99,13 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: *app
service:
main:
ports:
Expand Down
11 changes: 10 additions & 1 deletion kubernetes/teyvat/apps/observability/karma/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: karma
name: &app karma
spec:
interval: 30m
chart:
Expand All @@ -30,6 +30,8 @@ spec:
values:
controllers:
main:
replicas: 2
strategy: RollingUpdate
annotations:
reloader.stakater.com/auto: "true"
containers:
Expand All @@ -53,6 +55,13 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: *app
service:
main:
ports:
Expand Down
53 changes: 28 additions & 25 deletions kubernetes/teyvat/apps/observability/loki/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,17 @@ spec:
store: memberlist
analytics:
reporting_enabled: false
gateway:
write:
replicas: 2
image:
registry: ghcr.io
ingress:
enabled: true
ingressClassName: internal
hosts:
- host: &host "{{ .Release.Name }}.${SECRET_DOMAIN}"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host
persistence:
storageClass: local-hostpath
affinity: &affinity |
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
read:
replicas: 2
persistence:
Expand All @@ -150,10 +146,7 @@ spec:
extraVolumes:
- name: rules
emptyDir: {}
write:
replicas: 2
persistence:
storageClass: local-hostpath
affinity: *affinity
backend:
replicas: 2
persistence:
Expand All @@ -169,6 +162,23 @@ spec:
name: loki-alerting-rules
- name: scratch
emptyDir: {}
affinity: *affinity
gateway:
replicas: 2
image:
registry: ghcr.io
affinity: *affinity
ingress:
enabled: true
ingressClassName: internal
hosts:
- host: &host "{{ .Release.Name }}.${SECRET_DOMAIN}"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host
monitoring:
dashboards:
annotations:
Expand All @@ -188,10 +198,3 @@ spec:
repository: ghcr.io/kiwigrid/k8s-sidecar
test:
enabled: false
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
19 changes: 12 additions & 7 deletions kubernetes/teyvat/apps/observability/thanos/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ spec:
extraTls:
- hosts:
- *host
affinity: &affinity
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
query:
enabled: true
replicaCount: 2
Expand All @@ -79,9 +86,11 @@ spec:
sidecarsService: kube-prometheus-stack-thanos-discovery
sidecarsNamespace: observability
stores: ["thanos-svc.${PI_DOMAIN}:10901"] #["${SVC_PI_THANOS_ADDR}:10901"]
affinity: *affinity
bucketweb:
enabled: true
replicaCount: 2
affinity: *affinity
compactor:
enabled: true
extraFlags:
Expand All @@ -94,13 +103,15 @@ spec:
enabled: true
storageClass: local-hostpath
size: 10Gi
affinity: *affinity
storegateway:
enabled: true
replicaCount: 2
persistence:
enabled: true
storageClass: local-hostpath
size: 10Gi
affinity: *affinity
ruler:
enabled: true
replicaCount: 2
Expand All @@ -122,14 +133,8 @@ spec:
enabled: true
storageClass: local-hostpath
size: 10Gi
affinity: *affinity
metrics:
enabled: true
serviceMonitor:
enabled: true
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ spec:
envFrom:
- secretRef:
name: unifi-poller-credentials
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
service:
main:
ports:
Expand All @@ -54,10 +62,3 @@ spec:
path: /metrics
interval: 2m
scrapeTimeout: 30s
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ spec:
tag: 0.35.0-debian@sha256:d6dd5660c3a28fc7266b5202b5386d109bb635c2c456a1f1c87d01b25fc6dcb5
args: ["--config", "/etc/vector/vector.yaml"]
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
Expand Down Expand Up @@ -87,10 +94,3 @@ spec:
type: emptyDir
globalMounts:
- path: /usr/share/GeoIP
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists

0 comments on commit 2e70446

Please sign in to comment.