Skip to content

Commit 6097c03

Browse files
onprem: 2.8.6 (#76)
1 parent 5e59a59 commit 6097c03

File tree

6 files changed

+130
-7
lines changed

6 files changed

+130
-7
lines changed

codefresh/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: Helm Chart for Codefresh On-Prem
33
name: codefresh
4-
version: 2.8.5
4+
version: 2.8.6
55
keywords:
66
- codefresh
77
home: https://codefresh.io/
@@ -18,8 +18,8 @@ annotations:
1818
# artifacthub.io/containsSecurityUpdates: "true"
1919
# supported kinds are added, changed, deprecated, removed, fixed and security.
2020
artifacthub.io/changes: |
21-
- kind: security
22-
description: "Contains security fixes in cf-api"
21+
- kind: added
22+
description: "Add pre-upgrade hook to enable stable feature flags in rabbitmq"
2323
dependencies:
2424
- name: cf-common
2525
repository: oci://quay.io/codefresh/charts

codefresh/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh On-Premises
22

3-
![Version: 2.8.5](https://img.shields.io/badge/Version-2.8.5-informational?style=flat-square) ![AppVersion: 2.8.0](https://img.shields.io/badge/AppVersion-2.8.0-informational?style=flat-square)
3+
![Version: 2.8.6](https://img.shields.io/badge/Version-2.8.6-informational?style=flat-square) ![AppVersion: 2.8.0](https://img.shields.io/badge/AppVersion-2.8.0-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh On-Premises](https://codefresh.io/docs/docs/getting-started/intro-to-codefresh/) to Kubernetes.
66

@@ -2322,7 +2322,11 @@ spec:
23222322

23232323
### RabbitMQ update
23242324

2325-
Default RabbitMQ image is changed from 3.x to 4.x
2325+
Default RabbitMQ image is changed from 3.x to 4.0
2326+
2327+
If you run external RabbitMQ, follow the [official instructions](https://www.rabbitmq.com/docs/upgrade) to upgrade to 4.0
2328+
2329+
For built-in RabbitMQ `bitnami/rabbitmq` subchart, pre-upgrade hook was added to enable all stable feature flags.
23262330

23272331
#### Affected values
23282332

@@ -2595,6 +2599,7 @@ After platform upgrade, Consul fails with the error `refusing to rejoin cluster
25952599
| hooks | object | See below | Pre/post-upgrade Job hooks. |
25962600
| hooks.consul | object | `{"affinity":{},"enabled":true,"image":{"registry":"us-docker.pkg.dev/codefresh-inc/public-gcr-io","repository":"codefresh/kubectl","tag":"1.33.0"},"nodeSelector":{},"podSecurityContext":{},"resources":{},"tolerations":[]}` | Recreates `consul-headless` service due to duplicated ports in Service during the upgrade. |
25972601
| hooks.mongodb | object | `{"affinity":{},"enabled":true,"image":{"registry":"us-docker.pkg.dev/codefresh-inc/public-gcr-io","repository":"codefresh/mongosh","tag":"2.5.0"},"nodeSelector":{},"podSecurityContext":{},"resources":{},"tolerations":[]}` | Updates images in `system/default` runtime. |
2602+
| hooks.rabbitmq | object | `{"affinity":{},"enabled":true,"image":{"registry":"us-docker.pkg.dev/codefresh-inc/public-gcr-io","repository":"codefresh/rabbitmqadmin","tag":"2.1.0"},"nodeSelector":{},"podSecurityContext":{},"resources":{},"tolerations":[]}` | Enable stable feature flags in RabbitMQ. |
25982603
| imageCredentials | object | `{}` | Credentials for Image Pull Secret object |
25992604
| ingress | object | `{"annotations":{"nginx.ingress.kubernetes.io/service-upstream":"true","nginx.ingress.kubernetes.io/ssl-redirect":"false","nginx.org/redirect-to-https":"false"},"enabled":true,"ingressClassName":"nginx-codefresh","labels":{},"nameOverride":"","services":{"internal-gateway":["/"]},"tls":{"cert":"","enabled":false,"existingSecret":"","key":"","secretName":"star.codefresh.io"}}` | Ingress |
26002605
| ingress-nginx | object | See below | ingress-nginx Ref: https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml |

codefresh/README.md.gotmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,11 @@ spec:
23312331

23322332
### RabbitMQ update
23332333

2334-
Default RabbitMQ image is changed from 3.x to 4.x
2334+
Default RabbitMQ image is changed from 3.x to 4.0
2335+
2336+
If you run external RabbitMQ, follow the [official instructions](https://www.rabbitmq.com/docs/upgrade) to upgrade to 4.0
2337+
2338+
For built-in RabbitMQ `bitnami/rabbitmq` subchart, pre-upgrade hook was added to enable all stable feature flags.
23352339

23362340
#### Affected values
23372341

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{{- if and .Values.hooks.rabbitmq.enabled .Values.rabbitmq.enabled }}
2+
{{- $libTemplateName := printf "cf-common-%s" (index .Subcharts "cf-common").Chart.Version }}
3+
{{- $tolerations := .Values.hooks.consul.tolerations | default list }}
4+
{{- $globalTolerations := .Values.global.tolerations | default list }}
5+
{{- $allToleration := concat $globalTolerations $tolerations }}
6+
{{- $affinity := .Values.hooks.consul.affinity | default dict }}
7+
{{- $globalAffinity := .Values.global.affinity | default dict }}
8+
{{- $allAffinity := mergeOverwrite $globalAffinity $affinity }}
9+
{{- $nodeSelector := .Values.hooks.consul.nodeSelector | default dict }}
10+
{{- $globalNodeSelector := .Values.global.nodeSelector | default dict }}
11+
{{- $allNodeSelector := mergeOverwrite $globalNodeSelector $nodeSelector }}
12+
---
13+
apiVersion: batch/v1
14+
kind: Job
15+
metadata:
16+
name: {{ template "codefresh.fullname" . }}-rabbitmq-enable-stable-flags
17+
labels:
18+
{{ include "codefresh.labels" . | nindent 4 }}
19+
annotations:
20+
helm.sh/hook: pre-upgrade
21+
helm.sh/hook-weight: "5"
22+
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation
23+
spec:
24+
ttlSecondsAfterFinished: 300
25+
backoffLimit: 6
26+
template:
27+
metadata:
28+
name: {{ template "codefresh.fullname" . }}-rabbitmq-enable-stable-flags
29+
labels:
30+
{{ include "codefresh.labels" . | nindent 8 }}
31+
spec:
32+
{{- include (printf "%s.image.pullSecrets" $libTemplateName ) . | nindent 6 }}
33+
containers:
34+
- name: {{ template "codefresh.fullname" . }}-rabbitmq-enable-stable-flags
35+
image: {{ include (printf "%s.image.name" $libTemplateName) (dict "image" .Values.hooks.rabbitmq.image "context" .) }}
36+
env:
37+
- name: RABBITMQADMIN_TARGET_HOST
38+
valueFrom:
39+
secretKeyRef:
40+
name: {{ template "codefresh.fullname" . }}-rabbitmq-enable-stable-flags
41+
key: RABBITMQADMIN_TARGET_HOST
42+
- name: RABBITMQADMIN_TARGET_PORT
43+
valueFrom:
44+
secretKeyRef:
45+
name: {{ template "codefresh.fullname" . }}-rabbitmq-enable-stable-flags
46+
key: RABBITMQADMIN_TARGET_PORT
47+
- name: RABBITMQADMIN_USERNAME
48+
valueFrom:
49+
secretKeyRef:
50+
name: {{ template "codefresh.fullname" . }}-rabbitmq-enable-stable-flags
51+
key: RABBITMQADMIN_USERNAME
52+
- name: RABBITMQADMIN_PASSWORD
53+
valueFrom:
54+
secretKeyRef:
55+
name: {{ template "codefresh.fullname" . }}-rabbitmq-enable-stable-flags
56+
key: RABBITMQADMIN_PASSWORD
57+
command:
58+
- /bin/bash
59+
- -c
60+
- |
61+
set -x
62+
rabbitmqadmin \
63+
--host=$RABBITMQADMIN_TARGET_HOST \
64+
--port=$RABBITMQADMIN_TARGET_PORT \
65+
--username=$RABBITMQADMIN_USERNAME \
66+
--password=$RABBITMQADMIN_PASSWORD \
67+
feature_flags enable_all
68+
resources:
69+
{{- toYaml .Values.hooks.rabbitmq.resources | nindent 10 }}
70+
{{- with $allNodeSelector }}
71+
nodeSelector:
72+
{{- toYaml . | nindent 8 }}
73+
{{- end }}
74+
{{- with $allAffinity }}
75+
affinity:
76+
{{- toYaml . | nindent 8}}
77+
{{- end }}
78+
{{- with $allToleration }}
79+
tolerations:
80+
{{- toYaml . | nindent 6 }}
81+
{{- end }}
82+
restartPolicy: OnFailure
83+
{{- end }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{- if and .Values.hooks.rabbitmq.enabled .Values.rabbitmq.enabled }}
2+
{{- $libTemplateName := printf "cf-common-%s" (index .Subcharts "cf-common").Chart.Version }}
3+
---
4+
apiVersion: v1
5+
kind: Secret
6+
metadata:
7+
name: {{ template "codefresh.fullname" . }}-rabbitmq-enable-stable-flags
8+
labels:
9+
{{ include "codefresh.labels" . | nindent 4 }}
10+
annotations:
11+
helm.sh/hook: pre-upgrade
12+
helm.sh/hook-weight: "-10"
13+
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation,hook-failed
14+
type: Opaque
15+
data:
16+
RABBITMQADMIN_TARGET_HOST: {{ (printf "%s-%s" .Release.Name (coalesce .Values.global.rabbitService .Values.global.rabbitmqService) | lower | trimSuffix ":5672") | b64enc | quote }}
17+
RABBITMQADMIN_TARGET_PORT: {{ printf "%d" 15672 | b64enc | quote }}
18+
RABBITMQADMIN_USERNAME: {{ .Values.rabbitmq.auth.username | b64enc | quote }}
19+
RABBITMQADMIN_PASSWORD: {{ .Values.rabbitmq.auth.password | b64enc | quote }}
20+
{{- end }}

codefresh/values.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,18 @@ hooks:
465465
podSecurityContext: {}
466466
resources: {}
467467
tolerations: []
468-
468+
# -- Enable stable feature flags in RabbitMQ.
469+
rabbitmq:
470+
enabled: true
471+
image:
472+
registry: us-docker.pkg.dev/codefresh-inc/public-gcr-io
473+
repository: codefresh/rabbitmqadmin
474+
tag: 2.1.0
475+
affinity: {}
476+
nodeSelector: {}
477+
podSecurityContext: {}
478+
resources: {}
479+
tolerations: []
469480

470481
# -- Maintenance postgresql clean job.
471482
# Removes a certain number of the last records in the event store table.

0 commit comments

Comments
 (0)