Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
fix: Make K8S_NAMESPACE and K8S_NODE_NAME configureable for cp-connector
Browse files Browse the repository at this point in the history
  • Loading branch information
heckelmann committed Jul 12, 2022
1 parent 91f6140 commit 72629b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,23 @@ spec:
apiVersion: v1
fieldPath: 'metadata.labels[''app.kubernetes.io/component'']'
- name: K8S_NAMESPACE
{{- if .Values.distributor.metadata.namespace }}
value: {{ .Values.distributor.metadata.namespace }}
{{- else }}
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
{{- end }}
- name: K8S_NODE_NAME
{{- if .Values.distributor.metadata.hostname }}
value: {{ .Values.distributor.metadata.hostname }}
{{- else }}
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
{{- end }}
- name: K8S_POD_NAME
valueFrom:
fieldRef:
Expand Down
5 changes: 5 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ securityContext: # Set the security context (e.g. ru
seccompProfile:
type: RuntimeDefault

distributor:
metadata:
hostname: "" # Sets the hostname sent by the distributor to the control-plane
namespace: "" # Sets the namespace sent by the distributor to the control-plane

resources: # Set resources limits and requests
limits:
cpu: 128m
Expand Down

0 comments on commit 72629b5

Please sign in to comment.