Skip to content

Azure Key Vault integration to resolve secrets #4090

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

Merged
merged 18 commits into from
Jun 11, 2025

Conversation

nikola-jokic
Copy link
Collaborator

@nikola-jokic nikola-jokic commented May 15, 2025

This PR adds the ability to use Azure Key Vault when resolving GitHub secrets. It would be beneficial to users who don't want to use kuberenetes secrets with GitHub PAT or App credentials.

Other secrets, such as proxy credentials, listener configuration, and runner JIT tokens, are still stored as kubernetes secrets.

@nikola-jokic nikola-jokic force-pushed the nikola-jokic/key-vault branch from f9c41ce to f946cfd Compare May 15, 2025 13:41
@nikola-jokic nikola-jokic force-pushed the nikola-jokic/key-vault branch from 323eb91 to 74ed8e6 Compare June 4, 2025 18:08
@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Jun 7, 2025
@nikola-jokic nikola-jokic marked this pull request as ready for review June 10, 2025 11:25
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 11:25
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR integrates Azure Key Vault as a new source for GitHub App credentials and refactors related configuration and CRD definitions.

  • Updated the config reading flow to support context and vault lookups.
  • Refactored naming from GitHubServerTLSConfig to TLSConfig and introduced vaultConfig support in charts and CRDs.
  • Added tests and updated error messages for vault configuration and app credentials validation.

Reviewed Changes

Copilot reviewed 48 out of 48 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmd/ghalistener/main.go Updates to context management and usage of the new config reading API
cmd/ghalistener/config/config.go Modified config reading to support vault integration and pointer usage
cmd/ghalistener/config/config_validation_test.go Updated expected error strings and added vault config tests
cmd/ghalistener/config/config_client_test.go Added AppConfig to client configuration tests
cmd/ghalistener/app/app.go Changed to use pointer for config and added config validation
charts/gha-runner-scale-set/values.yaml Revised secret and vault configuration documentation in values file
charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml Introduced vaultConfig block and error handling for unsupported vault types
CRD files Added vaultConfig fields to CRDs
apis/actions.github.com/v1alpha1/* Updated TLSConfig naming, deepcopy methods, and accessor methods; updated AppConfig integration
Comments suppressed due to low confidence (1)

apis/actions.github.com/v1alpha1/ephemeralrunner_types.go:117

  • Replacing the 'GitHubServerTLS' field with 'VaultConfig' in EphemeralRunnerSpec is inconsistent with the accessor method that expects a TLSConfig. This mismatch can lead to nil dereferences; please restore or correctly rename the field to maintain consistency.
-	GitHubServerTLS *GitHubServerTLSConfig `json:"githubServerTLS,omitempty"`

@nikola-jokic nikola-jokic merged commit e46c929 into master Jun 11, 2025
19 checks passed
@nikola-jokic nikola-jokic deleted the nikola-jokic/key-vault branch June 11, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gha-runner-scale-set Related to the gha-runner-scale-set mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants