Skip to content

Unable to override TLS_DIR using .spec.env #745

@kabicin

Description

@kabicin

Bug Report

What did you do?

Setting a custom directory for TLS_DIR will cause a duplicate definition in the Pod that favours the default /etc/x509/certs instead of /other/directory.

spec:
  env:
    - name: TLS_DIR
       value: /other/directory

What did you expect to see?

Setting a custom directory for TLS_DIR should set it to /other/directory.

What did you see instead?

Pod shows TLS_DIR as /etc/x509/certs

Possible solution

This line should be ignored when appContainer.Env already contains TLS_DIR

appContainer.Env = append(appContainer.Env, corev1.EnvVar{Name: "TLS_DIR", Value: "/etc/x509/certs"})
.
The change will also involve passing the env value here
MountPath: "/etc/x509/certs",

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions