Update Loki from ceph bucket to minio
This commit is contained in:
parent
952e0f02b2
commit
e1a0a6e605
4 changed files with 39 additions and 23 deletions
28
kubernetes/apps/observability/loki/app/externalsecret.yaml
Normal file
28
kubernetes/apps/observability/loki/app/externalsecret.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://ks.hsn.dev/external-secrets.io/externalsecret_v1beta1.json
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: loki
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: onepassword-connect
|
||||||
|
target:
|
||||||
|
name: loki-secret
|
||||||
|
creationPolicy: Owner
|
||||||
|
template:
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
S3_BUCKET_HOST: s3.hsn.dev
|
||||||
|
S3_BUCKET_NAME: "{{ .minio_thanos_bucket_name }}"
|
||||||
|
S3_ACCESS_KEY: "{{ .minio_loki_access_key }}"
|
||||||
|
S3_SECRET_KEY: "{{ .minio_loki_secret_key }}"
|
||||||
|
S3_BUCKET_REGION: us-east-1
|
||||||
|
dataFrom:
|
||||||
|
- extract:
|
||||||
|
key: minio
|
||||||
|
rewrite:
|
||||||
|
- regexp:
|
||||||
|
source: "(.*)"
|
||||||
|
target: "minio_$1"
|
|
@ -26,39 +26,36 @@ spec:
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: openebs-cluster
|
- name: openebs-cluster
|
||||||
namespace: openebs-system
|
namespace: openebs-system
|
||||||
- name: rook-ceph-cluster
|
|
||||||
namespace: rook-ceph
|
|
||||||
- name: vector-agent
|
- name: vector-agent
|
||||||
namespace: observability
|
namespace: observability
|
||||||
- name: vector-aggregator
|
- name: vector-aggregator
|
||||||
namespace: observability
|
namespace: observability
|
||||||
valuesFrom:
|
valuesFrom:
|
||||||
- targetPath: loki.storage.bucketNames.chunks
|
- targetPath: loki.storage.bucketNames.chunks
|
||||||
kind: ConfigMap
|
kind: Secret
|
||||||
name: &cephBucket loki-bucket
|
name: loki-secret
|
||||||
valuesKey: BUCKET_NAME
|
valuesKey: BUCKET_NAME
|
||||||
- targetPath: loki.storage.s3.endpoint
|
- targetPath: loki.storage.s3.endpoint
|
||||||
kind: ConfigMap
|
kind: Secret
|
||||||
name: *cephBucket
|
name: loki-secret
|
||||||
valuesKey: BUCKET_HOST
|
valuesKey: BUCKET_HOST
|
||||||
- targetPath: loki.storage.s3.region
|
- targetPath: loki.storage.s3.region
|
||||||
kind: ConfigMap
|
kind: Secret
|
||||||
name: *cephBucket
|
name: loki-secret
|
||||||
valuesKey: BUCKET_REGION
|
valuesKey: BUCKET_REGION
|
||||||
- targetPath: loki.storage.s3.accessKeyId
|
- targetPath: loki.storage.s3.accessKeyId
|
||||||
kind: Secret
|
kind: Secret
|
||||||
name: *cephBucket
|
name: loki-secret
|
||||||
valuesKey: AWS_ACCESS_KEY_ID
|
valuesKey: AWS_ACCESS_KEY_ID
|
||||||
- targetPath: loki.storage.s3.secretAccessKey
|
- targetPath: loki.storage.s3.secretAccessKey
|
||||||
kind: Secret
|
kind: Secret
|
||||||
name: *cephBucket
|
name: loki-secret
|
||||||
valuesKey: AWS_SECRET_ACCESS_KEY
|
valuesKey: AWS_SECRET_ACCESS_KEY
|
||||||
values:
|
values:
|
||||||
deploymentMode: SimpleScalable
|
deploymentMode: SimpleScalable
|
||||||
loki:
|
loki:
|
||||||
podAnnotations:
|
podAnnotations:
|
||||||
configmap.reloader.stakater.com/reload: *cephBucket
|
secret.reloader.stakater.com/reload: loki-secret
|
||||||
secret.reloader.stakater.com/reload: *cephBucket
|
|
||||||
ingester:
|
ingester:
|
||||||
chunk_encoding: snappy
|
chunk_encoding: snappy
|
||||||
storage:
|
storage:
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- ./objectbucketclaim.yaml
|
- ./externalsecret.yaml
|
||||||
- ./helmrelease.yaml
|
- ./helmrelease.yaml
|
|
@ -1,9 +0,0 @@
|
||||||
---
|
|
||||||
# yaml-language-server: $schema=https://ks.hsn.dev/objectbucket.io/objectbucketclaim_v1alpha1.json
|
|
||||||
apiVersion: objectbucket.io/v1alpha1
|
|
||||||
kind: ObjectBucketClaim
|
|
||||||
metadata:
|
|
||||||
name: loki-bucket
|
|
||||||
spec:
|
|
||||||
bucketName: loki
|
|
||||||
storageClassName: ceph-bucket
|
|
Loading…
Reference in a new issue