GetJobEnabledPluginNames gets the name of the plugins that are available to the job container
()
| 114 | |
| 115 | // GetJobEnabledPluginNames gets the name of the plugins that are available to the job container |
| 116 | func (cluster *Cluster) GetJobEnabledPluginNames() (result []string) { |
| 117 | var instance []string |
| 118 | for _, pluginStatus := range cluster.Status.PluginStatus { |
| 119 | if slices.Contains(pluginStatus.Capabilities, |
| 120 | identity.PluginCapability_Service_TYPE_INSTANCE_JOB_SIDECAR_INJECTION.String()) { |
| 121 | instance = append(instance, pluginStatus.Name) |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | enabled := GetPluginConfigurationEnabledPluginNames(cluster.Spec.Plugins) |
| 126 | |
| 127 | var instanceEnabled []string |
| 128 | for _, pluginName := range instance { |
| 129 | if slices.Contains(enabled, pluginName) { |
| 130 | instanceEnabled = append(instanceEnabled, pluginName) |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | return instanceEnabled |
| 135 | } |
| 136 | |
| 137 | // GetExternalClustersEnabledPluginNames gets the name of the plugins that are |
| 138 | // involved in the reconciliation of this external cluster list. This |
no test coverage detected