-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcommon.go
More file actions
46 lines (36 loc) · 1.8 KB
/
Copy pathcommon.go
File metadata and controls
46 lines (36 loc) · 1.8 KB
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
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: Apache-2.0
package v1alpha1
import (
networkingv1alpha1 "github.com/ironcore-dev/ironcore/api/networking/v1alpha1"
storagev1alpha1 "github.com/ironcore-dev/ironcore/api/storage/v1alpha1"
corev1 "k8s.io/api/core/v1"
)
const (
NamespaceMachinePoolLease = "ironcore-machinepool-lease"
)
const (
MachineMachinePoolRefNameField = "spec.machinePoolRef.name"
MachineMachineClassRefNameField = "spec.machineClassRef.name"
// MachinePoolsGroup is the system rbac group all machine pools are in.
MachinePoolsGroup = "compute.ironcore.dev:system:machinepools"
// MachinePoolUserNamePrefix is the prefix all machine pool users should have.
MachinePoolUserNamePrefix = "compute.ironcore.dev:system:machinepool:"
SecretTypeIgnition = corev1.SecretType("compute.ironcore.dev/ignition")
)
// MachinePoolCommonName constructs the common name for a certificate of a machine pool user.
func MachinePoolCommonName(name string) string {
return MachinePoolUserNamePrefix + name
}
// EphemeralNetworkInterfaceSource is a definition for an ephemeral (i.e. coupled to the lifetime of the surrounding
// object) networking.NetworkInterface.
type EphemeralNetworkInterfaceSource struct {
// NetworkInterfaceTemplate is the template definition of the networking.NetworkInterface.
NetworkInterfaceTemplate *networkingv1alpha1.NetworkInterfaceTemplateSpec `json:"networkInterfaceTemplate,omitempty"`
}
// EphemeralVolumeSource is a definition for an ephemeral (i.e. coupled to the lifetime of the surrounding object)
// storage.Volume.
type EphemeralVolumeSource struct {
// VolumeTemplate is the template definition of the storage.Volume.
VolumeTemplate *storagev1alpha1.VolumeTemplateSpec `json:"volumeTemplate,omitempty"`
}