Skip to content

Commit

Permalink
environment variables in the configuration with default value
Browse files Browse the repository at this point in the history
Signed-off-by: Weifeng Wang <[email protected]>
  • Loading branch information
qclaogui committed Feb 28, 2024
1 parent 24e85f5 commit 2fa8fe9
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ storage:
backend: s3
s3:
bucket_name: pyroscope-data
# endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:minio:9000}
# access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:lgtmp}
# secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:supersecret}
# insecure: ${PYROSCOPE_STORAGE_S3_INSECURE:true}
endpoint: minio:9000
access_key_id: lgtmp
secret_access_key: supersecret
insecure: true
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:-minio:9000}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:-lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:-supersecret}
insecure: ${PYROSCOPE_STORAGE_S3_INSECURE:-true}
http:
insecure_skip_verify: true
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ storage:
backend: s3
s3:
bucket_name: pyroscope-data
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:minio:9000}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:supersecret}
insecure: ${PYROSCOPE_STORAGE_S3_INSECURE:true}
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:-minio:9000}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:-lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:-supersecret}
insecure: ${PYROSCOPE_STORAGE_S3_INSECURE:-true}
http:
insecure_skip_verify: true

5 changes: 0 additions & 5 deletions docker-compose/monolithic-mode/profiles/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ services:
image: grafana/pyroscope:1.4.0
volumes:
- ../../common/config/pyroscope/monolithic-mode-profiles.yaml:/etc/config.yaml
environment:
- PYROSCOPE_STORAGE_S3_ENDPOINT=minio:9000
- PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID=lgtmp
- PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY=supersecret
- PYROSCOPE_STORAGE_S3_INSECURE=true
command:
- -config.file=/etc/config.yaml
- -target=all
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/microservices-mode/profiles/configs/pyroscope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ storage:
backend: s3
s3:
bucket_name: pyroscope-data
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:minio.minio-system.svc.cluster.local:443}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:supersecret}
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:-minio.minio-system.svc.cluster.local:443}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:-lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:-supersecret}
insecure: false
http:
insecure_skip_verify: true
24 changes: 11 additions & 13 deletions kubernetes/microservices-mode/profiles/k8s-all-in-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ data:
backend: s3
s3:
bucket_name: pyroscope-data
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:minio.minio-system.svc.cluster.local:443}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:supersecret}
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:-minio.minio-system.svc.cluster.local:443}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:-lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:-supersecret}
insecure: false
http:
insecure_skip_verify: true
Expand Down Expand Up @@ -173,12 +173,10 @@ metadata:
---
apiVersion: v1
data:
PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID: bGd0bXA=
PYROSCOPE_STORAGE_S3_ENDPOINT: bWluaW8ubWluaW8tc3lzdGVtLnN2Yy5jbHVzdGVyLmxvY2FsOjQ0Mw==
PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY: VkQ1MzhPWXhTRWlHRDRJOW1tRmZxRk1DR3ExdklpR20=
kind: Secret
metadata:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
namespace: profiles-system
type: Opaque
---
Expand Down Expand Up @@ -598,7 +596,7 @@ spec:
- -store-gateway.sharding-ring.replication-factor=3
envFrom:
- secretRef:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
image: grafana/pyroscope:1.3.0
imagePullPolicy: IfNotPresent
name: distributor
Expand Down Expand Up @@ -689,7 +687,7 @@ spec:
- -store-gateway.sharding-ring.replication-factor=3
envFrom:
- secretRef:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
image: grafana/pyroscope:1.3.0
imagePullPolicy: IfNotPresent
name: querier
Expand Down Expand Up @@ -780,7 +778,7 @@ spec:
- -store-gateway.sharding-ring.replication-factor=3
envFrom:
- secretRef:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
image: grafana/pyroscope:1.3.0
imagePullPolicy: IfNotPresent
name: query-frontend
Expand Down Expand Up @@ -871,7 +869,7 @@ spec:
- -store-gateway.sharding-ring.replication-factor=3
envFrom:
- secretRef:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
image: grafana/pyroscope:1.3.0
imagePullPolicy: IfNotPresent
name: query-scheduler
Expand Down Expand Up @@ -964,7 +962,7 @@ spec:
- -store-gateway.sharding-ring.replication-factor=3
envFrom:
- secretRef:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
image: grafana/pyroscope:1.3.0
imagePullPolicy: IfNotPresent
name: compactor
Expand Down Expand Up @@ -1061,7 +1059,7 @@ spec:
- -store-gateway.sharding-ring.replication-factor=3
envFrom:
- secretRef:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
image: grafana/pyroscope:1.3.0
imagePullPolicy: IfNotPresent
name: ingester
Expand Down Expand Up @@ -1155,7 +1153,7 @@ spec:
- -store-gateway.sharding-ring.replication-factor=3
envFrom:
- secretRef:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
image: grafana/pyroscope:1.3.0
imagePullPolicy: IfNotPresent
name: store-gateway
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/microservices-mode/profiles/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ secretGenerator:
- name: pyroscope-env
namespace: profiles-system
literals:
- PYROSCOPE_STORAGE_S3_ENDPOINT=minio.minio-system.svc.cluster.local:443
- PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID=lgtmp
- PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY=VD538OYxSEiGD4I9mmFfqFMCGq1vIiGm


Expand Down
8 changes: 4 additions & 4 deletions kubernetes/monolithic-mode/profiles/configs/pyroscope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ storage:
backend: s3
s3:
bucket_name: pyroscope-data
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:minio.minio-system.svc:443}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:supersecret}
insecure: ${PYROSCOPE_STORAGE_S3_INSECURE:false}
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:-minio.minio-system.svc:443}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:-lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:-supersecret}
insecure: ${PYROSCOPE_STORAGE_S3_INSECURE:-false}
http:
insecure_skip_verify: true
14 changes: 6 additions & 8 deletions kubernetes/monolithic-mode/profiles/k8s-all-in-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ data:
backend: s3
s3:
bucket_name: pyroscope-data
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:minio.minio-system.svc:443}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:supersecret}
insecure: ${PYROSCOPE_STORAGE_S3_INSECURE:false}
endpoint: ${PYROSCOPE_STORAGE_S3_ENDPOINT:-minio.minio-system.svc:443}
access_key_id: ${PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID:-lgtmp}
secret_access_key: ${PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY:-supersecret}
insecure: ${PYROSCOPE_STORAGE_S3_INSECURE:-false}
http:
insecure_skip_verify: true
kind: ConfigMap
Expand Down Expand Up @@ -159,12 +159,10 @@ metadata:
---
apiVersion: v1
data:
PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID: bGd0bXA=
PYROSCOPE_STORAGE_S3_ENDPOINT: bWluaW8ubWluaW8tc3lzdGVtLnN2Yy5jbHVzdGVyLmxvY2FsOjQ0Mw==
PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY: VkQ1MzhPWXhTRWlHRDRJOW1tRmZxRk1DR3ExdklpR20=
kind: Secret
metadata:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
namespace: profiles-system
type: Opaque
---
Expand Down Expand Up @@ -291,7 +289,7 @@ spec:
- -log.level=debug
envFrom:
- secretRef:
name: pyroscope-env-tgk2kdt8mh
name: pyroscope-env-h982fgc652
image: grafana/pyroscope:1.3.0
imagePullPolicy: IfNotPresent
name: pyroscope
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/monolithic-mode/profiles/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ secretGenerator:
- name: pyroscope-env
namespace: profiles-system
literals:
- PYROSCOPE_STORAGE_S3_ENDPOINT=minio.minio-system.svc.cluster.local:443
- PYROSCOPE_STORAGE_S3_ACCESS_KEY_ID=lgtmp
- PYROSCOPE_STORAGE_S3_SECRET_ACCESS_KEY=VD538OYxSEiGD4I9mmFfqFMCGq1vIiGm

configMapGenerator:
Expand Down

0 comments on commit 2fa8fe9

Please sign in to comment.