Compare commits

...

19 commits

Author SHA1 Message Date
779df9fb9c Merge pull request 'openbao_logs_second_way' (#16) from openbao_logs_second_way into shipping_openbao_logs
Reviewed-on: #16
2025-03-18 09:17:40 +00:00
e993c274b0 runAsUser: 1000 # Run as non-root user
fsGroup: 1000
2025-03-17 15:41:18 +01:00
46072b8f81 runAsUser: 0 2025-03-17 15:34:43 +01:00
8617e200ea securityContext:
runAsUser: 1000
        fsGroup: 1000
2025-03-17 15:30:50 +01:00
c30cf9f380 /tmp/alloy/data 2025-03-17 15:26:17 +01:00
872c9dc8e5 volumes:
- name: alloy-data
      emptyDir: {}
2025-03-17 15:13:12 +01:00
27dc5966e9 # args:
#    - --config.file=/etc/alloy/config.yaml
2025-03-17 15:05:10 +01:00
aeca6100f5 /etc/alloy/config.yaml 2025-03-17 14:49:33 +01:00
4e673f674d extraVolumes deprecated 2025-03-17 14:37:58 +01:00
be1c3cee7a test 2025-03-17 14:31:26 +01:00
f0632db48b extraContainers:
- name: grafana-alloy
     image: grafana/alloy:latest
     ports:
       - containerPort: 12345
     volumeMounts:
       - name: sidecar-container-alloy-config
         mountPath: /etc/alloy
         subPath: config.yaml
     args:
       - --config.file=/etc/alloy/config.yaml
2025-03-17 14:23:11 +01:00
7b77d870c6 extraVolumes:
- name: sidecar-container-alloy-config
      configMap:
        name: sidecar-container-alloy-config
2025-03-17 14:17:13 +01:00
deaed1bdcc path: "stacks/ref-implementation/openbao-alloy-configmap" 2025-03-17 14:12:18 +01:00
2890437647 ref-implementation/openbao/sidecar-container-alloy-configmap 2025-03-17 14:07:43 +01:00
f873cd8aef new directory for the configmap 2025-03-17 14:00:05 +01:00
3eec895f67 test 2025-03-17 13:46:53 +01:00
4b553dd258 config map separately 2025-03-17 13:31:43 +01:00
f1d940561d adjustment of openbao.ymal 2025-03-17 13:15:47 +01:00
e2ad485759 sidecar container added 2025-03-17 12:55:46 +01:00
3 changed files with 89 additions and 1 deletions

View file

@ -0,0 +1,29 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: openbao-alloy-configmap
namespace: argocd
labels:
env: dev
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
targetRevision: HEAD
path: "stacks/ref-implementation/openbao-alloy-configmap"
destination:
server: "https://kubernetes.default.svc"
namespace: openbao
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
retry:
limit: -1
backoff:
duration: 15s
factor: 1
maxDuration: 15s

View file

@ -0,0 +1,32 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: sidecar-container-alloy-config
data:
config.yaml: |
logging {
level = "info"
format = "logfmt"
}
loki.write "local_loki" {
endpoint {
url = "http://loki-loki-distributed-gateway/loki/api/v1/push"
}
}
discovery.kubernetes "pod" {
role = "pod"
}
discovery.relabel "openbao_pod_logs" {
targets = discovery.kubernetes.pod.targets
rule {
source_labels = ["__meta_kubernetes_pod_name"]
action = "keep"
regex = "openbao-0"
}
forward_to = [loki.write.local_loki.receiver]
}

View file

@ -1,4 +1,31 @@
server:
extraContainers:
- name: grafana-alloy
image: grafana/alloy:latest
ports:
- containerPort: 12345
# volumeMounts:
# - name: sidecar-container-alloy-config
# mountPath: /etc/alloy/config.yaml
# subPath: config.yaml
# args:
# - --config.file=/etc/alloy/config.yaml
volumeMounts:
- name: alloy-data
mountPath: /var/lib/alloy/data
securityContext:
runAsUser: 1000
fsGroup: 1000
volumes:
- name: alloy-data
emptyDir: {}
# volumes:
# - name: sidecar-container-alloy-config
# configMap:
# name: sidecar-container-alloy-config
postStart:
- sh
- -c
@ -16,4 +43,4 @@ server:
bao audit enable file file_path=stdout
rm /tmp/init.txt
ui:
enabled: true
enabled: true