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

🚀 Add support for labels & annotations to AgentDeployment #494

Merged
merged 11 commits into from
Oct 22, 2024

Conversation

sheneska
Copy link
Contributor

@sheneska sheneska commented Oct 11, 2024

Description

This PR allows configuring annotations and labels for the agent pods deployed by the AgentPool controller.

Usage Example

apiVersion: app.terraform.io/v1alpha2
kind: AgentPool
metadata:
  name: this
spec:
  name: this
  organization: kubernetes-operator
  token:
    secretKeyRef:
      name: tfc-operator
      key: org-token
  agentTokens:
    - name: alpha
  agentDeployment:
    replicas: 1
      labels:
        azure.workload.identity/use: "true"
      annotations:
        azure.workload.identity/service-account-token-expiration: 3600

References

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.

@sheneska sheneska requested a review from a team as a code owner October 11, 2024 14:52
@arybolovlev arybolovlev marked this pull request as draft October 14, 2024 07:10
Copy link
Contributor

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

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

I’ve left some comments, and a few things were missed:

  • We should add basic validations for annotations and labels. At least, we need to make sure their keys and values are not empty. If we don't, it could cause problems with the deployment and make it harder to find.

  • Don’t forget to update the Agent Pool CRD.

  • Change logs! :)

Let me know if you want to make this change with multiple PRs or one. For now, it looks like one PR for all changes, however, it is unfinished.

@arybolovlev
Copy link
Contributor

arybolovlev commented Oct 14, 2024

@sheneska sheneska force-pushed the customizing-agentdeployment branch from 1575aa2 to d06cd5e Compare October 15, 2024 03:59
@github-actions github-actions bot added documentation Improvements or additions to documentation crd helm-chart size/M and removed size/S labels Oct 15, 2024
@sheneska sheneska marked this pull request as ready for review October 15, 2024 21:05
@sheneska sheneska changed the title Update Agent Pool controller schema & API 🚀 Add support for labels & annotations to AgentDeployment Oct 15, 2024
Copy link
Contributor

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

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

Thank for this change! 🚀

@arybolovlev arybolovlev merged commit e684243 into main Oct 22, 2024
10 checks passed
@arybolovlev arybolovlev deleted the customizing-agentdeployment branch October 22, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants