Skip to content

Commit

Permalink
Allow domain mapping to succeed if DNS is pending (#2917)
Browse files Browse the repository at this point in the history
Merged PR #2917.
  • Loading branch information
chrisst authored and modular-magician committed Jan 6, 2020
1 parent b7221e4 commit 764c68b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
7 changes: 6 additions & 1 deletion third_party/terraform/utils/cloudrun_polling.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func (s KnativeStatus) LatestMessage() string {
func (s KnativeStatus) State(res interface{}) string {
for _, condition := range s.Status.Conditions {
if condition.Type == "Ready" {
// DomainMapping can enter a 'terminal' state of waiting for external verification
// of DNS records.
if condition.Reason == "CertificatePending" {
return "Ready:CertificatePending"
}
return fmt.Sprintf("%s:%s", condition.Type, condition.Status)
}
}
Expand All @@ -76,7 +81,7 @@ func (p *CloudRunPolling) PendingStates() []string {
return []string{"Ready:Unknown", "Empty"}
}
func (p *CloudRunPolling) TargetStates() []string {
return []string{"Ready:True"}
return []string{"Ready:True", "Ready:CertificatePending"}
}
func (p *CloudRunPolling) ErrorStates() []string {
return []string{"Ready:False"}
Expand Down

0 comments on commit 764c68b

Please sign in to comment.