Hey everyone, I was wondering if any can help me w...
# kubernetes
f
Hey everyone, I was wondering if any can help me with my little issue here: I am working with Pulumi to deploy AKS clusters on azure with Dapr integration. My next step is where I am struggling. I want to use the Dapr Pub/Sub service, which of course requires some sort of message broker. I am using redis for this. My redis deployment is working fine, I did a fast deployment by using the docker image and just throwing it in the cluster like this (in C#):
{
ApiVersion = "apps/v1",
Kind = "Deployment",
Metadata = new ObjectMetaArgs
{
Name = "redis-deployment",
Labels =
{
{ "app", "redis" },
},
},
Spec = new DeploymentSpecArgs
{
Replicas = 1,
Selector = new LabelSelectorArgs
{
MatchLabels =
{
{ "app", "redis" },
},
},
Template = new PodTemplateSpecArgs
{
Metadata = new ObjectMetaArgs
{
Labels =
{
{ "app", "redis" },
},
Annotations =
{
{ "<http://dapr.io/enabled|dapr.io/enabled>", "true" },
{ "<http://dapr.io/app-id|dapr.io/app-id>", "redis" },
{ "<http://dapr.io/app-port|dapr.io/app-port>", "6379" },
{ "<http://dapr.io/enable-api-logging|dapr.io/enable-api-logging>", "true" }
},
},
Spec = new PodSpecArgs
{
Containers =
{
new ContainerArgs
{
Name = "redis-message-broker",
Image = "<http://registry.hub.docker.com/library/redis:latest|registry.hub.docker.com/library/redis:latest>",
ImagePullPolicy = "Always",
},
},
},
},
},
}, new CustomResourceOptions()
{
Parent = this
});
How do I get the Redis secret key out of this deployment? The other problem is, that I don't know how to translate the dapr component yaml file into Pulumi resources. The Pulumi converter throws an error saying it is not able to convert. The yaml file looks like this:
Copy code
apiVersion: <http://dapr.io/v1alpha1|dapr.io/v1alpha1>
kind: Component
metadata:
  name: pubsub
  namespace: default
spec:
  type: pubsub.redis
  version: v1
  metadata:
  - name: redisHost
    value: <REPLACE WITH HOSTNAME FROM ABOVE - for Redis on Kubernetes it is redis-master.default.svc.cluster.local:6379>
  - name: redisPassword
    secretKeyRef:
      name: redis
      key: redis-password
 # uncomment below for connecting to redis cache instances over TLS (ex - Azure Redis Cache)
  # - name: enableTLS
  #   value: true
source: https://docs.dapr.io/getting-started/tutorials/configure-state-pubsub/#next-steps Did anyone of you deploy the Dapr Pub/Sub with Redis already?