Open sreeboppana opened 1 month ago
Hello
Could you verify if KEDA has the required environment variables added by the eks mutating webhook?
Please, share the output of kubectl describe pod KEDA_OPERATOR_POD -n KEDA_NAMESPACE
removing sensitive data
thanks @JorTurFer please refer to the output of kubectl describe po keda-operator-5b48dfb687-b7xcx -n keda
$ kubectl describe po keda-operator-5b48dfb687-b7xcx -n keda
Name: keda-operator-5b48dfb687-b7xcx
Namespace: keda
Priority: 0
Node: ip-100-66-9-70.ec2.internal/100.66.9.70
Start Time: Tue, 05 Nov 2024 07:40:10 -0500
Labels: app=keda-operator
app.kubernetes.io/component=operator
app.kubernetes.io/instance=keda-operator
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=keda-operator
app.kubernetes.io/part-of=keda-operator
app.kubernetes.io/version=2.14.0
helm.sh/chart=keda-2.14.2
name=keda-operator
pod-template-hash=5b48dfb687
Annotations: kubectl.kubernetes.io/restartedAt: 2024-10-31T09:06:59+01:00
Status: Running
IP: 172.22.199.48
IPs:
IP: 172.22.199.48
Controlled By: ReplicaSet/keda-operator-5b48dfb687
Containers:
keda-operator:
Container ID: containerd://94334ff68a5dab55f2c32a1f10a54230eaa2139ff2654fa20c858cf5b31c5dc8
Image: ghcr.io/kedacore/keda:2.14.0
Image ID: ghcr.io/kedacore/keda@sha256:c74847dd7c2a62d6a3ad0631208dab53264cec4eb0fc5ac3f41d4852ee363bf6
Ports: 8080/TCP, 9666/TCP
Host Ports: 0/TCP, 0/TCP
Command:
/keda
Args:
--leader-elect
--disable-compression=true
--zap-log-level=info
--zap-encoder=console
--zap-time-encoding=rfc3339
--cert-dir=/certs
--enable-cert-rotation=true
--cert-secret-name=kedaorg-certs
--operator-service-name=keda-operator
--metrics-server-service-name=keda-operator-metrics-apiserver
--webhooks-service-name=keda-admission-webhooks
--k8s-cluster-name=kubernetes-default
--k8s-cluster-domain=cluster.local
--enable-prometheus-metrics=true
--metrics-bind-address=:8080
State: Running
Started: Tue, 05 Nov 2024 07:40:13 -0500
Ready: True
Restart Count: 0
Limits:
cpu: 2
memory: 8Gi
Requests:
cpu: 1
memory: 8Gi
Liveness: http-get http://:8081/healthz delay=25s timeout=1s period=10s #success=1 #failure=3
Readiness: http-get http://:8081/readyz delay=20s timeout=1s period=3s #success=1 #failure=3
Environment:
WATCH_NAMESPACE:
POD_NAME: keda-operator-5b48dfb687-b7xcx (v1:metadata.name)
POD_NAMESPACE: keda (v1:metadata.namespace)
OPERATOR_NAME: keda-operator
KEDA_HTTP_DEFAULT_TIMEOUT: 3000
KEDA_HTTP_MIN_TLS_VERSION: TLS12
AWS_STS_REGIONAL_ENDPOINTS: regional
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ROLE_ARN: arn:aws:iam::REDACTED:role/keda-operator-iam-role-us-east-1
AWS_WEB_IDENTITY_TOKEN_FILE: /var/run/secrets/eks.amazonaws.com/serviceaccount/token
Mounts:
/certs from certificates (ro)
/mnt/kafka-secret from kafka-secret (ro)
/var/run/secrets/eks.amazonaws.com/serviceaccount from aws-iam-token (ro)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-m9vcm (ro)
Conditions:
Type Status
PodReadyToStartContainers True
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
aws-iam-token:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 86400
certificates:
Type: Secret (a volume populated by a Secret)
SecretName: kedaorg-certs
Optional: true
kafka-secret:
Type: CSI (a Container Storage Interface (CSI) volume source)
Driver: secrets-store.csi.k8s.io
FSType:
ReadOnly: true
VolumeAttributes: secretProviderClass=keda-kafka-secretproviderclass
kube-api-access-m9vcm:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Burstable
Node-Selectors: kubernetes.io/os=linux
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events: <none>
@JorTurFer please verify the output of the describe pod
output above and advise. thanks
i just gone through this https://keda.sh/docs/2.14/operate/cluster/
are you recommending adding the below env to keda-operator (keda
namespace) ?
env:
- name: KEDA_RESTRICT_SECRET_ACCESS
value: "true"
Do you see any connection error on your Kafka that brings any extra info? The envs vars look correct
i just gone through this keda.sh/docs/2.14/operate/cluster are you recommending adding the below env to keda-operator (
keda
namespace) ?env: - name: KEDA_RESTRICT_SECRET_ACCESS value: "true"
It depends on your scenario, limiting the envs can break your SO if they read secrets from the cluster
Report
Keda version: keda:2.14.0 ghcr.io/kedacore/keda:2.14.0 kubenetes version: 1.29
keda TriggerAuth is unable to read the Secrets from AWS secretsManager though provided the correct secretName & secret parameter.
Expected Behavior
Keda should have read the secrets from AWS secrets Manager.
Verified that the secret Name is valid and present with in the AWS region's SecretsManager matches to that of the one configured within TriggerAuth.yaml
The secret Name :
service/test-svc/svc-api-key-path
existed within the intended aws regions's SecretsManager.the target AWS secrets manager secret (service/test-svc/svc-api-key-path) is of the form: { "api-key":"MY-SECRET-KEY", "api-secret":"MY-SECRET--VAL" }
Actual Behavior
Steps to Reproduce the Problem
Goal: Use Keda triggerAuth AWs secretsManager to read secrets and be able to scale Kafka.
Keda version: keda:2.14.0 ghcr.io/kedacore/keda:2.14.0 kubenetes version: 1.29
STEP-1 - triggerauth.yaml
the target AWS secrets manager secret (service/test-svc/svc-api-key-path) is of the form: { "api-key":"MY-SECRET-KEY", "api-secret":"MY-SECRET--VAL" }
basically we are trying retrieve the api-key and api-secret values for that response above.
Deployed the resources and then keda operator logs are shown below: as per the documentation https://keda.sh/docs/2.14/concepts/authentication/
The secrets list within awsSecretManager defines the mapping between the AWS Secret Manager secret and the authentication parameter used in your application, including the parameter name, AWS Secret Manager secret name, and an optional version parameter, defaulting to the latest version if unspecified.
Logs from KEDA operator
KEDA Version
2.14.0
Kubernetes Version
1.29
Platform
Amazon Web Services
Scaler Details
kafka
Anything else?
Verified that the secret Name is valid and present with in the AWS region's SecretsManager matches to that of the one configured within TriggerAuth.yaml The secret Name :
service/test-svc/svc-api-key-path
existed within the intended aws regions's SecretsManager.