phlare
phlare copied to clipboard
[helm] values inheritance from top level configuration
Is your feature request related to a problem? Please describe.
In current helm chart, if you setup phlare in microservices mode, you need to describe resources fully. Ie, in my setup, i want to define:
securityContext podSecurityContext nodeSelector
and so on.
In current setup, i need to do it every time for each component, ie:
components:
querier:
kind: Deployment
replicaCount: 2
resources:
limits:
memory: 1Gi
requests:
memory: 128Mi
cpu: 100m
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
podSecurityContext:
fsGroup: 1000
nodeSelector:
node-role.kubernetes.io/worker: "true"
distributor:
kind: Deployment
replicaCount: 2
resources:
limits:
memory: 1Gi
requests:
memory: 128Mi
cpu: 100m
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
podSecurityContext:
fsGroup: 1000
nodeSelector:
node-role.kubernetes.io/worker: "true"
Which is pretty redundant
Describe the solution you'd like
Inherit those values from root-level values by default: https://github.com/grafana/phlare/blob/main/operations/phlare/helm/phlare/values.yaml#L43
That way it eliminates alot of redundant stuff in helm release.
I think we already do that, can you double check if I am getting this right, but this should do what I think you want:
phlare:
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
podSecurityContext:
fsGroup: 1000
nodeSelector:
node-role.kubernetes.io/worker: "true"
components:
querier:
kind: Deployment
replicaCount: 3
resources:
limits:
memory: 1Gi
requests:
memory: 256Mi
cpu: 100m
distributor:
kind: Deployment
replicaCount: 2
resources:
limits:
memory: 1Gi
requests:
memory: 256Mi
cpu: 500m
agent:
kind: Deployment
replicaCount: 1
resources:
limits:
memory: 512Mi
requests:
memory: 128Mi
cpu: 50m
ingester:
kind: StatefulSet
replicaCount: 3
resources:
limits:
memory: 12Gi
requests:
memory: 6Gi
cpu: 1
Yeah, i missed phlare: part Works great, thanks!