@@ -77,68 +77,98 @@ func (rs *RouteStatus) MarkIngressNotConfigured() {
77
77
"IngressNotConfigured" , "Ingress has not yet been reconciled." )
78
78
}
79
79
80
+ // MarkTrafficAssigned marks the RouteConditionAllTrafficAssigned condition true.
80
81
func (rs * RouteStatus ) MarkTrafficAssigned () {
81
82
routeCondSet .Manage (rs ).MarkTrue (RouteConditionAllTrafficAssigned )
82
83
}
83
84
85
+ // MarkUnknownTrafficError marks the RouteConditionAllTrafficAssigned condition
86
+ // to indicate an error has occurred.
84
87
func (rs * RouteStatus ) MarkUnknownTrafficError (msg string ) {
85
88
routeCondSet .Manage (rs ).MarkUnknown (RouteConditionAllTrafficAssigned , "Unknown" , msg )
86
89
}
87
90
91
+ // MarkConfigurationNotReady marks the RouteConditionAllTrafficAssigned
92
+ // condition to indiciate the Revision is not yet ready.
88
93
func (rs * RouteStatus ) MarkConfigurationNotReady (name string ) {
89
94
routeCondSet .Manage (rs ).MarkUnknown (RouteConditionAllTrafficAssigned ,
90
95
"RevisionMissing" ,
91
96
"Configuration %q is waiting for a Revision to become ready." , name )
92
97
}
93
98
99
+ // MarkConfigurationFailed marks the RouteConditionAllTrafficAssigned condition
100
+ // to indicate the Revision has failed.
94
101
func (rs * RouteStatus ) MarkConfigurationFailed (name string ) {
95
102
routeCondSet .Manage (rs ).MarkFalse (RouteConditionAllTrafficAssigned ,
96
103
"RevisionMissing" ,
97
104
"Configuration %q does not have any ready Revision." , name )
98
105
}
99
106
107
+ // MarkRevisionNotReady marks the RouteConditionAllTrafficAssigned condition to
108
+ // indiciate the Revision is not yet ready.
100
109
func (rs * RouteStatus ) MarkRevisionNotReady (name string ) {
101
110
routeCondSet .Manage (rs ).MarkUnknown (RouteConditionAllTrafficAssigned ,
102
111
"RevisionMissing" ,
103
112
"Revision %q is not yet ready." , name )
104
113
}
105
114
115
+ // MarkRevisionFailed marks the RouteConditionAllTrafficAssigned condition to
116
+ // indiciate the Revision has failed.
106
117
func (rs * RouteStatus ) MarkRevisionFailed (name string ) {
107
118
routeCondSet .Manage (rs ).MarkFalse (RouteConditionAllTrafficAssigned ,
108
119
"RevisionMissing" ,
109
120
"Revision %q failed to become ready." , name )
110
121
}
111
122
123
+ // MarkMissingTrafficTarget marks the RouteConditionAllTrafficAssigned
124
+ // condition to indicate a reference traffic target was not found.
112
125
func (rs * RouteStatus ) MarkMissingTrafficTarget (kind , name string ) {
113
126
routeCondSet .Manage (rs ).MarkFalse (RouteConditionAllTrafficAssigned ,
114
127
kind + "Missing" ,
115
128
"%s %q referenced in traffic not found." , kind , name )
116
129
}
117
130
131
+ // MarkCertificateProvisionFailed marks the
132
+ // RouteConditionCertificateProvisioned condition to indicate that the
133
+ // Certificate provisioning failed.
118
134
func (rs * RouteStatus ) MarkCertificateProvisionFailed (name string ) {
119
135
routeCondSet .Manage (rs ).MarkFalse (RouteConditionCertificateProvisioned ,
120
136
"CertificateProvisionFailed" ,
121
137
"Certificate %s fails to be provisioned." , name )
122
138
}
123
139
140
+ // MarkCertificateReady marks the RouteConditionCertificateProvisioned
141
+ // condition to indicate that the Certificate is ready.
124
142
func (rs * RouteStatus ) MarkCertificateReady (name string ) {
125
143
routeCondSet .Manage (rs ).MarkTrue (RouteConditionCertificateProvisioned )
126
144
}
127
145
146
+ // MarkCertificateNotReady marks the RouteConditionCertificateProvisioned
147
+ // condition to indicate that the Certificate is not ready.
128
148
func (rs * RouteStatus ) MarkCertificateNotReady (name string ) {
129
149
routeCondSet .Manage (rs ).MarkUnknown (RouteConditionCertificateProvisioned ,
130
150
"CertificateNotReady" ,
131
151
"Certificate %s is not ready." , name )
132
152
}
133
153
154
+ // MarkCertificateNotOwned changes the RouteConditionCertificateProvisioned
155
+ // status to be false with the reason being that there is an existing
156
+ // certificate with the name we wanted to use.
134
157
func (rs * RouteStatus ) MarkCertificateNotOwned (name string ) {
135
158
routeCondSet .Manage (rs ).MarkFalse (RouteConditionCertificateProvisioned ,
136
159
"CertificateNotOwned" ,
137
160
"There is an existing certificate %s that we don't own." , name )
138
161
}
139
162
140
163
const (
141
- AutoTLSNotEnabledMessage = "autoTLS is not enabled"
164
+ // AutoTLSNotEnabledMessage is the message which is set on the
165
+ // RouteConditionCertificateProvisioned condition when it is set to True
166
+ // because AutoTLS was not enabled.
167
+ AutoTLSNotEnabledMessage = "autoTLS is not enabled"
168
+
169
+ // TLSNotEnabledForClusterLocalMessage is the message which is set on the
170
+ // RouteConditionCertificateProvisioned condition when it is set to True
171
+ // because the domain is cluster-local.
142
172
TLSNotEnabledForClusterLocalMessage = "TLS is not enabled for cluster-local"
143
173
)
144
174
0 commit comments