blob: 649e0380b899e599ce2c31daa9f8e8998890b1b0 [file] [log] [blame]
Mohammed Naser313085b2022-09-19 21:46:16 -04001from taskflow.patterns import graph_flow
Mohammed Naser124a9bc2022-09-19 15:13:16 -04002
3from atmosphere.config import CONF
Mohammed Naser313085b2022-09-19 21:46:16 -04004from atmosphere.tasks import flux, kubernetes, openstack_helm
Mohammed Naser124a9bc2022-09-19 15:13:16 -04005
6
7def generate_for_openstack_helm_chart(chart):
8 flow = graph_flow.Flow(chart)
9
10 if getattr(CONF, chart).enabled:
11 flow.add(
12 openstack_helm.GenerateReleaseSecretTask(inject={"chart": chart}),
13 kubernetes.EnsureSecretTask(),
14 )
15
16 return flow
17
18
Mohammed Naser313085b2022-09-19 21:46:16 -040019DEPLOY = graph_flow.Flow("deploy").add(
20 flux.EnsureHelmRepositoryTask(
21 provides="openstack-helm-infra",
22 inject={
23 "namespace": "openstack",
24 "name": "openstack-helm-infra",
25 "url": "https://tarballs.opendev.org/openstack/openstack-helm-infra/",
26 },
27 ),
Mohammed Naser124a9bc2022-09-19 15:13:16 -040028 generate_for_openstack_helm_chart("memcached"),
29)