Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifactory HA broken on 7.84.10 release #1883

Closed
jandersen-plaid opened this issue May 15, 2024 · 3 comments
Closed

Artifactory HA broken on 7.84.10 release #1883

jandersen-plaid opened this issue May 15, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@jandersen-plaid
Copy link

Is this a request for help?: No.


Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Version of Helm and Kubernetes:
Helm: 3.14.4
Kubernetes: 1.25.16

Which chart:
artifactory-ha

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

JFrog support reference (if already raised with support team):
N/A

What happened:
The helm templating is broken in release 7.84.10 because the template logic tries to reference .Values within a loop without using the global scope $:

{{- range .Values.artifactory.loggers }}
- name: {{ . | replace "_" "-" | replace "." "-" }}
image: {{ include "artifactory-ha.getImageInfoByValue" (list $ "initContainers") }}
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
{{- if $.Values.containerSecurityContext.enabled }}
securityContext: {{- omit $.Values.containerSecurityContext "enabled" | toYaml | nindent 10 }}
{{- end }}
command:
- 'sh'
- '-c'
- 'sh /scripts/tail-log.sh {{ $mountPath }}/log {{ . }}'
volumeMounts:
- name: volume
mountPath: {{ $mountPath }}
- name: tail-logger-script
mountPath: /scripts/tail-log.sh
subPath: tail-log.sh
resources:
{{ toYaml $.Values.artifactory.loggersResources | indent 10 }}
{{- end }}

There is a bug there where {{ .Values.artifactory.image.pullPolicy }} should be {{ $.Values.artifactory.image.pullPolicy }} so that it uses the global scope.

Specifically, we receive the error:

Error: template: artifactory-ha/templates/artifactory-primary-statefulset.yaml:1140:35: executing "artifactory-ha/templates/artifactory-primary-statefulset.yaml" at <.Values.artifactory.image.pullPolicy>: can't evaluate field Values in type interface {}

Use --debug flag to render out invalid YAML

What you expected to happen:
We expected the helm chart to render successfully when loggers are set.

How to reproduce it (as minimally and precisely as possible):
To reproduce, you need to have .Values.artifactory.loggers set and run helm template with those values:

artifactory:
  loggers: 
  - access-service.log
  - artifactory-binarystore.log
  - artifactory-event.log
  - artifactory-import-export.log
  - event-service.log
  - frontend-request.log
  - frontend-service.log
  - integration-service.log
  - metadata-request.log
  - metadata-service.log
  - router-request.log
  - router-service.log

Anything else we need to know: N/A

@chukka chukka added the bug Something isn't working label May 16, 2024
@chukka
Copy link
Collaborator

chukka commented May 16, 2024

@jandersen-plaid Thanks for reporting ! we have internally fixed it and waiting for release

@chukka
Copy link
Collaborator

chukka commented May 17, 2024

@jandersen-plaid Please try 107.84.11 chart for the fix and share feedback

@vronnG
Copy link

vronnG commented May 17, 2024

Was getting the same issue, but resolved after using chart version 107.84.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants