Skip to content

Commit 6057875

Browse files
committed
feat(helmbroker): add rabbitmq dependencies
1 parent d000093 commit 6057875

4 files changed

Lines changed: 29 additions & 4 deletions

File tree

.drone/drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ name: chart
126126
steps:
127127
- name: generate chart
128128
commands:
129-
- IMAGE_TAG=$([ ! -z $DRONE_TAG ] && echo \"${DRONE_TAG:1}\" || echo \"canary\")
129+
- IMAGE_TAG=$([ ! -z $DRONE_TAG ] && sed -i "s#oci://registry.drycc.cc/charts-testing#oci://registry.drycc.cc/charts#g" charts/manager/Chart.yaml && echo \"${DRONE_TAG:1}\" || echo \"canary\")
130130
- sed -i "s/imageTag:\ \"canary\"/imageTag:\ $IMAGE_TAG/g" charts/helmbroker/values.yaml
131131
- helm package -u charts/helmbroker --version $([ -z $DRONE_TAG ] && echo 1.0.0 || echo ${DRONE_TAG#v})
132132
- echo $CONTAINER_PASSWORD | helm registry login $DRYCC_REGISTRY -u $CONTAINER_USERNAME --password-stdin

charts/helmbroker/Chart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ dependencies:
55
- name: common
66
repository: oci://registry.drycc.cc/charts
77
version: ~1.1.1
8+
- name: rabbitmq
9+
repository: oci://registry.drycc.cc/charts-testing
10+
version: x.x.x
811
description: Drycc Workflow helmbroker.
912
maintainers:
1013
- name: Drycc Team

charts/helmbroker/templates/_helpers.tpl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ env:
77
value: {{ if .Values.username | default "" | ne "" }}{{ .Values.username }}{{ else }}{{ randAlphaNum 32 }}{{ end }}
88
- name: PASSWORD
99
value: {{ if .Values.password | default "" | ne "" }}{{ .Values.password }}{{ else }}{{ randAlphaNum 32 }}{{ end }}
10+
{{- if (.Values.rabbitmqUrl) }}
11+
- name: DRYCC_RABBITMQ_URL
12+
value: {{ .Values.rabbitmqUrl }}
13+
{{- else if eq .Values.global.rabbitmqLocation "on-cluster" }}
14+
- name: "DRYCC_RABBITMQ_USERNAME"
15+
valueFrom:
16+
secretKeyRef:
17+
name: rabbitmq-creds
18+
key: username
19+
- name: "DRYCC_RABBITMQ_PASSWORD"
20+
valueFrom:
21+
secretKeyRef:
22+
name: rabbitmq-creds
23+
key: password
24+
- name: "DRYCC_RABBITMQ_URL"
25+
value: "amqp://$(DRYCC_RABBITMQ_USERNAME):$(DRYCC_RABBITMQ_PASSWORD)@drycc-rabbitmq.{{$.Release.Namespace}}.svc.{{$.Values.global.clusterDomain}}:5672/drycc"
26+
{{- end }}
1027
{{- range $key, $value := .Values.environment }}
1128
- name: {{ $key }}
1229
value: {{ $value | quote }}

charts/helmbroker/values.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ celeryReplicas: 1
1818
username: admin
1919
password: admin
2020

21+
# Configuring this will no longer use the built-in rabbitmq component
22+
rabbitmqUrl: ""
23+
24+
# Any custom controller environment variables
25+
# can be specified as key-value pairs under environment
26+
# this is usually a non required setting.
2127
environment:
22-
RESERVED_NAMES: "drycc, drycc-helmbroker"
23-
# HELMBROKER_CELERY_BROKER: ""
24-
# HELMBROKER_CELERY_BACKEND: ""
28+
# DRYCC_DEBUG: true
29+
# HELMBROKER_ROOT: /etc/helmbroker
2530

2631
api:
2732
nodeAffinityPreset:

0 commit comments

Comments
 (0)