Skip to content

Conversation

arybolovlev
Copy link
Collaborator

@arybolovlev arybolovlev commented Aug 4, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

No.

Description

This PR introduces a new controller that enables the management of Agent tokens across arbitrary Agent Pools. The controller can either fully manage the tokens for a pool or merge its tokens with any existing ones. In the latter case, the controller will manage only its own tokens, leaving the others unchanged.

This solution allows the operator to run on multiple clusters and sync tokens for the same pool, with each cluster having its own token(s) for agents.

Usage Example

apiVersion: app.terraform.io/v1alpha2
kind: AgentToken
metadata:
  name: this
spec:
  organization: kubernetes-operator
  token:
    secretKeyRef:
      name: hcp-terraform-operator
      key: token
  agentPool:
    name: multik
  agentTokens:
  - name: token-a
  - name: token-b
  secretName: this
  deletionPolicy: retain
  managementPolicy: merge

References

Partially addresses issue #585.

Community Note

  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

@arybolovlev arybolovlev requested a review from a team as a code owner August 4, 2025 12:59
@arybolovlev arybolovlev added this to the v2.10.0 milestone Aug 4, 2025
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Aug 4, 2025
@arybolovlev arybolovlev marked this pull request as draft August 4, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api crd documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code golang helm-chart size/XL test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant