-
Notifications
You must be signed in to change notification settings - Fork 67
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: Add kubernetes agent deployment target #636
Conversation
"dependencies": { | ||
Optional: true, | ||
Type: schema.TypeMap, | ||
Description: "Optional map of dependencies that when modified will trigger a re-creation of this resource.", | ||
ForceNew: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this in combination with a replace_triggered_by
lifecycle hook on the helm release resource will allow the agent to "re-register" (It actually a re-install) so you could rotate the certificate and subscription IDs if you wanted to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me! I'm not super confident on reviewing terraform so I'm going to give an approve, but might be worth getting 👀 from someone who's more familiar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did have some reservations about the new octopusdeploy_tentacle_certificate
resource, but after looking at what we would need to do with the built-in cert I think the trade off for simplicity is ok, particularly given the reversable nature of this addition.
I haven't flagged as request changes
but have included a comment to add some more notes to the documentation template. Feel free to merge once this is done.
``` | ||
- Optional - Install delve https://github.com/go-delve/delve | ||
|
||
### Via Goland |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one. Ill include the VsCode docs details in a follow up
Generates a X509Certificate for use with a Octopus Deploy Tentacle. | ||
--- | ||
|
||
# octopusdeploy_tentacle_certificate (Resource) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where the template for this file is, but it would be worth outlining that this certificate is self-signed and should not be used for other purposes.
Feel free to adjust the below as necessary for phrasing.
##Octopus certificates
The X.509 certificates generated are self-signed, 2048-bit private keys and intended for use [only between Octopus Server and Tentacle](https://octopus.com/docs/security/octopus-tentacle-communication#Octopus-Tentaclecommunication-Octopuscertificates) communications. There is an insightful discussion of [why Octopus uses self-signed certificates](https://octopus.com/blog/why-self-signed-certificates) by default.
Instead of generating a new certificate through this resource you can use an existing certificate and simply reference the appropriate thumbprint when registering the target.
### State Persistence
This resource that is generated will be stored in the state file and cannot be retrieved later from the external Octopus Server or Tentacle.
Background
To fully be able to manage the Kubernetes agent in an automated environment we need to add a new deployment target resource for it.
fixes #637
Internal Story SC-77238
Depends on OctopusDeploy/go-octopusdeploy#248 , OctopusDeploy/helm-charts#148 and OctopusDeploy/OctopusTentacle#927
Result
octopusdeploy_kubernetes_agent_deployment_target
Example usage: