Skip to content

Commit

Permalink
feat: add rabbitmq
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-langlet committed May 17, 2024
1 parent 3bb374d commit ae6ae47
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 8 deletions.
35 changes: 35 additions & 0 deletions deployment/flux/whoami/amqp-scale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: v1
kind: Secret
metadata:
name: keda-rabbitmq-secret
data:
host: YW1xcDovL3VzZXI6cGFzc3dvcmRAcmFiYml0bXE6NTY3Mi92aG9zdA== # base64 encoded value of format amqp://user:password@localhost:5672/vhost
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-rabbitmq-conn
namespace: default
spec:
secretTargetRef:
- parameter: host
name: keda-rabbitmq-secret
key: host
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: rabbitmq-scaledobject
namespace: default
spec:
scaleTargetRef:
name: rabbitmq-deployment
triggers:
- type: rabbitmq
metadata:
protocol: amqp
queueName: testqueue
mode: QueueLength
value: "5"
authenticationRef:
name: keda-trigger-auth-rabbitmq-conn
18 changes: 10 additions & 8 deletions deployment/terraform/loadbalancing.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
resource "helm_release" "traefik" {
name = "traefik"
repository = "https://traefik.github.io/charts"
chart = "traefik"
namespace = "traefik"
create_namespace = true
}

resource "helm_release" "metallb" {
name = "metallb"
repository = "https://metallb.github.io/metallb"
chart = "metallb"
namespace = "metallb-system"
create_namespace = true
}

resource "helm_release" "traefik" {
name = "traefik"
repository = "https://traefik.github.io/charts"
chart = "traefik"
namespace = "traefik"
wait = true
create_namespace = true
depends_on = [ helm_release.metallb ]
}
18 changes: 18 additions & 0 deletions deployment/terraform/rabbitmq.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// install rabbitmq through helm
resource "helm_release" "rabbitmq" {
name = "rabbitmq"
repository = "https://charts.bitnami.com/bitnami"
chart = "rabbitmq"
namespace = "rabbitmq"
create_namespace = true

set_sensitive {
name = "auth.username"
value = "user"
}

set_sensitive {
name = "auth.password"
value = "password"
}
}

0 comments on commit ae6ae47

Please sign in to comment.