File tree Expand file tree Collapse file tree 3 files changed +63
-1
lines changed
kubearchive/production/kflux-prd-rh03
vector-kubearchive-log-collector/production/kflux-prd-rh03 Expand file tree Collapse file tree 3 files changed +63
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : external-secrets.io/v1beta1
3+ kind : ExternalSecret
4+ metadata :
5+ name : kubearchive-logging
6+ namespace : product-kubearchive
7+ annotations :
8+ argocd.argoproj.io/sync-options : SkipDryRunOnMissingResource=true
9+ argocd.argoproj.io/sync-wave : " -1"
10+ spec :
11+ dataFrom :
12+ - extract :
13+ key : production/kubearchive/logging
14+ refreshInterval : 1h
15+ secretStoreRef :
16+ kind : ClusterSecretStore
17+ name : appsre-stonesoup-vault
18+ target :
19+ creationPolicy : Owner
20+ deletionPolicy : Delete
21+ name : kubearchive-logging
22+ template :
23+ metadata :
24+ annotations :
25+ argocd.argoproj.io/sync-options : Prune=false
26+ argocd.argoproj.io/compare-options : IgnoreExtraneous
Original file line number Diff line number Diff line change @@ -4,11 +4,47 @@ kind: Kustomization
44resources :
55 - ../../base
66 - ../base
7+ - external-secret.yaml
78 - kubearchive.yaml
89
910namespace : product-kubearchive
1011
12+ # Generate kubearchive-logging ConfigMap with hash for automatic restarts
13+ # Due to quoting limitations of generators we need to introduce the values with the |
14+ # See https://github.com/kubernetes-sigs/kustomize/issues/4845#issuecomment-1671570428
15+ configMapGenerator :
16+ - name : kubearchive-logging
17+ literals :
18+ - |
19+ POD_ID=cel:metadata.uid
20+ - |
21+ NAMESPACE=cel:metadata.namespace
22+ - |
23+ START=cel:status.?startTime == optional.none() ? int(now()-duration('1h'))*1000000000: status.startTime
24+ - |
25+ END=cel:status.?startTime == optional.none() ? int(now()+duration('1h'))*1000000000: int(timestamp(status.startTime)+duration('6h'))*1000000000
26+ - |
27+ LOG_URL=http://loki-gateway.product-kubearchive-logging.svc.cluster.local:80/loki/api/v1/query_range?query=%7Bstream%3D%22{NAMESPACE}%22%7D%20%7C%20pod_id%20%3D%20%60{POD_ID}%60%20%7C%20container%20%3D%20%60{CONTAINER_NAME}%60&start={START}&end={END}&direction=forward
28+ - |
29+ LOG_URL_JSONPATH=$.data.result[*].values[*][1]
30+
1131patches :
32+ - patch : |-
33+ $patch: delete
34+ apiVersion: v1
35+ kind: ConfigMap
36+ metadata:
37+ name: kubearchive-logging
38+ namespace: kubearchive
39+
40+ - patch : |-
41+ $patch: delete
42+ apiVersion: v1
43+ kind: Secret
44+ metadata:
45+ name: kubearchive-logging
46+ namespace: kubearchive
47+
1248 - patch : |-
1349 apiVersion: batch/v1
1450 kind: Job
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ valuesInline:
1616 create : true
1717 name : loki-sa
1818 annotations :
19- eks.amazonaws.com/role-arn : " arn:aws:iam::310587744735 :role/kflux-prd-rh03-loki-storage-role"
19+ eks.amazonaws.com/role-arn : " arn:aws:iam::593793029194 :role/kflux-prd-rh03-loki-storage-role"
2020 loki :
2121 storage :
2222 bucketNames :
You can’t perform that action at this time.
0 commit comments