How to add annotations to the pods in cluster #1097
Replies: 4 comments
-
Hi, @MateoSegura What's the version of EMQX operator do you use ? |
Beta Was this translation helpful? Give feedback.
-
Hello @Rory-Z, thanks for your response. I am using |
Beta Was this translation helpful? Give feedback.
-
I'm also trying to get vault to inject authentication tokens into an emqx cluster deployment, but are running into similar issues where the annotations for the individual pods in that cluster are not being picked up by the emqx operator. My understanding is that a cluster deployment will create instances of pods similar to how I'm creating an individual pod right now (by doing a custom deployment, and using Kubernetes annotations as specified by hashicorp here) And when I look at my pod I can see the emqx container, as well as the vault injector side car container. Is there a way to get this behavior to also work with the available CRDs offered by the emqx operator? I'm using the same operator version as @MateoSegura |
Beta Was this translation helpful? Give feedback.
-
Hi @MateoSegura @mwarnerdotme I'm sorry I didn't reappear your issue. I'm install EMQX operator 2.2.26 in Kind, and create EMQX use follow YAML file: apiVersion: apps.emqx.io/v2beta1
kind: EMQX
metadata:
name: emqx-cluster
spec:
image: emqx/emqx:5.3.0
imagePullPolicy: IfNotPresent
coreTemplate:
metadata:
annotations:
vault.hashicorp.com/agent-inject: 'true'
vault.hashicorp.com/role: 'my-role'
vault.hashicorp.com/agent-inject-secret-server.key: 'kv/secret'
spec:
replicas: 2 And check Pod's annotations, I got this:
Looks good. Could you please check EMQX's pod manager fields by |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, I am using vault side car injector feature to place the TLS certificates for my broker inside of each pod in a cluster deployment.
I've gotten this to work when I deploy a single instance of EMQX manually (meaning creating a k8s deployment by hand), but when I try to use the operator, I'm having trouble setting the annotations, here's what I have so far:
emqx-cluster.yaml
But when I look at my pods, the annotations are not there, and no side car containers are injected. When I run
kubectl describe deployment
I get this:Beta Was this translation helpful? Give feedback.
All reactions