forked from gardener/gardener
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcrd.go
More file actions
36 lines (30 loc) · 1015 Bytes
/
crd.go
File metadata and controls
36 lines (30 loc) · 1015 Bytes
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
34
35
36
// SPDX-FileCopyrightText: SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
package machinecontrollermanager
import (
_ "embed"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/gardener/gardener/pkg/component"
"github.com/gardener/gardener/pkg/component/crddeployer"
)
var (
//go:embed templates/crd-machine.sapcloud.io_machineclasses.yaml
machineClassCRD string
//go:embed templates/crd-machine.sapcloud.io_machinedeployments.yaml
machineDeploymentCRD string
//go:embed templates/crd-machine.sapcloud.io_machinesets.yaml
machineSetCRD string
//go:embed templates/crd-machine.sapcloud.io_machines.yaml
machineCRD string
)
// NewCRD can be used to deploy the CRD definitions for the machine-controller-manager.
func NewCRD(client client.Client) (component.DeployWaiter, error) {
crdResources := []string{
machineClassCRD,
machineDeploymentCRD,
machineSetCRD,
machineCRD,
}
return crddeployer.New(client, crdResources, true)
}