Skip to content

Commit

Permalink
Add extraEnvFrom explicitly to those options that ignore the global s…
Browse files Browse the repository at this point in the history
…etting
  • Loading branch information
HappyTetrahedron committed Sep 20, 2024
1 parent 2e4fd3e commit 7c91123
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 6 deletions.
17 changes: 17 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ parameters:
endpoint: \${S3_ENDPOINT}
secretAccessKey: \${S3_SECRET_ACCESS_KEY}
accessKeyId: \${S3_ACCESS_KEY_ID}
s3ForcePathStyle: true

podSecurityContext:
fsGroup: null
Expand All @@ -87,6 +88,9 @@ parameters:
deploymentMode: SimpleScalable

backend:
extraEnvFrom:
- secretRef:
name: loki-bucket-secret
extraArgs:
- '-config.expand-env=true'
nodeSelector: ${loki:globalNodeSelector}
Expand All @@ -99,6 +103,9 @@ parameters:
cpu: 0.5
memory: 1Gi
read:
extraEnvFrom:
- secretRef:
name: loki-bucket-secret
extraArgs:
- '-config.expand-env=true'
nodeSelector: ${loki:globalNodeSelector}
Expand All @@ -111,6 +118,9 @@ parameters:
cpu: 1
memory: 3Gi
write:
extraEnvFrom:
- secretRef:
name: loki-bucket-secret
extraArgs:
- '-config.expand-env=true'
nodeSelector: ${loki:globalNodeSelector}
Expand Down Expand Up @@ -160,6 +170,11 @@ parameters:
nodeSelector: ${loki:globalNodeSelector}
replicas: 0
gateway:
extraEnvFrom:
- secretRef:
name: loki-bucket-secret
extraArgs:
- '-config.expand-env=true'
nodeSelector: ${loki:globalNodeSelector}
replicas: 2

Expand All @@ -170,6 +185,8 @@ parameters:
extraEnvFrom:
- secretRef:
name: loki-bucket-secret
extraArgs:
- '-config.expand-env=true'
dnsService: dns-default
dnsNamespace: openshift-dns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 7d0ae1d009ee1eb3f732e47396ab769f149cace0bd00d72b9ba754f28c3bede4
checksum/config: f75dace34ca1a3d7ac1dc1dacbe31a8fba51ccc104b73c6528308b9781a2ad11
labels:
app.kubernetes.io/component: backend
app.kubernetes.io/instance: loki
Expand Down Expand Up @@ -69,6 +69,9 @@ spec:
- -target=backend
- -legacy-read-mode=false
- -config.expand-env=true
envFrom:
- secretRef:
name: loki-bucket-secret
image: docker.io/grafana/loki:3.1.1
imagePullPolicy: IfNotPresent
name: loki
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data:
bucketnames: loki-chunks
endpoint: ${S3_ENDPOINT}
insecure: false
s3forcepathstyle: false
s3forcepathstyle: true
secret_access_key: ${S3_SECRET_ACCESS_KEY}
frontend:
scheduler_address: ""
Expand Down Expand Up @@ -76,7 +76,7 @@ data:
bucketnames: loki-ruler
endpoint: ${S3_ENDPOINT}
insecure: false
s3forcepathstyle: false
s3forcepathstyle: true
secret_access_key: ${S3_SECRET_ACCESS_KEY}
type: s3
runtime_config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ spec:
app.kubernetes.io/component: gateway
topologyKey: kubernetes.io/hostname
containers:
- image: docker.io/nginxinc/nginx-unprivileged:1.27-alpine
- envFrom:
- secretRef:
name: loki-bucket-secret
image: docker.io/nginxinc/nginx-unprivileged:1.27-alpine
imagePullPolicy: IfNotPresent
name: nginx
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 7d0ae1d009ee1eb3f732e47396ab769f149cace0bd00d72b9ba754f28c3bede4
checksum/config: f75dace34ca1a3d7ac1dc1dacbe31a8fba51ccc104b73c6528308b9781a2ad11
labels:
app.kubernetes.io/component: read
app.kubernetes.io/instance: loki
Expand All @@ -48,6 +48,9 @@ spec:
- -legacy-read-mode=false
- -common.compactor-grpc-address=loki-backend.syn-loki.svc.cluster.local:9095
- -config.expand-env=true
envFrom:
- secretRef:
name: loki-bucket-secret
image: docker.io/grafana/loki:3.1.1
imagePullPolicy: IfNotPresent
name: loki
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 7d0ae1d009ee1eb3f732e47396ab769f149cace0bd00d72b9ba754f28c3bede4
checksum/config: f75dace34ca1a3d7ac1dc1dacbe31a8fba51ccc104b73c6528308b9781a2ad11
labels:
app.kubernetes.io/component: write
app.kubernetes.io/instance: loki
Expand All @@ -44,6 +44,9 @@ spec:
- -config.file=/etc/loki/config/config.yaml
- -target=write
- -config.expand-env=true
envFrom:
- secretRef:
name: loki-bucket-secret
image: docker.io/grafana/loki:3.1.1
imagePullPolicy: IfNotPresent
name: loki
Expand Down

0 comments on commit 7c91123

Please sign in to comment.