Skip to content

Commit

Permalink
Replace LOGIN_DATACENTER login with LOGIN_NAMESPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
clly committed May 16, 2023
1 parent 7569be3 commit 3ce4755
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions charts/consul/templates/telemetry-collector-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,23 @@ spec:
{{- if .Values.global.acls.manageSystemACLs }}
- name: CONSUL_LOGIN_AUTH_METHOD
value: {{ template "consul.fullname" . }}-k8s-auth-method
- name: CONSUL_LOGIN_DATACENTER
{{- if and .Values.global.federation.enabled .Values.global.federation.primaryDatacenter }}
value: {{ .Values.global.federation.primaryDatacenter }}
{{- else }}
value: {{ .Values.global.datacenter }}
{{- end }}
- name: CONSUL_LOGIN_META
value: "component=consul-telemetry-collector,pod=$(NAMESPACE)/$(POD_NAME)"
{{- end }}
- name: CONSUL_NODE_NAME
value: $(NODE_NAME)-virtual
{{- include "consul.consulK8sConsulServerEnvVars" . | nindent 10 }}
{{- if .Values.global.enableConsulNamespaces }}
- name: CONSUL_NAMESPACE
value: {{ .Values.syncCatalog.consulNamespaces.consulDestinationNamespace }}
{{- if .Values.syncCatalog.consulNamespaces.mirroringK8S }}
- name: CONSUL_LOGIN_NAMESPACE
value: "default"
{{- else }}
- name: CONSUL_LOGIN_NAMESPACE
value: {{ .Values.syncCatalog.consulNamespaces.consulDestinationNamespace }}
{{- end }}
{{- end }}
command:
- /bin/sh
- -ec
Expand Down Expand Up @@ -258,11 +263,21 @@ spec:
- -credential-type=login
- -login-bearer-token-path=/var/run/secrets/kubernetes.io/serviceaccount/token
- -login-auth-method={{ template "consul.fullname" . }}-k8s-auth-method
{{- if .Values.global.enableConsulNamespaces }}
{{- if .Values.syncCatalog.consulNamespaces.mirroringK8S }}
- -login-namespace="default"
{{- else }}
- -login-namespace={{ .Values.syncCatalog.consulNamespaces.consulDestinationNamespace }}
{{- end }}
{{- end }}
{{- if .Values.global.adminPartitions.enabled }}
- foo
- -login-partition={{ .Values.global.adminPartitions.name }}
{{- end }}
{{- end }}
{{- if .Values.global.enableConsulNamespaces }}
- -service-namespace={{ .Values.syncCatalog.consulNamespaces.consulDestinationNamespace }}
{{- end }}
{{- if .Values.global.adminPartitions.enabled }}
- -service-partition={{ .Values.global.adminPartitions.name }}
{{- end }}
Expand Down

0 comments on commit 3ce4755

Please sign in to comment.