Skip to content

Commit 7ed1a12

Browse files
committed
Merge branch 'develop' of https://github.com/makeplane/helm-charts into feat/prime-v2
2 parents 767ef5c + 1cacda9 commit 7ed1a12

21 files changed

+422
-22
lines changed

.github/workflows/chart-releaser.yml

+45-8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ name: Chart Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
plane-ce:
7+
description: 'Build Plane CE'
8+
type: boolean
9+
default: false
10+
plane-ee:
11+
description: 'Build Plane EE'
12+
type: boolean
13+
default: false
514

615
env:
716
CR_CONFIGFILE: "${{ github.workspace }}/cr.yaml"
@@ -14,9 +23,11 @@ env:
1423
TARGET_BRANCH: "${{ github.ref_name }}"
1524
CHART_NAME_CE: "plane-ce"
1625
CHART_NAME_ENTERPRISE: "plane-enterprise"
26+
MARK_AS_LATEST: true
1727

1828
jobs:
1929
setup:
30+
if: ${{ github.event.inputs.plane-ce == 'true' || github.event.inputs.plane-ee == 'true' }}
2031
runs-on: ubuntu-latest
2132
permissions:
2233
contents: write
@@ -60,12 +71,28 @@ jobs:
6071
6172
chmod 400 ${{env.GNUPGHOME}}/secring.gpg
6273
74+
- name: Remove unwanted charts
75+
run: |
76+
if [ "${{ github.event.inputs.plane-ce }}" = "false" ]; then
77+
rm -rf charts/${{ env.CHART_NAME_CE }}
78+
fi
79+
if [ "${{ github.event.inputs.plane-ee }}" = "false" ]; then
80+
rm -rf charts/${{ env.CHART_NAME_ENTERPRISE }}
81+
fi
82+
6383
- name: Rename Chart
6484
if: github.ref_name != 'master'
6585
run: |
6686
flatBranchName=$(echo "${{ env.TARGET_BRANCH }}" | sed 's/\//\-/g')
67-
sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_CE }}/Chart.yaml
68-
sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_ENTERPRISE }}/Chart.yaml
87+
if [ "${{ github.event.inputs.plane-ce }}" = "true" ]; then
88+
sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_CE }}/Chart.yaml
89+
fi
90+
91+
if [ "${{ github.event.inputs.plane-ee }}" = "true" ]; then
92+
sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_ENTERPRISE }}/Chart.yaml
93+
fi
94+
95+
echo "MARK_AS_LATEST=false" >> $GITHUB_ENV
6996
7097
- name: Release Charts
7198
uses: helm/[email protected]
@@ -74,6 +101,7 @@ jobs:
74101
config: cr.yaml
75102
packages_with_index: false
76103
skip_existing: true
104+
mark_as_latest: ${{ env.MARK_AS_LATEST }}
77105
env:
78106
CR_TOKEN: ${{ env.CR_TOKEN }}
79107
CR_KEY: ${{ env.GPG_KEY_NAME }}
@@ -82,7 +110,7 @@ jobs:
82110
CR_SIGN: true
83111

84112
- id: publish-plane-enterprise
85-
if: github.ref_name == 'master'
113+
if: ${{ github.ref_name == 'master' && github.event.inputs.plane-ee == 'true' }}
86114
name: Harbor Publish Plane-Enterprise
87115
env:
88116
CHART_REPO: ${{ env.CHART_NAME_ENTERPRISE }}
@@ -125,14 +153,23 @@ jobs:
125153
126154
- name: Copy Readme
127155
run: |
128-
cp code/charts/plane-ce/README.md pages/content/plane-ce.md
129-
cp code/charts/plane-enterprise/README.md pages/content/plane-ee.md
156+
if [ "${{ github.event.inputs.plane-ce }}" = "true" ]; then
157+
cp code/charts/plane-ce/README.md pages/content/plane-ce.md
158+
fi
159+
if [ "${{ github.event.inputs.plane-ee }}" = "true" ]; then
160+
cp code/charts/plane-enterprise/README.md pages/content/plane-ee.md
161+
fi
130162
131163
- name: Publish pages
132164
working-directory: pages
133165
run: |
134166
git add .
135-
git commit -m "Updated READMEs"
136-
git push
137-
167+
if git diff-index --quiet HEAD --; then
168+
echo "No changes to commit"
169+
else
170+
# Commit and push the changes
171+
git commit -m "Updated READMEs"
172+
git push
173+
fi
174+
138175

charts/plane-ce/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Meet Plane. An open-source software development tool to manage issu
55

66
type: application
77

8-
version: 1.0.22
8+
version: 1.0.24
99
appVersion: "0.22.0"
1010

1111
home: https://plane.so

charts/plane-ce/questions.yml

+59-3
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ questions:
225225
- variable: redis.volumeSize
226226
label: "Volume Size"
227227
type: string
228-
default: "1Gi"
228+
default: "100Mi"
229229
show_if: "redis.local_setup=true"
230230
- variable: redis.assign_cluster_ip
231231
label: "Assign Cluster IP"
@@ -267,7 +267,7 @@ questions:
267267
- variable: postgres.volumeSize
268268
label: "Volume Size"
269269
type: string
270-
default: "5Gi"
270+
default: "1Gi"
271271
show_if: "postgres.local_setup=true"
272272
- variable: env.pgdb_username
273273
label: "Username"
@@ -295,6 +295,57 @@ questions:
295295
default: "postrgres://"
296296
show_if: "postgres.local_setup=false"
297297

298+
- variable: rabbitmq.local_setup
299+
label: "Install RabbitMQ"
300+
type: boolean
301+
default: true
302+
group: "RabbitMQ Setup"
303+
subquestions:
304+
- variable: rabbitmq.image
305+
label: "Docker Image"
306+
type: string
307+
default: "rabbitmq:3.13.6-management-alpine"
308+
show_if: "rabbitmq.local_setup=true"
309+
- variable: rabbitmq.servicePort
310+
label: Service Port
311+
type: int
312+
default: 5672
313+
show_if: "rabbitmq.local_setup=true"
314+
- variable: rabbitmq.managementPort
315+
label: Management Port
316+
type: int
317+
default: 15672
318+
show_if: "rabbitmq.local_setup=true"
319+
- variable: rabbitmq.assign_cluster_ip
320+
label: "Assign ClusterIP"
321+
type: boolean
322+
default: false
323+
show_if: "rabbitmq.local_setup=true"
324+
- variable: rabbitmq.storageClass
325+
label: "Storage Class"
326+
type: string
327+
default: "longhorn"
328+
show_if: "rabbitmq.local_setup=true"
329+
- variable: rabbitmq.volumeSize
330+
label: "Volume Size"
331+
type: string
332+
default: "100Mi"
333+
show_if: "rabbitmq.local_setup=true"
334+
- variable: rabbitmq.default_user
335+
label: "Username"
336+
type: string
337+
default: "plane"
338+
show_if: "rabbitmq.local_setup=true"
339+
- variable: rabbitmq.default_password
340+
label: "Password"
341+
type: password
342+
default: "plane"
343+
show_if: "rabbitmq.local_setup=true"
344+
- variable: rabbitmq.external_rabbitmq_url
345+
label: "Remote URL"
346+
type: string
347+
show_if: "rabbitmq.local_setup=false"
348+
298349
- variable: minio.local_setup
299350
label: "Install Minio"
300351
type: boolean
@@ -324,7 +375,7 @@ questions:
324375
- variable: minio.volumeSize
325376
label: "Volume Size"
326377
type: string
327-
default: "5Gi"
378+
default: "1Gi"
328379
show_if: "minio.local_setup=true"
329380
- variable: minio.assign_cluster_ip
330381
label: "Assign Cluster IP"
@@ -377,6 +428,11 @@ questions:
377428
type: string
378429
default: "plane-minio.example.com"
379430
show_if: "minio.local_setup=true"
431+
- variable: ingress.rabbitmqHost
432+
label: "Rabbitmq Host"
433+
type: string
434+
default: "plane-rabbitmq.example.com"
435+
show_if: "rabbitmq.local_setup=true"
380436
- variable: ingress.ingressClass
381437
label: "Ingress Classname"
382438
type: string

charts/plane-ce/templates/certs/certs.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ spec:
1111
{{- if and .Values.minio.local_setup .Values.ingress.minioHost }}
1212
- {{ .Values.ingress.minioHost | quote }}
1313
{{- end }}
14+
{{- if and .Values.rabbitmq.local_setup .Values.ingress.rabbitmqHost }}
15+
- {{ .Values.ingress.rabbitmqHost | quote }}
16+
{{- end }}
1417
issuerRef:
1518
name: {{ .Release.Name }}-cert-issuer
1619
secretName: {{ .Release.Name }}-ssl-cert

charts/plane-ce/templates/config-secrets/app-env.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,11 @@ data:
5353
{{- else }}
5454
DATABASE_URL: ""
5555
{{ end }}
56+
57+
{{- if .Values.rabbitmq.local_setup }}
58+
AMQP_URL: "amqp://{{ .Values.rabbitmq.default_user}}:{{ .Values.rabbitmq.default_password}}@{{ .Release.Name }}-rabbitmq.{{ .Release.Namespace }}.svc.{{ .Values.env.default_cluster_domain | default "cluster.local" }}/"
59+
{{- else if .Values.rabbitmq.external_rabbitmq_url }}
60+
AMQP_URL: {{ .Values.rabbitmq.external_rabbitmq_url}}
61+
{{- else }}
62+
AMQP_URL: ""
63+
{{ end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{- if .Values.rabbitmq.local_setup }}
2+
3+
apiVersion: v1
4+
kind: Secret
5+
type: Opaque
6+
metadata:
7+
namespace: {{ .Release.Namespace }}
8+
name: {{ .Release.Name }}-rabbitmq-secrets
9+
data:
10+
RABBITMQ_DEFAULT_USER: {{ .Values.rabbitmq.default_user | default "plane" | b64enc | quote }}
11+
RABBITMQ_DEFAULT_PASS: {{ .Values.rabbitmq.default_password | default "plane" | b64enc |quote }}
12+
---
13+
14+
{{- end }}

charts/plane-ce/templates/ingress.yaml

+16-1
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,28 @@ spec:
7474
path: /
7575
pathType: Prefix
7676
{{- end }}
77+
{{- if and .Values.rabbitmq.local_setup .Values.ingress.rabbitmqHost }}
78+
- host: {{ .Values.ingress.rabbitmqHost }}
79+
http:
80+
paths:
81+
- backend:
82+
service:
83+
port:
84+
number: 15672
85+
name: {{ .Release.Name }}-rabbitmq
86+
path: /
87+
pathType: Prefix
88+
{{- end }}
7789
{{- if .Values.ssl.generateCerts }}
7890
tls:
7991
- hosts:
8092
- {{ .Values.ingress.appHost | quote }}
8193
{{- if and .Values.minio.local_setup .Values.ingress.minioHost }}
8294
- {{ .Values.ingress.minioHost | quote }}
83-
{{ end }}
95+
{{- end }}
96+
{{- if and .Values.rabbitmq.local_setup .Values.ingress.rabbitmqHost }}
97+
- {{ .Values.ingress.rabbitmqHost | quote }}
98+
{{- end }}
8499
secretName: {{ .Release.Name }}-ssl-cert
85100
{{- end }}
86101

charts/plane-ce/templates/workloads/minio.stateful.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ spec:
7575
- ReadWriteOnce
7676
resources:
7777
requests:
78-
storage: {{ .Values.minio.volumeSize | default "5Gi" | quote }}
78+
storage: {{ .Values.minio.volumeSize | default "1Gi" | quote }}
7979
storageClassName: {{ .Values.minio.storageClass }}
8080
volumeMode: Filesystem
8181

charts/plane-ce/templates/workloads/postgres.stateful.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ spec:
9393
- ReadWriteOnce
9494
resources:
9595
requests:
96-
storage: {{ .Values.postgres.volumeSize | default "5Gi" | quote }}
96+
storage: {{ .Values.postgres.volumeSize | default "1Gi" | quote }}
9797
storageClassName: {{ .Values.postgres.storageClass }}
9898
volumeMode: Filesystem
9999

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{{- if .Values.rabbitmq.local_setup }}
2+
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
namespace: {{ .Release.Namespace }}
7+
name: {{ .Release.Name }}-rabbitmq
8+
labels:
9+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq
10+
spec:
11+
{{- if not .Values.rabbitmq.assign_cluster_ip }}
12+
clusterIP: None
13+
{{- end }}
14+
ports:
15+
- name: rabbitmq-{{ .Values.rabbitmq.servicePort }}
16+
port: {{ .Values.rabbitmq.servicePort }}
17+
protocol: TCP
18+
targetPort: 5672
19+
- name: rabbitmq-mgmt-{{ .Values.rabbitmq.managementPort }}
20+
port: {{ .Values.rabbitmq.managementPort }}
21+
protocol: TCP
22+
targetPort: 15672
23+
selector:
24+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq
25+
---
26+
apiVersion: apps/v1
27+
kind: StatefulSet
28+
metadata:
29+
namespace: {{ .Release.Namespace }}
30+
name: {{ .Release.Name }}-rabbitmq-wl
31+
spec:
32+
selector:
33+
matchLabels:
34+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq
35+
serviceName: {{ .Release.Name }}-rabbitmq
36+
template:
37+
metadata:
38+
labels:
39+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq
40+
spec:
41+
containers:
42+
- image: {{ .Values.rabbitmq.image }}
43+
imagePullPolicy: Always
44+
name: {{ .Release.Name }}-rabbitmq
45+
stdin: true
46+
tty: true
47+
envFrom:
48+
- secretRef:
49+
name: {{ .Release.Name }}-rabbitmq-secrets
50+
optional: false
51+
volumeMounts:
52+
- mountPath: /var/lib/rabbitmq
53+
name: pvc-{{ .Release.Name }}-rabbitmq-vol
54+
subPath: ''
55+
serviceAccount: {{ .Release.Name }}-srv-account
56+
serviceAccountName: {{ .Release.Name }}-srv-account
57+
volumeClaimTemplates:
58+
- apiVersion: v1
59+
kind: PersistentVolumeClaim
60+
metadata:
61+
creationTimestamp: null
62+
namespace: {{ .Release.Namespace }}
63+
name: pvc-{{ .Release.Name }}-rabbitmq-vol
64+
spec:
65+
accessModes:
66+
- ReadWriteOnce
67+
resources:
68+
requests:
69+
storage: {{ .Values.rabbitmq.volumeSize | default "100Mi" | quote }}
70+
storageClassName: {{ .Values.rabbitmq.storageClass }}
71+
volumeMode: Filesystem
72+
73+
{{- end }}

charts/plane-ce/templates/workloads/redis.stateful.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ spec:
6161
- ReadWriteOnce
6262
resources:
6363
requests:
64-
storage: {{ .Values.redis.volumeSize | default "1Gi" | quote }}
64+
storage: {{ .Values.redis.volumeSize | default "100Mi" | quote }}
6565
storageClassName: {{ .Values.redis.storageClass }}
6666
volumeMode: Filesystem
6767

0 commit comments

Comments
 (0)