Skip to content

Commit

Permalink
Merge pull request #1756 from jfrog/jp-10.12.2
Browse files Browse the repository at this point in the history
[jfrog-platform] 10.12.2 release
  • Loading branch information
chukka authored May 3, 2023
2 parents 76f0a0a + bf993a1 commit 69da6ea
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 14 deletions.
8 changes: 8 additions & 0 deletions stable/jfrog-platform/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# JFrog Platform Chart Changelog (GA releases only)
All changes to this chart will be documented in this file.

## [10.12.2] - May 3, 2023
* Update dependency artifactory chart version to 107.55.10
* Update dependency xray chart version to 103.71.6
* Update dependency pipelines chart version to 101.37.3
* Update dependency insight chart version to 101.13.5
* Added pre-upgrade hook (`rabbitmq.migration.enabled` defaults to true) for rabbitmq upgrade from 3.8.x to 3.11.x
* Added extraEnvs variable `JF_SHARED_RABBITMQ_VHOST` for supporting non-default `xray` vhost in xray

## [10.12.1] - Mar 27, 2023
* Update dependency artifactory chart version to 107.55.9
* Update dependency distribution chart version to 102.17.0
Expand Down
12 changes: 6 additions & 6 deletions stable/jfrog-platform/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ dependencies:
version: 12.10.1
- name: artifactory
repository: https://charts.jfrog.io/
version: 107.55.9
version: 107.55.10
- name: xray
repository: https://charts.jfrog.io/
version: 103.69.3
version: 103.71.6
- name: distribution
repository: https://charts.jfrog.io/
version: 102.17.0
- name: insight
repository: https://charts.jfrog.io/
version: 101.13.4
version: 101.13.5
- name: pdn-server
repository: https://charts.jfrog.io/
version: 101.2.0
- name: pipelines
repository: https://charts.jfrog.io/
version: 101.35.3
digest: sha256:fd62901a84a5df67e1ac623369c97c2f64b3438641a379ceb7f13f2092a17117
generated: "2023-03-27T20:56:54.571261+05:30"
version: 101.37.3
digest: sha256:72265db722d63419eb1254ea63a19f9af16984ec48a630677d6ea7d1c6d6408e
generated: "2023-05-03T17:43:19.74218+05:30"
12 changes: 6 additions & 6 deletions stable/jfrog-platform/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 7.55.9
appVersion: 7.55.10
dependencies:
- condition: postgresql.enabled
name: postgresql
Expand All @@ -16,27 +16,27 @@ dependencies:
- condition: artifactory.enabled
name: artifactory
repository: https://charts.jfrog.io/
version: 107.55.9
version: 107.55.10
- condition: xray.enabled
name: xray
repository: https://charts.jfrog.io/
version: 103.69.3
version: 103.71.6
- condition: distribution.enabled
name: distribution
repository: https://charts.jfrog.io/
version: 102.17.0
- condition: insight.enabled
name: insight
repository: https://charts.jfrog.io/
version: 101.13.4
version: 101.13.5
- condition: pdnServer.enabled
name: pdn-server
repository: https://charts.jfrog.io/
version: 101.2.0
- condition: pipelines.enabled
name: pipelines
repository: https://charts.jfrog.io/
version: 101.35.3
version: 101.37.3
description: The Helm chart for JFrog Platform (Universal, hybrid, end-to-end DevOps
automation)
home: https://jfrog.com/platform/
Expand All @@ -59,4 +59,4 @@ name: jfrog-platform
sources:
- https://github.com/jfrog/charts
type: application
version: 10.12.1
version: 10.12.2
28 changes: 28 additions & 0 deletions stable/jfrog-platform/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,31 @@ Resolve jfrog url
{{- define "jfrog-platform.jfrogUrl" -}}
{{- printf "http://%s-artifactory:8082" .Release.Name -}}
{{- end -}}

{{/*
Expand the name of rabbit chart.
*/}}
{{- define "rabbitmq.name" -}}
{{- default (printf "%s" "rabbitmq") .Values.rabbitmq.nameOverride -}}
{{- end -}}


{{- define "jfrog-platform.rabbitmq.migration.fullname" -}}
{{- $name := default "rabbitmq-migration" -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}

{{/*
Create the name of the service account to use for rabbitmq migration
*/}}
{{- define "jfrog-platform.rabbitmq.migration.serviceAccountName" -}}
{{- if .Values.rabbitmq.migration.serviceAccount.create -}}
{{ default (include "jfrog-platform.rabbitmq.migration.fullname" .) .Values.rabbitmq.migration.serviceAccount.name }}
{{- else -}}
{{ default "rabbitmq-migration" .Values.rabbitmq.migration.serviceAccount.name }}
{{- end -}}
{{- end -}}
90 changes: 90 additions & 0 deletions stable/jfrog-platform/templates/migration-hook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{{- if and (not .Values.rabbitmq.migration.enabled) (not .Values.rabbitmq.rabbitmqUpgradeReady) }}
{{- fail "Rabbitmq migration flag is disabled. Please enable the rabbitmq.rabbitmqUpgradeReady flag after manually enabling the feature flags in rabbitmq" }}
{{- end }}
{{- if .Values.rabbitmq.migration.enabled }}
{{- if .Values.rabbitmq.migration.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: {{ template "jfrog-platform.name" . }}
chart: {{ template "jfrog-platform.chart" . }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
name: {{ template "jfrog-platform.rabbitmq.migration.serviceAccountName" . }}
annotations:
helm.sh/hook: "pre-upgrade"
helm.sh/hook-weight: "-10"
automountServiceAccountToken: {{ .Values.rabbitmq.migration.serviceAccount.automountServiceAccountToken }}
{{- end }}
{{- end }}
---
{{- if .Values.rabbitmq.migration.enabled }}
{{- if .Values.rabbitmq.migration.serviceAccount.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app: {{ template "jfrog-platform.name" . }}
chart: {{ template "jfrog-platform.chart" . }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
name: {{ template "jfrog-platform.rabbitmq.migration.fullname" . }}
annotations:
helm.sh/hook: "pre-upgrade"
helm.sh/hook-weight: "-10"
rules:
{{ toYaml .Values.rabbitmq.migration.serviceAccount.rbac.role.rules }}
{{- end }}
{{- end }}
---
{{- if .Values.rabbitmq.migration.enabled }}
{{- if .Values.rabbitmq.migration.serviceAccount.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app: {{ template "jfrog-platform.name" . }}
chart: {{ template "jfrog-platform.chart" . }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
name: {{ template "jfrog-platform.rabbitmq.migration.fullname" . }}
annotations:
helm.sh/hook: "pre-upgrade"
helm.sh/hook-weight: "-10"
subjects:
- kind: ServiceAccount
name: {{ template "jfrog-platform.rabbitmq.migration.serviceAccountName" . }}
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: {{ template "jfrog-platform.rabbitmq.migration.fullname" . }}
{{- end }}
{{- end }}
---
{{- if .Values.rabbitmq.migration.enabled }}
apiVersion: v1
kind: Pod
metadata:
labels:
app: {{ template "jfrog-platform.name" . }}
chart: {{ template "jfrog-platform.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "jfrog-platform.fullname" . }}-pre-upgrade-hook
annotations:
"helm.sh/hook": "pre-upgrade"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
serviceAccountName: {{ template "jfrog-platform.rabbitmq.migration.serviceAccountName" . }}
{{- if .Values.rabbitmq.podSecurityContext.enabled }}
securityContext: {{- omit .Values.rabbitmq.podSecurityContext "enabled" | toYaml | nindent 4 }}
{{- end }}
containers:
- name: pre-upgrade-container
image: releases-docker.jfrog.io/bitnami/kubectl:1.24.12
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'kubectl exec -it {{ .Release.Name }}-{{ template "rabbitmq.name" . }}-0 -- rabbitmqctl enable_feature_flag all ; if [ "$?" -ne 0 ]; then echo "Failed to perform the migration. Please make sure to enable the feature flag in rabbitmq manually [rabbitmqctl enable_feature_flag all] "; exit 1; fi' ]
restartPolicy: Never
terminationGracePeriodSeconds: 0
{{- end }}
36 changes: 34 additions & 2 deletions stable/jfrog-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ postgresql:
## This Rabbitmq is used by Xray and Pipelines only, set rabbitmq.enabled: false, when Xray or Pipelines is not enabled
rabbitmq:
enabled: true
## Enable the flag if the feature flags in rabbitmq is enabled manually
rabbitmqUpgradeReady: false
image:
repository: bitnami/rabbitmq
tag: 3.11.10-debian-11-r5
Expand Down Expand Up @@ -135,6 +137,33 @@ rabbitmq:
loadDefinition:
enabled: true
existingSecret: '{{ .Release.Name }}-load-definition'
## Upgrade of rabbitmq from 3.8.x to 3.11.x needs the feature flags to be enabled.
## Ref: (https://blog.rabbitmq.com/posts/2022/07/required-feature-flags-in-rabbitmq-3.11/
## migration enable will perform `rabbitmqctl enable_feature_flag all` command on the existing rabbitmq before starting the upgrade
migration:
## Migration is required to be performed only once hence this option can be disabled once the feature flags are enabled in rabbitmq.
enabled: true
## Service account for the pre-upgrade hook to perform rabbitmq migration
serviceAccount:
create: true
## The name of the ServiceAccount to use.
## If not set and create is true, a name is generated using the fullname template
name:
## Explicitly mounts the API credentials for the Service Account
automountServiceAccountToken: true
rbac:
create: true
role:
## Rules to create. It follows the role specification
rules:
- apiGroups:
- ""
resources:
- pods/exec
- pods
verbs:
- create
- get

## This Redis is used by pipelines only, set redis.enabled: false, when pipelines is not enabled
redis:
Expand All @@ -147,7 +176,7 @@ redis:
usePassword: false

artifactory:
installerInfo: '{"productId": "Helm_JFrogPlatform/{{ printf "10.12.1-%s" .Chart.AppVersion }}", "features": [ { "featureId": "Platform/{{ printf "%s-%s" "kubernetes" .Capabilities.KubeVersion.Version }}"}]}'
installerInfo: '{"productId": "Helm_JFrogPlatform/{{ printf "10.12.2-%s" .Chart.AppVersion }}", "features": [ { "featureId": "Platform/{{ printf "%s-%s" "kubernetes" .Capabilities.KubeVersion.Version }}"}]}'
enabled: true
postgresql:
enabled: false
Expand Down Expand Up @@ -186,12 +215,15 @@ xray:
size: 200Gi
rabbitmq:
connectionConfigFromEnvironment: false
extraEnvVars: |
- name: "JF_SHARED_RABBITMQ_VHOST"
value: "xray"
rabbitmq:
enabled: false
external:
username: admin
password: password
url: "amqp://{{ .Release.Name }}-rabbitmq:5672/xray"
url: "amqp://{{ .Release.Name }}-rabbitmq:5672"
erlangCookie: secretcookie

distribution:
Expand Down

0 comments on commit 69da6ea

Please sign in to comment.