Skip to content

Commit 43833dc

Browse files
authored
Add kubearchive-logging to staging (#7599)
Signed-off-by: Marta Anon <[email protected]>
1 parent b49ab52 commit 43833dc

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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: staging/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
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- ../../development
6+
- external-secret.yaml
7+
8+
patches:
9+
- patch: |-
10+
apiVersion: v1
11+
kind: ConfigMap
12+
metadata:
13+
name: kubearchive-logging
14+
namespace: product-kubearchive
15+
data:
16+
POD_ID: "cel:metadata.uid"
17+
START: "cel:status.?startTime == optional.none() ? int(now()-duration('1h'))*1000000000: status.startTime"
18+
END: "cel:status.?startTime == optional.none() ? int(now()+duration('1h'))*1000000000: int(timestamp(status.startTime)+duration('6h'))*1000000000" # temporary workaround until CONTAINER_NAME is allowed on CEL expressions as variable: 6 hours since the container started
19+
LOG_URL: "http://loki-headless.product-kubearchive-logging.svc.cluster.local:3100/loki/api/v1/query_range?query=%7Bpod_id%3D%22{POD_ID}%22%2C%20container%3D%22{CONTAINER_NAME}%22%7D%20%7C%20json%20%7C%20line_format%20%22%7B%7B.message%7D%7D%22&start={START}&end={END}&direction=forward"
20+
LOG_URL_JSONPATH: "$.data.result[*].values[*][1]"

components/kubearchive/staging/stone-stg-rh01/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
resources:
5-
- ../../development
5+
- ../base
66
- kubearchive-routes.yaml
77
- database-secret.yaml
88

0 commit comments

Comments
 (0)