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
13 changes: 1 addition & 12 deletions chart/templates/skyhook-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,7 @@ spec:
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
type: string
interruptionBudget:
description: InterruptionBudget configures how many nodes that match
node selectors that allowed to be interrupted at once.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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.

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: skyhook.nvidia.com/v1alpha1
kind: Skyhook
metadata:
name: helm-test-skyhook
status:
status: complete
11 changes: 11 additions & 0 deletions k8s-tests/chainsaw/helm/helm-chart-test/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,18 @@ spec:
../install-helm-chart.sh foobar
- assert:
file: assert-scheduled.yaml
- apply:
file: deployment-policy.yaml
- apply:
file: skyhook.yaml
- assert:
file: assert-skyhook-complete.yaml
finally:
- script:
content: |
## Cleanup deployment policy test resources
kubectl delete skyhook helm-test-skyhook --ignore-not-found || true
kubectl delete deploymentpolicy helm-test-policy -n skyhook --ignore-not-found || true
- script:
content: |
## Remove taint from nodes
Expand Down
33 changes: 33 additions & 0 deletions k8s-tests/chainsaw/helm/helm-chart-test/deployment-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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.

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: skyhook.nvidia.com/v1alpha1
kind: DeploymentPolicy
metadata:
name: helm-test-policy
namespace: skyhook
spec:
default:
budget:
percent: 100
strategy:
fixed:
initialBatch: 1
batchThreshold: 100
safetyLimit: 50
40 changes: 40 additions & 0 deletions k8s-tests/chainsaw/helm/helm-chart-test/skyhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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.

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: skyhook.nvidia.com/v1alpha1
kind: Skyhook
metadata:
name: helm-test-skyhook
spec:
nodeSelectors:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
deploymentPolicy: helm-test-policy
additionalTolerations:
- key: dedicated
value: system-cpu
effect: NoSchedule
packages:
helm-test:
version: "6.2.0"
image: ghcr.io/nvidia/skyhook/agentless
env:
- name: SLEEP_LEN
value: "1"
5 changes: 5 additions & 0 deletions k8s-tests/chainsaw/helm/helm-chart-test/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@ controllerManager:
repository: ghcr.io/nvidia/skyhook/operator
tag: latest ## THIS should change to be like a tag so it can point at a specific commit
digest: ""
# Use agentless mock image for testing - it just sleeps and exits successfully
agent:
repository: ghcr.io/nvidia/skyhook/agentless
tag: "6.2.0"
digest: ""
webhook:
enable: false