spec

package
v0.0.0-...-4c854f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2022 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexHostsConfigMap

func IndexHostsConfigMap(mgr ctrl.Manager) error
func IndexLables(mgr ctrl.Manager) error {
	if err := mgr.GetFieldIndexer().IndexField(
		context.Background(),
		&batchv1.Kubehosts{},
		".spec.lables",
		func(rawObj client.Object) []string {
			// Extract the ConfigMap name from the ConfigDeployment Spec, if one is provided
			kubeHosts := rawObj.(*batchv1.Kubehosts)
			if kubeHosts.Spec.Lables == nil {
				return nil
			}
			lablesString, err := json.Marshal(kubeHosts.Spec.Lables)
			if err != nil {
				return nil
			}
			return []string{string(lablesString)}
		}); err != nil {
		return err
	}
	return nil
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL