feat: add runtimeclass control

Signed-off-by: Oliver Baehler <oliver.baehler@hotmail.com>
This commit is contained in:
Oliver Bähler
2022-12-28 15:01:28 +01:00
committed by GitHub
parent ee0fdc9efa
commit 79391f863a
15 changed files with 3754 additions and 2000 deletions

View File

@@ -35,6 +35,8 @@ type TenantSpec struct {
AdditionalRoleBindings []api.AdditionalRoleBindingsSpec `json:"additionalRoleBindings,omitempty"`
// Specify the allowed values for the imagePullPolicies option in Pod resources. Capsule assures that all Pod resources created in the Tenant can use only one of the allowed policy. Optional.
ImagePullPolicies []api.ImagePullPolicySpec `json:"imagePullPolicies,omitempty"`
// Specifies the allowed RuntimeClasses assigned to the Tenant. Capsule assures that all Pods resources created in the Tenant can use only one of the allowed RuntimeClasses. Optional.
RuntimeClasses *api.SelectorAllowedListSpec `json:"runtimeClasses,omitempty"`
// Specifies the allowed priorityClasses assigned to the Tenant. Capsule assures that all Pods resources created in the Tenant can use only one of the allowed PriorityClasses. Optional.
PriorityClasses *api.SelectorAllowedListSpec `json:"priorityClasses,omitempty"`
// Toggling the Tenant resources cordoning, when enable resources cannot be deleted.

View File

@@ -749,6 +749,11 @@ func (in *TenantSpec) DeepCopyInto(out *TenantSpec) {
*out = make([]api.ImagePullPolicySpec, len(*in))
copy(*out, *in)
}
if in.RuntimeClasses != nil {
in, out := &in.RuntimeClasses, &out.RuntimeClasses
*out = new(api.SelectorAllowedListSpec)
(*in).DeepCopyInto(*out)
}
if in.PriorityClasses != nil {
in, out := &in.PriorityClasses, &out.PriorityClasses
*out = new(api.SelectorAllowedListSpec)