소스 검색

Add comments with links to cloud docs.

Mariano Cano 7 년 전
부모
커밋
6e4a09651a
3개의 변경된 파일과 16개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      authority/provisioner/aws.go
  2. 4 0
      authority/provisioner/azure.go
  3. 6 0
      authority/provisioner/gcp.go

+ 6 - 0
authority/provisioner/aws.go

@@ -115,6 +115,12 @@ type awsInstanceIdentityDocument struct {
 // If DisableTrustOnFirstUse is true, multiple sign request for this provisioner
 // If DisableTrustOnFirstUse is true, multiple sign request for this provisioner
 // with the same instance will be accepted. By default only the first request
 // with the same instance will be accepted. By default only the first request
 // will be accepted.
 // will be accepted.
+//
+// If InstanceAge is set, only the instances with an pendingTime within the
+// given period will be accepted.
+//
+// Amazon Identity docs are available at
+// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html
 type AWS struct {
 type AWS struct {
 	Type                   string   `json:"type"`
 	Type                   string   `json:"type"`
 	Name                   string   `json:"name"`
 	Name                   string   `json:"name"`

+ 4 - 0
authority/provisioner/azure.go

@@ -74,6 +74,10 @@ type azurePayload struct {
 // If DisableTrustOnFirstUse is true, multiple sign request for this provisioner
 // If DisableTrustOnFirstUse is true, multiple sign request for this provisioner
 // with the same instance will be accepted. By default only the first request
 // with the same instance will be accepted. By default only the first request
 // will be accepted.
 // will be accepted.
+//
+// Microsoft Azure identity docs are available at
+// https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token
+// and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service
 type Azure struct {
 type Azure struct {
 	Type                   string   `json:"type"`
 	Type                   string   `json:"type"`
 	Name                   string   `json:"name"`
 	Name                   string   `json:"name"`

+ 6 - 0
authority/provisioner/gcp.go

@@ -66,6 +66,12 @@ func newGCPConfig() *gcpConfig {
 // If DisableTrustOnFirstUse is true, multiple sign request for this provisioner
 // If DisableTrustOnFirstUse is true, multiple sign request for this provisioner
 // with the same instance will be accepted. By default only the first request
 // with the same instance will be accepted. By default only the first request
 // will be accepted.
 // will be accepted.
+//
+// If InstanceAge is set, only the instances with an instance_creation_timestamp
+// within the given period will be accepted.
+//
+// Google Identity docs are available at
+// https://cloud.google.com/compute/docs/instances/verifying-instance-identity
 type GCP struct {
 type GCP struct {
 	Type                   string   `json:"type"`
 	Type                   string   `json:"type"`
 	Name                   string   `json:"name"`
 	Name                   string   `json:"name"`