forked from openshift/hypershift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_ibmcloud_powervs.go
52 lines (47 loc) · 1.26 KB
/
example_ibmcloud_powervs.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package fixtures
import (
corev1 "k8s.io/api/core/v1"
crclient "sigs.k8s.io/controller-runtime/pkg/client"
)
type ExamplePowerVSOptions struct {
ApiKey string
AccountID string
ResourceGroup string
Region string
Zone string
CISInstanceCRN string
CloudInstanceID string
Subnet string
SubnetID string
CloudConnection string
VpcRegion string
Vpc string
VpcSubnet string
// nodepool related options
SysType string
ProcType string
Processors string
Memory int32
}
type ExamplePowerVSResources struct {
KubeCloudControllerCreds *corev1.Secret
NodePoolManagementCreds *corev1.Secret
ControlPlaneOperatorCreds *corev1.Secret
IngressOperatorCloudCreds *corev1.Secret
}
func (o *ExamplePowerVSResources) AsObjects() []crclient.Object {
var objects []crclient.Object
if o.KubeCloudControllerCreds != nil {
objects = append(objects, o.KubeCloudControllerCreds)
}
if o.NodePoolManagementCreds != nil {
objects = append(objects, o.NodePoolManagementCreds)
}
if o.ControlPlaneOperatorCreds != nil {
objects = append(objects, o.ControlPlaneOperatorCreds)
}
if o.IngressOperatorCloudCreds != nil {
objects = append(objects, o.IngressOperatorCloudCreds)
}
return objects
}