Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 278 additions & 0 deletions chart/templates/deploymentpolicy-crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
name: deploymentpolicies.skyhook.nvidia.com
spec:
group: skyhook.nvidia.com
names:
kind: DeploymentPolicy
listKind: DeploymentPolicyList
plural: deploymentpolicies
singular: deploymentpolicy
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: DeploymentPolicy configures safe rollout defaults and compartment
overrides
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: DeploymentPolicySpec defines rollout ceilings/strategy by
default and per-compartment
properties:
compartments:
description: Compartments, each with selector and budget; optional
strategy
items:
description: Compartment defines a named selector with its own ceiling
and optional strategy
properties:
budget:
description: Exactly one of percent or count
properties:
count:
minimum: 1
type: integer
percent:
maximum: 100
minimum: 1
type: integer
type: object
name:
description: Unique name within the policy
minLength: 1
type: string
selector:
description: Selector defining the nodes in this compartment
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
strategy:
description: Optional per-compartment strategy override
properties:
exponential:
properties:
batchThreshold:
maximum: 100
minimum: 1
type: integer
failureThreshold:
minimum: 1
type: integer
growthFactor:
minimum: 2
type: integer
initialBatch:
minimum: 1
type: integer
safetyLimit:
maximum: 100
minimum: 1
type: integer
type: object
fixed:
description: Strategy parameters
properties:
batchThreshold:
maximum: 100
minimum: 1
type: integer
failureThreshold:
minimum: 1
type: integer
initialBatch:
minimum: 1
type: integer
safetyLimit:
maximum: 100
minimum: 1
type: integer
type: object
linear:
properties:
batchThreshold:
maximum: 100
minimum: 1
type: integer
delta:
minimum: 1
type: integer
failureThreshold:
minimum: 1
type: integer
initialBatch:
minimum: 1
type: integer
safetyLimit:
maximum: 100
minimum: 1
type: integer
type: object
type: object
required:
- budget
- name
- selector
type: object
type: array
default:
description: Default budget/strategy for unmatched nodes
properties:
budget:
description: Exactly one of percent or count
properties:
count:
minimum: 1
type: integer
percent:
maximum: 100
minimum: 1
type: integer
type: object
strategy:
description: Strategy to use
properties:
exponential:
properties:
batchThreshold:
maximum: 100
minimum: 1
type: integer
failureThreshold:
minimum: 1
type: integer
growthFactor:
minimum: 2
type: integer
initialBatch:
minimum: 1
type: integer
safetyLimit:
maximum: 100
minimum: 1
type: integer
type: object
fixed:
description: Strategy parameters
properties:
batchThreshold:
maximum: 100
minimum: 1
type: integer
failureThreshold:
minimum: 1
type: integer
initialBatch:
minimum: 1
type: integer
safetyLimit:
maximum: 100
minimum: 1
type: integer
type: object
linear:
properties:
batchThreshold:
maximum: 100
minimum: 1
type: integer
delta:
minimum: 1
type: integer
failureThreshold:
minimum: 1
type: integer
initialBatch:
minimum: 1
type: integer
safetyLimit:
maximum: 100
minimum: 1
type: integer
type: object
type: object
type: object
required:
- default
type: object
type: object
served: true
storage: true
15 changes: 15 additions & 0 deletions chart/templates/skyhook-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,21 @@ spec:
type: string
type: object
type: array
deploymentPolicy:
description: DeploymentPolicy is the name of a DeploymentPolicy for
rollout settings
properties:
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
type: object
x-kubernetes-map-type: atomic
interruptionBudget:
description: InterruptionBudget configures how many nodes that match
node selectors that allowed to be interrupted at once.
Expand Down
8 changes: 8 additions & 0 deletions operator/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,12 @@ resources:
kind: Pod
path: k8s.io/api/core/v1
version: v1
- api:
crdVersion: v1
namespaced: true
domain: nvidia.com
group: skyhook
kind: DeploymentPolicy
path: github.com/NVIDIA/skyhook/operator/api/v1alpha1
version: v1alpha1
version: "3"
Loading