keda
keda copied to clipboard
Allow configMapRef in the Trigger metadata
Proposal
Currently in Trigger configuration we have a field authenticationRef
that allows to reference secrets that are defined externally.
I would like to be able to do the same thing for the Trigger metadata field.
Use-Case
I am using Kafka scaler will following configuration (I truncated most configuration fields for clarity):
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: my-app
spec:
maxReplicaCount: 3
scaleTargetRef:
name: my-app
triggers:
- type: kafka
metadata:
bootstrapServers: kafka.localdomain:9092
lagThreshold: "10"
authenticationRef:
name: my-app
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: my-app
spec:
secretTargetRef:
- parameter: username
name: kafka-auth
key: KAFKA_JAAS_USER
- parameter: password
name:kafka-auth
key: KAFKA_JAAS_PASSWORD
The Secret ( kafka-auth ) is defined in the cluster environment, it is provisioned independently of the application.
The ScaledObject and TriggerAuthentication are part of the Application lifecycle. They are part of shared deployment template used by the development Teams. The developers can manage it's configuration (for example, change the values of maxReplicaCount
or lagThreshold
).
However, the Developer typically will not configure metadata.bootstrapServers
, since that is related to the environment and closely linked to the authentication parameters.
Also this variable is typically shared (all microservices deployed to the namespace connect to the same bootstrap server).
What I would like to do is put fields like bootstrapServers (or sasl, tls configuration) in the environment and reference it from the ScaledObject as such instead:
triggers:
- type: kafka
metadata:
bootstrapServers:
configMapRef:
- name: kafka-config
key: bootstrapServers
(or similar)
RIght now, that does not seem possible.
Is this a feature you are interested in implementing yourself?
Maybe
Anything else?
No response
This is a good idea, but would need to be available for all scalers and related parameters IMO.
@kedacore/keda-maintainers thoughts?
Created https://github.com/kedacore/keda/issues/5233 to consolidate proposals
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Isn't this fixed by https://github.com/kedacore/keda/pull/5111?
Jup, duplicate of https://github.com/kedacore/keda/issues/4830