Skip to content

Commit

Permalink
Create envvar only if mountPath is set in values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
biancaburtoiu committed Mar 15, 2022
1 parent 91728aa commit 4e17bb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cost-analyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Parameter | Description | Default
`serviceAccount.create` | Set this to `false` if you want to create the service account `kubecost-cost-analyzer` on your own | `true`
`tolerations` | node taints to tolerate | `[]`
`affinity` | pod affinity | `{}`
`kubecostProductConfigs.productKey.mountPath` | Set the path at which the product key secret is mounted (eg. by a secrets provisioner) | `"/var/configs/productkey/productkey.json"`
`kubecostProductConfigs.productKey.mountPath` | Use instead of `kubecostProductConfigs.productKey.secretname` to declare the path at which the product key file is mounted (eg. by a secrets provisioner) | `N/A`
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ spec:
{{- else }}
value: production
{{- end }}
{{- if .Values.kubecostProductConfigs.productKey }}
{{- if .Values.kubecostProductConfigs.productKey.mountPath }}
- name: PRODUCT_KEY_MOUNT_PATH
value: {{ .Values.kubecostProductConfigs.productKey.mountPath | default "/var/configs/productkey/productkey.json" }}
value: {{ .Values.kubecostProductConfigs.productKey.mountPath }}
{{- end }}
- name: REMOTE_WRITE_PASSWORD
value: {{ .Values.remoteWrite.postgres.auth.password }}
Expand Down
2 changes: 1 addition & 1 deletion cost-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -779,5 +779,5 @@ awsstore:
# key: ""
# enabled: false
# secretname: productkeysecret # create a secret out of a file named productkey.json of format { "key": "kc-b1325234" }
# mountPath: "/var/configs/productkey/productkey.json" # set the path at which the secret is mounted (eg. by a secrets provisioner)
# mountPath: "/some/custom/path/productkey.json" # declare the path at which the product key file is mounted (eg. by a secrets provisioner). The file must be of format { "key": "kc-b1325234" }
# cloudIntegrationSecret: "cloud-integration"

0 comments on commit 4e17bb6

Please sign in to comment.