jfrog / charts

JFrog official Helm Charts
https://jfrog.com/integration/helm-repository/
Apache License 2.0
256 stars 447 forks source link

[artifactory] Helm Template Error when using artifactory.loggers #1791

Closed tegataiprime closed 1 year ago

tegataiprime commented 1 year ago

BUG REPORT

Version of Helm and Kubernetes: Helm : v3.12.0 K8S: v1.23

Which chart: jfrog/artifactory-ha

Which product license (Enterprise/Pro/oss): Enterprise

JFrog support reference (if already raised with support team): Case 258264

What happened: Using Chart v107.63.5, the following error message is given by helm...

Error: template: artifactory-ha/templates/artifactory-primary-statefulset.yaml:1128:20: executing "artifactory-ha/templates/artifactory-primary-statefulset.yaml" at <.Values.containerSecurityContext.enabled>: can't evaluate field Values in type interface {}

What you expected to happen: No error :-P

How to reproduce it (as minimally and precisely as possible): This occurs when additional loggers are defined in the values.yml file:

artifactory:
  loggers:
    - artifactory-request.log

Anything else we need to know: It looks like this is a scope issue. The reference to .Values.containerSecurityContext.enabled is made inside a range block. Anchoring this reference to the root context should fix it. e.g. $.Values.containerSecurityContext.enabled

kammathavaran commented 1 year ago

Looks like a regression issue with the latest version. Will be addressed ASAP.

eldada commented 1 year ago

I also recommend moving away from the old loggers side-car and use the example we have in https://github.com/jfrog/charts/tree/master/examples/artifactory/logging that covers all your logging needs with a single container.

tegataiprime commented 1 year ago

Thank you. Good advice. I am also going to look at moving away from jfrog/artifactory-ha over to jfrog/artifactory. We're using custom binary file store definitions and custom system settings to work around earlier issues with this chart, which I am sure have all been addressed by now 😄

eldada commented 1 year ago

It's a good idea to move to artifactory. The artifactory-ha architecture is old and less relevant.

tegataiprime commented 1 year ago

Ha! It feels like moving house. I need to tidy up and pack up my bagage before I move ;)

chukka commented 1 year ago

@tegataiprime this issue is fixed internally , will be released in upcoming patch releases (ETA ~ 2 weeks)