Skip to content

Commit

Permalink
Allow domain mapping to succeed if DNS is pending
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
chrisst committed Jan 6, 2020
1 parent e2d493d commit 41d06c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion google/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 41d06c2

Please sign in to comment.