Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update CRDs for BoundServiceAccountToken triggerAuth provider #701

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maxcao13
Copy link

@maxcao13 maxcao13 commented Nov 6, 2024

Updates CRDs to support BoundServiceAccountToken trigger auth provider/source. Also adds a helm value of type array called serviceAccountTokenCreationRoles which allows you to add objects of name and namespace corresponding to service accounts in the cluster that you'd like the keda-operator to be able to request service account tokens from.

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • [N/A] README is updated with new configuration values (if applicable) learn more
  • A PR is opened to update KEDA core (repo) (if applicable, ie. when deployment manifests are modified)

Related to kedacore/keda#6272

@maxcao13 maxcao13 requested a review from a team as a code owner November 6, 2024 00:39
@maxcao13 maxcao13 force-pushed the bound-service-account-token branch from 9a06a5d to 923b1d2 Compare November 29, 2024 18:45
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As default, KEDA doesn't have permission in the RBAC to create these tokens (and not granting it as default is worth IMHO), but maybe we could add an option to include the required permissions if users enable them (requiring explicit activation to include the required extra RBAC)

The array allows users to supply KEDA with the names and namespaces of service accounts that they would like the keda-operator to request tokens from. These service account tokens are then used in turn for the boundServiceAccountToken trigger source

Signed-off-by: Max Cao <[email protected]>
@maxcao13 maxcao13 force-pushed the bound-service-account-token branch from 923b1d2 to bac167e Compare February 4, 2025 07:40
@maxcao13
Copy link
Author

maxcao13 commented Feb 4, 2025

Added a helm value of serviceAccountTokenCreationRoles which allows you to add objects of name and namespace corresponding to service accounts in the cluster that you'd like the keda-operator to be able to request service account tokens from. This is in: bac167e

I'm sort of new to writing helm charts, so please let me know if a restructure or renaming is needed here.

@@ -146,4 +146,51 @@ subjects:
- kind: ServiceAccount
name: {{ (.Values.serviceAccount.operator).name | default .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
{{- if .Values.serviceAccountTokenCreationRoles }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure minimal-rbac.yaml is the correct place for this

@jkremser could you please suggest the best approach here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants