You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both say "allows you to provide the role name using an annotation on a service account associated with your pod."
Providing a role name via annotation (IRSA) is an old way. The new way is Pod Identity - it does not involve annotations. Why is it marked as "deprecated" ?
fails with "error getting service account: 'human-risk-scores-scheduled-sqs-worker', error: annotation 'eks.amazonaws.com/role-arn' not found" which is expected.
Expected Behavior
It should use the service account mentioned in the ScalingJob template (identityOwner: workload).
The service account had Pod Identity attached - this scaler has necessary SQS permissions.
Actual Behavior
fails with error parsing SQS queue metadata: awsAccessKeyID not found .
Steps to Reproduce the Problem
Apply
---
apiVersion: keda.sh/v1alpha1kind: TriggerAuthenticationmetadata:
name: some-scheduled-sqs-workernamespace: "human-risk"spec:
podIdentity:
provider: aws-eksidentityOwner: workload
---
apiVersion: keda.sh/v1alpha1kind: ScaledJobmetadata:
name: some-scheduled-sqs-workerspec:
jobTargetRef:
parallelism: 1# [max number of desired pods](https://kubernetes.io/docs/concepts/workloads/controllers/job/#controlling-parallelism)completions: 1# [desired number of successfully finished pods](https://kubernetes.io/docs/concepts/workloads/controllers/job/#controlling-parallelism)activeDeadlineSeconds: 600# Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integerbackoffLimit: 6# Specifies the number of retries before marking this job failed. Defaults to 6template:
# describes the [job template](https://kubernetes.io/docs/concepts/workloads/controllers/job)metadata:
spec:
containers:
- name: scheduled-sqs-workerimage: somecommand:
- ./run_scheduled_worker.shports:
- name: httpcontainerPort: 8080protocol: TCPenvFrom:
- configMapRef:
name: someenv:
- name: POD_NAMEvalueFrom:
fieldRef:
apiVersion: v1fieldPath: metadata.name
- name: POD_NAMESPACEvalueFrom:
fieldRef:
apiVersion: v1fieldPath: metadata.namespace
- name: POD_NODENAMEvalueFrom:
fieldRef:
apiVersion: v1fieldPath: spec.nodeName
- name: POD_SERVICEACCOUNTNAMEvalueFrom:
fieldRef:
apiVersion: v1fieldPath: spec.serviceAccountName
- name: CONTAINER_CPU_REQUESTvalueFrom:
resourceFieldRef:
containerName: scheduled-sqs-workerresource: requests.cpudivisor: '0'
- name: CONTAINER_CPU_LIMITvalueFrom:
resourceFieldRef:
containerName: scheduled-sqs-workerresource: limits.cpudivisor: '0'
- name: CONTAINER_MEM_REQUESTvalueFrom:
resourceFieldRef:
containerName: scheduled-sqs-workerresource: requests.memorydivisor: '0'
- name: CONTAINER_MEM_LIMITvalueFrom:
resourceFieldRef:
containerName: scheduled-sqs-workerresource: limits.memorydivisor: '0'
- name: JSM_API_KEYvalueFrom:
secretKeyRef:
name: somekey: JSM_API_KEYoptional: false
- name: KAFKA_BROKERSvalueFrom:
secretKeyRef:
name: somekey: KAFKA_BROKERSoptional: falseresources: {}livenessProbe:
exec:
command:
- cat
- /code/readyinitialDelaySeconds: 60timeoutSeconds: 10periodSeconds: 30successThreshold: 1failureThreshold: 5terminationMessagePath: /dev/termination-logterminationMessagePolicy: FileimagePullPolicy: IfNotPresentsecurityContext:
capabilities:
add:
- NET_BIND_SERVICEdrop:
- ALLreadOnlyRootFilesystem: falseallowPrivilegeEscalation: falserestartPolicy: AlwaysterminationGracePeriodSeconds: 30dnsPolicy: ClusterFirstserviceAccountName: someserviceAccount: somesecurityContext:
runAsUser: 1000runAsNonRoot: truefsGroup: 2000affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/instance: some-scheduled-sqs-workerapp.kubernetes.io/name: scheduled-sqs-workertopologyKey: topology.kubernetes.io/zone
- weight: 100podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/instance: some-scheduled-sqs-workerapp.kubernetes.io/name: scheduled-sqs-workertopologyKey: kubernetes.io/hostnamepollingInterval: 30# Optional. Default: 30 secondssuccessfulJobsHistoryLimit: 10# Optional. Default: 100. How many completed jobs should be kept.failedJobsHistoryLimit: 10# Optional. Default: 100. How many failed jobs should be kept.# envSourceContainerName: {container-name} # Optional. Default: .spec.JobTargetRef.template.spec.containers[0]minReplicaCount: 0# Optional. Default: 0maxReplicaCount: 100# Optional. Default: 100# rolloutStrategy: gradual # Deprecated: Use rollout.strategy instead (see below).rollout:
strategy: gradual # Optional. Default: default. Which Rollout Strategy KEDA will use.propagationPolicy: background # Optional. Default: background. Kubernetes propagation policy for cleaning up existing jobs during rollout.# scalingStrategy:# strategy: "custom" # Optional. Default: default. Which Scaling Strategy to use. # customScalingQueueLengthDeduction: 1 # Optional. A parameter to optimize custom ScalingStrategy.# customScalingRunningJobPercentage: "0.5" # Optional. A parameter to optimize custom ScalingStrategy.# pendingPodConditions: # Optional. A parameter to calculate pending job count per the specified pod conditions# - "Ready"# - "PodScheduled"# - "AnyOtherCustomPodCondition"# multipleScalersCalculation : "max" # Optional. Default: max. Specifies how to calculate the target metrics when multiple scalers are defined.triggers:
# https://keda.sh/docs/2.16/scalers/aws-sqs/
- type: aws-sqs-queueauthenticationRef:
name: some-scheduled-sqs-workermetadata:
queueLength: "1"# TODO: Change this to the actual queue lengthqueueURLFromEnv: SCHEDULED_JOBS_SQS_URLawsRegion: eu-west-2
Have Pod identity attached to some to serviceAccount
Observe "error parsing SQS queue metadata: awsAccessKeyID not found"
Report
https://keda.sh/docs/2.16/concepts/authentication/#aws-pod-identity-webhook-for-aws
provder: aws
.https://keda.sh/docs/2.16/concepts/authentication/#aws-eks-pod-identity-webhook (deprecated)
provider: aws-eks
.Both say "allows you to provide the role name using an annotation on a service account associated with your pod."
Providing a role name via annotation (IRSA) is an old way. The new way is Pod Identity - it does not involve annotations. Why is it marked as "deprecated" ?
When using pod identities:
fails with
error parsing SQS queue metadata: awsAccessKeyID not found
.fails with "error getting service account: 'human-risk-scores-scheduled-sqs-worker', error: annotation 'eks.amazonaws.com/role-arn' not found" which is expected.
Expected Behavior
It should use the service account mentioned in the ScalingJob template (
identityOwner: workload
).The service account had Pod Identity attached - this scaler has necessary SQS permissions.
Actual Behavior
fails with
error parsing SQS queue metadata: awsAccessKeyID not found
.Steps to Reproduce the Problem
Apply
some
toserviceAccount
Logs from KEDA operator
KEDA Version
2.16.0
Kubernetes Version
1.29
Platform
Amazon Web Services
Scaler Details
SQS
Anything else?
I am new to Keda, but am an experienced Kubernetes user. Maybe I misunderstood smth from documentation. The part I mentioned is really misleading.
The text was updated successfully, but these errors were encountered: