IsOpenShift returns true if the current cluster is an OpenShift (v4.x) cluster.
()
| 66 | |
| 67 | // IsOpenShift returns true if the current cluster is an OpenShift (v4.x) cluster. |
| 68 | func IsOpenShift() bool { |
| 69 | if !initialized { |
| 70 | panic("Attempting to determine information about the cluster without initializing first") |
| 71 | } |
| 72 | return current == OpenShiftv4 |
| 73 | } |
| 74 | |
| 75 | func detect() (Type, error) { |
| 76 | kubeCfg, err := config.GetConfig() |
no outgoing calls
no test coverage detected