Skip to content

Commit

Permalink
feat: Update promtail configuration for GKE Autopilot clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Jul 27, 2024
1 parent 268131d commit 8b2da28
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 35 deletions.
2 changes: 1 addition & 1 deletion application_set.tf
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ resource "argocd_application_set" "promtail-gke-autopilot" {
selector {
match_labels = {
"argocd.argoproj.io/secret-type" = "cluster"
"cluster-type" = "gke-autopilot"
"cluster-type" = "gke-autopilot"
}
}
}
Expand Down
19 changes: 4 additions & 15 deletions loki/ops/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,9 @@ resources:
- ../base

helmCharts:
- name: promtail
releaseName: promtail
- name: loki
releaseName: loki
namespace: guardian
repo: https://grafana.github.io/helm-charts
version: 6.15.x
valuesInline:
serviceMonitor:
enabled: true
tolerations:
- operator: Exists
effect: NoSchedule
# - name: loki
# releaseName: loki
# namespace: guardian
# repo: https://grafana.github.io/helm-charts
# version: x.x.x
# valuesFile: values.yaml
version: x.x.x
valuesFile: values.yaml
12 changes: 6 additions & 6 deletions loki/ops/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ loki:
storage:
type: gcs
bucketNames:
chunks: nsl-loki-uscentral1-prod
ruler: nsl-loki-uscentral1-prod
admin: nsl-loki-uscentral1-prod
chunks: nsl-loki-uscentral1-ops
ruler: nsl-loki-uscentral1-ops
admin: nsl-loki-uscentral1-ops
gcs:
bucket_name: nsl-loki-uscentral1-prod
bucket_name: nsl-loki-uscentral1-ops
server:
grpc_server_max_recv_msg_size: 16777216
grpc_server_max_send_msg_size: 16777216
Expand All @@ -23,7 +23,7 @@ loki:
cache_location: /var/loki/index_cache
cache_ttl: 24h
gcs:
bucket_name: nsl-loki-uscentral1-prod
bucket_name: nsl-loki-uscentral1-ops
commonConfig:
replication_factor: 1
rulerConfig:
Expand Down Expand Up @@ -90,7 +90,7 @@ gateway:
type: LoadBalancer
annotations:
networking.gke.io/load-balancer-type: "Internal"
networking.gke.io/internal-load-balancer-subnet: "dev-loadbalancer"
networking.gke.io/internal-load-balancer-subnet: "prod-loadbalancer"
networking.gke.io/internal-load-balancer-allow-global-access: "true"
chunksCache:
# default is 500MB, with limited memory keep this smaller
Expand Down
15 changes: 2 additions & 13 deletions promtail/gke-autopilot/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,8 @@ helmCharts:
namespace: guardian
repo: https://grafana.github.io/helm-charts
version: x.x.x
valuesInline:
defaultVolumeMounts:
- name: pods
mountPath: /var/log/pods
readOnly: true
- name: run
mountPath: /run/promtail
defaultVolumes:
- name: pods
hostPath:
path: /var/log/pods
- name: run
emptyDir: { }
valuesFile: values.yaml

# - name: loki
# releaseName: loki
# namespace: guardian
Expand Down
23 changes: 23 additions & 0 deletions promtail/gke-autopilot/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- effect: NoSchedule
key: kubernetes.io/arch
operator: Equal
value: amd64
defaultVolumeMounts:
- name: pods
mountPath: /var/log/pods
readOnly: true
- name: run
mountPath: /run/promtail
defaultVolumes:
- name: pods
hostPath:
path: /var/log/pods
- name: run
emptyDir: { }

0 comments on commit 8b2da28

Please sign in to comment.