-
Notifications
You must be signed in to change notification settings - Fork 80
/
install.go
33 lines (26 loc) · 881 Bytes
/
install.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
package install
import (
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"github.com/gardener/gardener-extension-provider-openstack/pkg/apis/openstack"
"github.com/gardener/gardener-extension-provider-openstack/pkg/apis/openstack/v1alpha1"
)
var (
schemeBuilder = runtime.NewSchemeBuilder(
v1alpha1.AddToScheme,
openstack.AddToScheme,
setVersionPriority,
)
// AddToScheme adds all APIs to the scheme.
AddToScheme = schemeBuilder.AddToScheme
)
func setVersionPriority(scheme *runtime.Scheme) error {
return scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion)
}
// Install installs all APIs in the scheme.
func Install(scheme *runtime.Scheme) {
utilruntime.Must(AddToScheme(scheme))
}