@@ -116,12 +116,12 @@ func InspectCluster() error {
116116 return stderrors .Join (errs ... )
117117}
118118
119- // used as a shortcut to check if the Config.Openshift .io API is found
119+ // IsConfigAPIFound return true if the CRD config.openshift .io is available in the cluster and false otherwise.
120120func IsConfigAPIFound () bool {
121121 return configAPIFound
122122}
123123
124- // used as a shortcut to check if the cluster is an OpenShift cluster
124+ // IsOpenShiftCluster uses IsConfigAPIFound to check if the cluster is an OpenShift cluster.
125125func IsOpenShiftCluster () bool {
126126 return IsConfigAPIFound ()
127127}
@@ -136,6 +136,7 @@ func verifyConfigAPI() error {
136136 return nil
137137}
138138
139+ // IsConsoleAPIFound return true if the CRD console.openshift.io is available in the cluster.
139140func IsConsoleAPIFound () bool {
140141 return consoleAPIFound
141142}
@@ -149,6 +150,7 @@ func verifyConsoleAPI() error {
149150 return nil
150151}
151152
153+ // IsRouteAPIFound return true if the CRD route.openshift.io is available in the cluster.
152154func IsRouteAPIFound () bool {
153155 return routeAPIFound
154156}
@@ -174,10 +176,12 @@ func verifyMonitoringAPI() error {
174176 return nil
175177}
176178
179+ // IsMonitoringAPIFound return true if the CRD monitoring.coreos.com is available in the cluster.
177180func IsMonitoringAPIFound () bool {
178181 return monitoringAPIFound
179182}
180183
184+ // IsTemplateAPIFound return true if the CRD template.openshift.io is available in the cluster.
181185func IsTemplateAPIFound () bool {
182186 return templateAPIFound
183187}
@@ -191,6 +195,7 @@ func verifyTemplateAPI() error {
191195 return nil
192196}
193197
198+ // IsAppsAPIFound return true if the CRD apps.openshift.io is available in the cluster.
194199func IsAppsAPIFound () bool {
195200 return appsAPIFound
196201}
@@ -204,6 +209,7 @@ func verifyAppsAPI() error {
204209 return nil
205210}
206211
212+ // IsOAuthAPIFound return true if the CRD oauth.openshift.io is available in the cluster.
207213func IsOAuthAPIFound () bool {
208214 return oauthAPIFound
209215}
@@ -217,6 +223,7 @@ func verifyOAuthAPI() error {
217223 return nil
218224}
219225
226+ // IsOLMAPIFound return true if the CRD operators.coreos.com is available in the cluster.
220227func IsOLMAPIFound () bool {
221228 return olmAPIFound
222229}
0 commit comments