diff --git a/flux/kustomizations/kustomization.yaml b/flux/kustomizations/kustomization.yaml index 06062b6..12af385 100644 --- a/flux/kustomizations/kustomization.yaml +++ b/flux/kustomizations/kustomization.yaml @@ -11,5 +11,6 @@ resources: - meilisearch.yaml - namespaces.yaml - prometheus-stack.yaml +- rabbitmq.yaml - traefik.yaml - quickchart.yaml diff --git a/flux/kustomizations/rabbitmq.yaml b/flux/kustomizations/rabbitmq.yaml new file mode 100644 index 0000000..c89f2de --- /dev/null +++ b/flux/kustomizations/rabbitmq.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: rabbitmq + namespace: flux-system +spec: + interval: 1m0s + path: ./infrastructure/rabbitmq + prune: false + healthChecks: + - apiVersion: source.toolkit.fluxcd.io/v1 + kind: HelmRepository + name: bitnami + namespace: common-services + - apiVersion: helm.toolkit.fluxcd.io/v2 + kind: HelmRelease + name: rabbitmq + namespace: common-services + dependsOn: + - name: namespaces + namespace: flux-system + sourceRef: + kind: GitRepository + name: flux-system + timeout: 5m diff --git a/infrastructure/hashicorp-vault/external-secrets/resources/kustomization.yaml b/infrastructure/hashicorp-vault/external-secrets/resources/kustomization.yaml index d21ca3c..ab9de60 100644 --- a/infrastructure/hashicorp-vault/external-secrets/resources/kustomization.yaml +++ b/infrastructure/hashicorp-vault/external-secrets/resources/kustomization.yaml @@ -12,3 +12,4 @@ resources: - review.yaml - staging.yaml - production.yaml + - rabbitmq.yaml diff --git a/infrastructure/hashicorp-vault/external-secrets/resources/rabbitmq.yaml b/infrastructure/hashicorp-vault/external-secrets/resources/rabbitmq.yaml new file mode 100644 index 0000000..12ef476 --- /dev/null +++ b/infrastructure/hashicorp-vault/external-secrets/resources/rabbitmq.yaml @@ -0,0 +1,22 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: rabbitmq-credentials + namespace: common-services +spec: + refreshInterval: "15s" + secretStoreRef: + name: vault-secret-store + kind: ClusterSecretStore + target: + name: rabbitmq-credentials + template: + engineVersion: v2 + type: Opaque + data: + rabbitmq-password: "{{ .password }}" + data: + - secretKey: password + remoteRef: + key: secret/rabbitmq + property: password \ No newline at end of file diff --git a/infrastructure/rabbitmq/helm-release.yaml b/infrastructure/rabbitmq/helm-release.yaml new file mode 100644 index 0000000..ed6d592 --- /dev/null +++ b/infrastructure/rabbitmq/helm-release.yaml @@ -0,0 +1,24 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: rabbitmq + namespace: common-services +spec: + interval: 1m0s + chart: + spec: + chart: rabbitmq + version: 16.0.3 + sourceRef: + kind: HelmRepository + name: rabbitmq + namespace: common-services + values: + global: + defaultStorageClass: "csi-cinder-high-speed" + image: + tag: 4.0.1 + auth: + username: rabbitmq + existingPasswordSecret: rabbitmq-credentials diff --git a/infrastructure/rabbitmq/helm-repository.yaml b/infrastructure/rabbitmq/helm-repository.yaml new file mode 100644 index 0000000..6f50beb --- /dev/null +++ b/infrastructure/rabbitmq/helm-repository.yaml @@ -0,0 +1,9 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: bitnami + namespace: common-services +spec: + interval: 1h0m0s + url: oci://registry-1.docker.io/bitnamicharts + type: "oci" diff --git a/infrastructure/rabbitmq/kustomization.yaml b/infrastructure/rabbitmq/kustomization.yaml new file mode 100644 index 0000000..e015cab --- /dev/null +++ b/infrastructure/rabbitmq/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- helm-repository.yaml +- helm-release.yaml