Skip to content

fix: hydra use job.serviceAccount.name when using an existing sa#768

Merged
Demonsthere merged 3 commits intoory:masterfrom
dotdc:master
May 14, 2025
Merged

fix: hydra use job.serviceAccount.name when using an existing sa#768
Demonsthere merged 3 commits intoory:masterfrom
dotdc:master

Conversation

@dotdc
Copy link
Contributor

@dotdc dotdc commented Apr 17, 2025

Related Issue or Design Document

As described in #767, this pull request will allow to use an existing Kubernetes service account for job when not creating it through the chart.

hydra:
  automigration:
    enabled: true

deployment:
  serviceAccount:
    create: false
    name: "hydra-deploy-sa"

job:
  serviceAccount:
    create: false
    name: "hydra-job-sa"

fixes #767

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

@CLAassistant
Copy link

CLAassistant commented Apr 17, 2025

CLA assistant check
All committers have signed the CLA.

Signed-off-by: David Calvert <david.calvert@hivebrite.com>
@dotdc dotdc changed the title fix(hydra): use job.serviceAccount.name when using an existing sa fix: hydra use job.serviceAccount.name when using an existing sa Apr 17, 2025
@Demonsthere
Copy link
Collaborator

Hi there!
Please add a new values.yaml here so that this case will be tested by the ci. I would suggest creating a new sa here and then load it via values :)

Signed-off-by: David Calvert <david.calvert@hivebrite.com>
@dotdc
Copy link
Contributor Author

dotdc commented Apr 24, 2025

Hi @Demonsthere,
Just added the two ServiceAccounts and copied the default values file with the added deployment.serviceAccount and job.serviceAccount blocks inside (left all the rest as is).

@dotdc
Copy link
Contributor Author

dotdc commented Apr 25, 2025

@Demonsthere CI is failing because the files are not part of the previous release,
Do you think it's worth testing this case specifically? We could also try to adapt the CI to fix it.
Wdyt?

@Demonsthere
Copy link
Collaborator

Hey @dotdc! I think the CI issue is important, as in general it blocks the addition of new values variants 🤔. It is not a blocker for this PR, but something that needs to be fixed for the next release to be working. I will add a solution to the master branch, so the tests here can pass

@Demonsthere Demonsthere merged commit 4dda408 into ory:master May 14, 2025
12 checks passed
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.

[hydra] Unable to load distinct existing Kubernetes ServiceAccounts for deployment and job

4 participants