From 55b5395cf35695549f12164c01cc87b7c8a4fae0 Mon Sep 17 00:00:00 2001 From: Alex Yuskauskas Date: Mon, 3 Mar 2025 15:00:49 -0800 Subject: [PATCH 1/6] feat: print configuration at the start of agent container --- .../src/skyhook_agent/controller.py | 43 ++++++++++++++++--- agent/skyhook-agent/tests/test_controller.py | 12 +++--- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/agent/skyhook-agent/src/skyhook_agent/controller.py b/agent/skyhook-agent/src/skyhook_agent/controller.py index c8699bb4..fd6765cb 100644 --- a/agent/skyhook-agent/src/skyhook_agent/controller.py +++ b/agent/skyhook-agent/src/skyhook_agent/controller.py @@ -339,11 +339,7 @@ def summarize_check_results(results: list[bool], step_data: dict[Mode, list[Step return False -def do_interrupt(interrupt_data: str, root_mount: str, copy_dir: str, on_host: bool) -> bool: - """ - Run an interrupt if there hasn't been an interrupt already for the skyhook ID. - """ - +def make_config_data_from_resource_id() -> dict: SKYHOOK_RESOURCE_ID, _ = _get_env_config() # Interrupts don't really have config data we can read from the Package as it is run standalone. @@ -354,6 +350,16 @@ def do_interrupt(interrupt_data: str, root_mount: str, copy_dir: str, on_host: b "package_name": package, "package_version": version, } + return config_data + +def do_interrupt(interrupt_data: str, root_mount: str, copy_dir: str, on_host: bool) -> bool: + """ + Run an interrupt if there hasn't been an interrupt already for the skyhook ID. + """ + + SKYHOOK_RESOURCE_ID, _ = _get_env_config() + + config_data = make_config_data_from_resource_id() interrupt = interrupts.inflate(interrupt_data) @@ -514,11 +520,36 @@ def cli(sys_argv: list[str]=sys.argv): # new way with interrupt data mode, root_mount, copy_dir, interrupt_data = args - if os.getenv("COPY_RESOLV", "true").lower() == "true": + copy_resolv = os.getenv("COPY_RESOLV", "true").lower() == "true" + if copy_resolv: shutil.copyfile("/etc/resolv.conf", f"{root_mount}/etc/resolv.conf") always_run_step = os.getenv("OVERLAY_ALWAYS_RUN_STEP", "false").lower() == "true" + # Print all of the configuration flags as a separate line + print("-" * 20) + print(str.center("CLI CONFIGURATION", 20, "-")) + print(f"mode: {mode}") + print(f"root_mount: {root_mount}") + print(f"copy_dir: {copy_dir}") + print(f"interrupt_data: {interrupt_data}") + print(f"always_run_step: {always_run_step}") + print(str.center("ENV CONFIGURATION", 20, "-")) + print(f"COPY_RESOLV: {copy_resolv}") + print(f"OVERLAY_ALWAYS_RUN_STEP: {always_run_step}") + SKYHOOK_RESOURCE_ID, SKYHOOK_DATA_DIR = _get_env_config() + print(f"SKYHOOK_RESOURCE_ID: {SKYHOOK_RESOURCE_ID}") + print(f"SKYHOOK_DATA_DIR: {SKYHOOK_DATA_DIR}") + print(f"SKYHOOK_AGENT_BUFFER_LIMIT: {buff_size}") + print(str.center("Directory CONFIGURATION", 20, "-")) + # print flag dir and log dir + config_data = make_config_data_from_resource_id() + print(f"flag_dir: {get_flag_dir(root_mount)}/{config_data['package_name']}/{config_data['package_version']}") + log_dir = '/'.join(get_log_file(root_mount, 'step',copy_dir, config_data, timestamp='timestamp').split('/')[:-1]) + print(f"log_dir: {log_dir}") + print(f"history_file: {get_history_dir(root_mount)}/{config_data['package_name']}.json") + print("-" * 20) + return main(mode, root_mount, copy_dir, interrupt_data, always_run_step) diff --git a/agent/skyhook-agent/tests/test_controller.py b/agent/skyhook-agent/tests/test_controller.py index 23016d27..15159847 100644 --- a/agent/skyhook-agent/tests/test_controller.py +++ b/agent/skyhook-agent/tests/test_controller.py @@ -1212,20 +1212,22 @@ def test_interrupt_makes_config_from_skyhook_resource_id(self, run_mock, datetim @mock.patch("skyhook_agent.controller.main") def test_interrupt_mode_reads_extra_argument(self, main_mock): argv = ["controller.py", str(Mode.INTERRUPT), "root_mount", "copy_dir", "interrupt_data"] - with set_env(COPY_RESOLV="false"): + with set_env(COPY_RESOLV="false", SKYHOOK_RESOURCE_ID="customer-25633c77-11ac-471a-9928-bc6969cead5f-2_tuning_2.0.2"): controller.cli(argv) main_mock.assert_called_once_with(str(Mode.INTERRUPT), "root_mount", "copy_dir", "interrupt_data", False) @mock.patch("skyhook_agent.controller.main") def test_cli_overlay_always_run_step_is_correct(self, main_mock): - with set_env(OVERLAY_ALWAYS_RUN_STEP="true", COPY_RESOLV="false"): + with set_env(OVERLAY_ALWAYS_RUN_STEP="true", COPY_RESOLV="false", + SKYHOOK_RESOURCE_ID="customer-25633c77-11ac-471a-9928-bc6969cead5f-2_tuning_2.0.2"): controller.cli(["controller.py", str(Mode.APPLY), "root_mount", "copy_dir"]) main_mock.assert_called_once_with(str(Mode.APPLY), "root_mount", "copy_dir", None, True) main_mock.reset_mock() - with set_env(OVERLAY_ALWAYS_RUN_STEP="false", COPY_RESOLV="false"): + with set_env(OVERLAY_ALWAYS_RUN_STEP="false", COPY_RESOLV="false", + SKYHOOK_RESOURCE_ID="customer-25633c77-11ac-471a-9928-bc6969cead5f-2_tuning_2.0.2"): controller.cli(["controller.py", str(Mode.APPLY), "root_mount", "copy_dir"]) main_mock.assert_called_once_with(str(Mode.APPLY), "root_mount", "copy_dir", None, False) @@ -1233,13 +1235,13 @@ def test_cli_overlay_always_run_step_is_correct(self, main_mock): @mock.patch("skyhook_agent.controller.shutil") def test_cli_COPY_RESOLV(self, shutil_mock, main_mock): argv = ["controller.py", str(Mode.APPLY), "root_mount", "copy_dir"] - with set_env(COPY_RESOLV="true"): + with set_env(COPY_RESOLV="true", SKYHOOK_RESOURCE_ID="customer-25633c77-11ac-471a-9928-bc6969cead5f-2_tuning_2.0.2"): controller.cli(argv) shutil_mock.copyfile.assert_called_once() shutil_mock.copyfile.reset_mock() - with set_env(COPY_RESOLV="false"): + with set_env(COPY_RESOLV="false", SKYHOOK_RESOURCE_ID="customer-25633c77-11ac-471a-9928-bc6969cead5f-2_tuning_2.0.2"): controller.cli(argv) shutil_mock.copyfile.assert_not_called() From a35d9e5eadea0805b720f6ba87f51d54be03cc19 Mon Sep 17 00:00:00 2001 From: Alex Yuskauskas Date: Mon, 3 Mar 2025 15:02:02 -0800 Subject: [PATCH 2/6] docs(agent): add notice file and remove extra license file --- agent/skyhook-agent/LICENSE.txt | 0 agent/skyhook-agent/NOTICE | 8 ++++++++ 2 files changed, 8 insertions(+) delete mode 100644 agent/skyhook-agent/LICENSE.txt create mode 100644 agent/skyhook-agent/NOTICE diff --git a/agent/skyhook-agent/LICENSE.txt b/agent/skyhook-agent/LICENSE.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/agent/skyhook-agent/NOTICE b/agent/skyhook-agent/NOTICE new file mode 100644 index 00000000..5c1afaf1 --- /dev/null +++ b/agent/skyhook-agent/NOTICE @@ -0,0 +1,8 @@ +Skyhook Open Source Software +Copyright (c) 2024, NVIDIA CORPORATION. + +This product includes software developed at +NVIDIA CORPORATION (https://www.nvidia.com/). + +This software make use of code with licenses: + * jsonschema: MIT https://github.com/python-jsonschema/jsonschema/blob/main/COPYING \ No newline at end of file From dc78f749cb7bcd9a2b85bf770ce45f34815c0d48 Mon Sep 17 00:00:00 2001 From: Alex Yuskauskas Date: Thu, 6 Mar 2025 11:00:11 -0800 Subject: [PATCH 3/6] feat: change to common license formatter and update all code with that format fix:(operator): Change operator-container to only go if ci works feat(operator): link top level license here so license-check doesn't fail --- .cursorignore | 1 + .github/workflows/agent-ci.yaml | 26 ++ .github/workflows/agent-container.yaml | 26 ++ .github/workflows/agentless-container.yaml | 26 ++ .github/workflows/commit-linting.yaml | 26 ++ .github/workflows/operator-ci.yaml | 26 ++ .github/workflows/operator-container.yaml | 37 ++- .gitlab-ci.yml | 26 ++ CONTRIBUTING.md | 29 +- LICENSE | 2 +- README.md | 63 ++++- agent/Makefile | 18 +- agent/README.md | 3 +- agent/boilerplate/license_header.py.txt | 2 - .../src/skyhook_agent/__about__.py | 28 +- .../src/skyhook_agent/__init__.py | 28 +- .../skyhook-agent/src/skyhook_agent/config.py | 23 +- .../src/skyhook_agent/controller.py | 37 ++- .../skyhook-agent/src/skyhook_agent/enums.py | 29 +- .../src/skyhook_agent/interrupts.py | 29 +- agent/skyhook-agent/src/skyhook_agent/step.py | 29 +- agent/skyhook-agent/tests/__init__.py | 28 +- agent/skyhook-agent/tests/test_config.py | 29 +- agent/skyhook-agent/tests/test_controller.py | 29 +- agent/skyhook-agent/tests/test_enums.py | 29 +- agent/skyhook-agent/tests/test_interrupts.py | 29 +- agent/skyhook-agent/tests/test_steps.py | 29 +- agent/tools/license_formatter.py | 28 -- boilerplate/boilerplate.go.txt | 15 - boilerplate/boilerplate.sh.txt | 13 - chart/Chart.yaml | 2 +- chart/values.yaml | 5 +- containers/agentless/entrypoint.sh | 39 ++- containers/agentless/versions.sh | 39 ++- .../interrupt-wait-for-pod/non-workload.yaml | 26 ++ demos/interrupt-wait-for-pod/scr.yaml | 26 ++ demos/interrupt-wait-for-pod/workload.yaml | 26 ++ demos/shellscript/Dockerfile | 4 - demos/shellscript/config.json | 92 ------ .../skyhook_dir/shellscript_run.sh | 9 - .../helm-chart-test/assert-no-schedule.yaml | 26 ++ .../helm-chart-test/assert-scheduled.yaml | 26 ++ .../helm/helm-chart-test/chainsaw-test.yaml | 26 ++ .../chainsaw/helm/helm-chart-test/values.yaml | 26 ++ .../assert-override-resources.yaml | 26 ++ .../assert-scaled-resources.yaml | 26 ++ .../helm/helm-scale-test/chainsaw-test.yaml | 26 ++ .../helm/helm-scale-test/values-scale.yaml | 26 ++ .../vaules-override-resources.yaml | 26 ++ .../chainsaw/helm/install-cert-manager.sh | 39 ++- k8s-tests/chainsaw/helm/install-helm-chart.sh | 39 ++- k8s-tests/chainsaw/helm/taint-nodes.sh | 39 ++- .../chainsaw/helm/uninstall-cert-manager.sh | 39 ++- .../chainsaw/helm/uninstall-helm-chart.sh | 39 ++- k8s-tests/chainsaw/helm/untaint-nodes.sh | 39 ++- .../assert-update-no-interrupt.yaml | 26 ++ .../assert-update-while-running.yaml | 26 ++ .../skyhook/config-skyhook/assert-update.yaml | 26 ++ .../skyhook/config-skyhook/assert.yaml | 26 ++ .../skyhook/config-skyhook/chainsaw-test.yaml | 26 ++ .../skyhook/config-skyhook/skyhook.yaml | 26 ++ .../config-skyhook/update-no-interrupt.yaml | 26 ++ .../config-skyhook/update-while-running.yaml | 26 ++ .../skyhook/config-skyhook/update.yaml | 26 ++ .../failure-skyhook/chainsaw-test.yaml | 26 ++ .../skyhook/failure-skyhook/node-assert.yaml | 26 ++ .../skyhook/failure-skyhook/skyhook.yaml | 26 ++ .../skyhook/hello-world/chainsaw-test.yaml | 26 ++ .../skyhook/hello-world/configmap-assert.yaml | 26 ++ .../skyhook/hello-world/configmap.yaml | 26 ++ .../skyhook/interrupt-grouping/assert.yaml | 26 ++ .../interrupt-grouping/chainsaw-test.yaml | 26 ++ .../skyhook/interrupt-grouping/skyhook.yaml | 26 ++ .../chainsaw/skyhook/interrupt/assert.yaml | 26 ++ .../skyhook/interrupt/chainsaw-test.yaml | 26 ++ k8s-tests/chainsaw/skyhook/interrupt/pod.yaml | 26 ++ .../chainsaw/skyhook/interrupt/skyhook.yaml | 26 ++ k8s-tests/chainsaw/skyhook/nodes_add_taint.sh | 39 ++- .../chainsaw/skyhook/nodes_remove_taint.sh | 39 ++- .../skyhook/pod-finalizer/chainsaw-test.yaml | 26 ++ .../skyhook/pod-finalizer/node-assert.yaml | 26 ++ .../chainsaw/skyhook/pod-finalizer/pod.yaml | 26 ++ k8s-tests/chainsaw/skyhook/rest_nodes.sh | 39 ++- k8s-tests/chainsaw/skyhook/rest_test.sh | 39 ++- .../skyhook/runtime-required/assert.yaml | 26 ++ .../runtime-required/chainsaw-test.yaml | 26 ++ .../skyhook/runtime-required/skyhook.yaml | 26 ++ .../skyhook/simple-skyhook/assert.yaml | 26 ++ .../skyhook/simple-skyhook/chainsaw-test.yaml | 26 ++ .../skyhook/simple-skyhook/skyhook.yaml | 26 ++ .../simple-update-skyhook/assert-update.yaml | 26 ++ .../skyhook/simple-update-skyhook/assert.yaml | 26 ++ .../simple-update-skyhook/chainsaw-test.yaml | 26 ++ .../simple-update-skyhook/skyhook.yaml | 26 ++ .../skyhook/simple-update-skyhook/update.yaml | 26 ++ .../skyhook/skyhook-upgrade/assert.yaml | 26 ++ .../skyhook-upgrade/chainsaw-test.yaml | 26 ++ .../skyhook/skyhook-upgrade/skyhook.yaml | 26 ++ .../taint-scheduling/assert-update.yaml | 26 ++ .../skyhook/taint-scheduling/assert.yaml | 26 ++ .../taint-scheduling/chainsaw-test.yaml | 26 ++ .../skyhook/taint-scheduling/skyhook.yaml | 26 ++ .../taint-scheduling/update-skyhook.yaml | 26 ++ .../assert-update-no-packages.yaml | 26 ++ .../assert-update.yaml | 26 ++ .../uninstall-upgrade-skyhook/assert.yaml | 26 ++ .../chainsaw-test.yaml | 26 ++ .../uninstall-upgrade-skyhook/skyhook.yaml | 26 ++ .../update-no-packages.yaml | 26 ++ .../uninstall-upgrade-skyhook/update.yaml | 26 ++ .../validate-packages/assert-update.yaml | 26 ++ .../skyhook/validate-packages/assert.yaml | 26 ++ .../validate-packages/chainsaw-test.yaml | 26 ++ .../skyhook/validate-packages/skyhook.yaml | 26 ++ .../skyhook/validate-packages/update.yaml | 26 ++ .../migration_0.5.0/migration.sh | 39 ++- kyverno/README.md | 2 +- kyverno/disable_packages.yaml | 22 +- kyverno/skyhook-viewer-binding.yaml | 26 ++ operator/.golangci.yml | 26 ++ operator/.mockery.yaml | 26 ++ operator/LICENSE | 1 + operator/Makefile | 5 +- operator/README.md | 8 +- operator/api/v1alpha1/groupversion_info.go | 37 ++- operator/api/v1alpha1/skyhook_types.go | 37 ++- operator/api/v1alpha1/skyhook_types_test.go | 37 ++- operator/api/v1alpha1/skyhook_webhook.go | 37 ++- operator/api/v1alpha1/skyhook_webhook_test.go | 37 ++- operator/api/v1alpha1/webhook_suite_test.go | 37 ++- .../api/v1alpha1/zz_generated.deepcopy.go | 40 ++- operator/cmd/main.go | 37 ++- operator/config/certmanager/certificate.yaml | 26 ++ .../config/certmanager/kustomization.yaml | 26 ++ .../config/certmanager/kustomizeconfig.yaml | 26 ++ .../bases/skyhook.nvidia.com_skyhooks.yaml | 26 ++ operator/config/crd/kustomization.yaml | 26 ++ operator/config/crd/kustomizeconfig.yaml | 26 ++ .../crd/patches/cainjection_in_skyhooks.yaml | 26 ++ .../crd/patches/webhook_in_skyhooks.yaml | 26 ++ operator/config/default/kustomization.yaml | 26 ++ .../default/manager_auth_proxy_patch.yaml | 26 ++ .../config/default/manager_config_patch.yaml | 26 ++ .../config/default/manager_webhook_patch.yaml | 26 ++ .../default/webhookcainjection_patch.yaml | 26 ++ operator/config/local-dev/dashboard.yaml | 26 ++ operator/config/local-dev/kind-config.yaml | 26 ++ operator/config/manager/kustomization.yaml | 26 ++ operator/config/manager/manager.yaml | 26 ++ operator/config/prometheus/kustomization.yaml | 26 ++ operator/config/prometheus/monitor.yaml | 26 ++ .../rbac/auth_proxy_client_clusterrole.yaml | 26 ++ operator/config/rbac/auth_proxy_role.yaml | 26 ++ .../config/rbac/auth_proxy_role_binding.yaml | 26 ++ operator/config/rbac/auth_proxy_service.yaml | 26 ++ operator/config/rbac/kustomization.yaml | 26 ++ .../config/rbac/leader_election_role.yaml | 26 ++ .../rbac/leader_election_role_binding.yaml | 26 ++ operator/config/rbac/role.yaml | 26 ++ operator/config/rbac/role_binding.yaml | 26 ++ operator/config/rbac/service_account.yaml | 26 ++ operator/config/rbac/skyhook_editor_role.yaml | 26 ++ operator/config/rbac/skyhook_viewer_role.yaml | 26 ++ operator/config/samples/interrupt_group.yaml | 26 ++ operator/config/samples/kustomization.yaml | 26 ++ .../samples/skyhook_v1alpha1_skyhook.yaml | 26 ++ operator/config/webhook/kustomization.yaml | 26 ++ operator/config/webhook/kustomizeconfig.yaml | 26 ++ operator/config/webhook/manifests.yaml | 26 ++ operator/config/webhook/service.yaml | 26 ++ operator/internal/controller/annotations.go | 37 ++- .../internal/controller/cluster_state_v2.go | 37 ++- .../controller/cluster_state_v2_test.go | 37 ++- operator/internal/controller/event_handler.go | 37 ++- .../internal/controller/event_handler_test.go | 37 ++- .../internal/controller/mock/SkyhookNodes.go | 40 ++- .../internal/controller/pod_controller.go | 37 ++- .../internal/controller/skyhook_controller.go | 37 ++- .../controller/skyhook_controller_test.go | 37 ++- operator/internal/controller/suite_test.go | 37 ++- .../internal/controller/zz.migration.0.5.0.go | 37 ++- operator/internal/dal/dal.go | 37 ++- operator/internal/dal/mock/DAL.go | 40 ++- operator/internal/graph/dependency_graph.go | 37 ++- .../internal/graph/dependency_graph_test.go | 37 ++- operator/internal/mocks/client/Client.go | 40 ++- .../internal/mocks/record/EventRecorder.go | 40 ++- .../mocks/workqueue/RateLimitingInterface.go | 40 ++- operator/internal/version/version.go | 37 ++- operator/internal/wrapper/node.go | 37 ++- operator/internal/wrapper/skyhook.go | 37 ++- operator/internal/wrapper/skyhook_test.go | 37 ++- .../internal/wrapper/wrapper_suite_test.go | 37 ++- .../internal/wrapper/zz.migration.0.5.0.go | 37 ++- operator/license.yml | 23 -- scripts/find-skyhook-resources.sh | 39 ++- scripts/format_license.py | 266 ++++++++++++++++++ scripts/monitor.sh | 31 +- 198 files changed, 4919 insertions(+), 876 deletions(-) create mode 100644 .cursorignore delete mode 100644 agent/boilerplate/license_header.py.txt delete mode 100644 agent/tools/license_formatter.py delete mode 100644 boilerplate/boilerplate.go.txt delete mode 100644 boilerplate/boilerplate.sh.txt delete mode 100644 demos/shellscript/Dockerfile delete mode 100644 demos/shellscript/config.json delete mode 100644 demos/shellscript/skyhook_dir/shellscript_run.sh create mode 120000 operator/LICENSE delete mode 100644 operator/license.yml create mode 100755 scripts/format_license.py diff --git a/.cursorignore b/.cursorignore new file mode 100644 index 00000000..6f9f00ff --- /dev/null +++ b/.cursorignore @@ -0,0 +1 @@ +# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv) diff --git a/.github/workflows/agent-ci.yaml b/.github/workflows/agent-ci.yaml index 8481f017..d63d5b81 100644 --- a/.github/workflows/agent-ci.yaml +++ b/.github/workflows/agent-ci.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + name: Agent Unittest on: pull_request: diff --git a/.github/workflows/agent-container.yaml b/.github/workflows/agent-container.yaml index 8780dcd2..7dfd0b75 100644 --- a/.github/workflows/agent-container.yaml +++ b/.github/workflows/agent-container.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + name: Build and push agent container image # Configures this workflow to run every time a tag is created diff --git a/.github/workflows/agentless-container.yaml b/.github/workflows/agentless-container.yaml index df81d262..987411cc 100644 --- a/.github/workflows/agentless-container.yaml +++ b/.github/workflows/agentless-container.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + name: Build and push agentless container image # Configures this workflow to run every time a tag is created diff --git a/.github/workflows/commit-linting.yaml b/.github/workflows/commit-linting.yaml index e4b65b60..c0ef45b0 100644 --- a/.github/workflows/commit-linting.yaml +++ b/.github/workflows/commit-linting.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + name: Commit Linting on: pull_request jobs: diff --git a/.github/workflows/operator-ci.yaml b/.github/workflows/operator-ci.yaml index abb8b0c5..7c61abf7 100644 --- a/.github/workflows/operator-ci.yaml +++ b/.github/workflows/operator-ci.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + name: Operator unit and functional tests on: pull_request: diff --git a/.github/workflows/operator-container.yaml b/.github/workflows/operator-container.yaml index 0d01a2d6..3efaf3f0 100644 --- a/.github/workflows/operator-container.yaml +++ b/.github/workflows/operator-container.yaml @@ -1,14 +1,33 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # Build when operator code changes name: Build and push operator container image on: - pull_request: - branches: - - main - paths: - - operator/**/*.go - - containers/operator.Dockerfile - - .github/workflows/operator-container.yaml push: branches: - main @@ -18,6 +37,10 @@ on: - operator/**/*.go - containers/operator.Dockerfile - .github/workflows/operator-container.yaml + workflow_run: + workflows: ["Operator unit and functional tests"] + types: + - completed # NOTE: we may want to switch to matrix build for multi-platform support if this is taking too long # https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 21fdcce4..225d1e9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + default: tags: - baseos-infra diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a4e14d7e..df223921 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,4 +58,31 @@ Then you just add a line to every git commit message: Use your real name (sorry, no pseudonyms or anonymous contributions.) If you set your `user.name` and `user.email` git configs, you can sign your -commit automatically with `git commit -s`. \ No newline at end of file +commit automatically with `git commit -s`. + +## Code Style + +We use [Conventional Commits](https://www.conventionalcommits.org/) for our commit messages. + +## Python + +We use [Black](https://github.com/psf/black) for Python code style. +For testing, we use [pytest](https://docs.pytest.org/en/stable/). + +## Golang + +We use [gofmt](https://pkg.go.dev/cmd/gofmt) for Golang code style. +For testing, we use [Ginkgo](https://github.com/onsi/ginkgo) and [Gomega](https://github.com/onsi/gomega). + +## License Header + +We use our scripts/format_license.py to add the license header to the code. + +``` +./scripts/format_license.py +``` + +It will add the license header based on the LICENSE file to the code and remove/replace the existing license header. Note: both agent and operator automatically run this script when you run `make fmt`. + + + diff --git a/LICENSE b/LICENSE index 547752b0..371c80cd 100644 --- a/LICENSE +++ b/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright The Helm Authors. + Copyright (c) NVIDIA CORPORATION. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 42c90532..22afff46 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,68 @@ # skyhook -Skyhook was developed for modifying the underlying host OS in Kubernetes clusters. Think of it as a package manager like apt/yum for linux but for whole cluster management. The package manager (Skyhook Operator) manages the lifecycle (install/configure/uninstall/upgrade) of the packages (Skyhook Custom Resource, often SCR for short). It is Kubernetes aware, making cluster modifications easy. This enables Skyhook to schedule updates around important workloads and do rolling updates. It can be used in any cluster environment: self-managed clusters, on-prem clusters, cloud clusters, etc. +Skyhook was developed for modifying the underlying host OS in Kubernetes clusters. Think of it as a package manager like apt/yum for linux but for whole cluster management. The package manager (Skyhook Operator) manages the lifecycle (install/configure/uninstall/upgrade) of the packages (Skyhook Custom Resource, often SCR for short). It is Kubernetes aware, making cluster modifications easy. This enables Skyhook to schedule updates around important workloads and do rolling updates. It can be used in any cluster environment: self-managed clusters, on-prem clusters, cloud clusters, etc. +## Quick Start + +### Install the operator + 1. Install cert-manager `kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.2/cert-manager.yaml` + 1. Create a secret for the operator to pull images `kubectl create secret generic node-init-secret --from-file=.dockerconfigjson=${HOME}/.config/containers/auth.json --type=kubernetes.io/dockerconfigjson -n skyhook` + 1. Install the operator `helm install skyhook ./chart --namespace skyhook` + +### Install a package +Example package using shellscript, put this in a file called `demo.yaml` and apply it with `kubectl apply -f demo.yaml` +``` +apiVersion: skyhook.nvidia.com/v1alpha1 +kind: Skyhook +metadata: + labels: + app.kubernetes.io/part-of: skyhook-operator + app.kubernetes.io/created-by: skyhook-operator + name: demo +spec: + nodeSelectors: + matchLabels: + skyhook.nvidia.com/test-node: demo + packages: + tuning: + version: 1.1.0 + image: ghcr.io/nvidia/skyhook-packages/shellscript + configMap: + apply.sh: |- + #!/bin/bash + echo "hello world" > /skyhook-hello-world + sleep 5 + apply_check.sh: |- + #!/bin/bash + cat /skyhook-hello-world + sleep 5 + config.sh: |- + #!/bin/bash + echo "a config is run" >> /skyhook-hello-world + sleep 5 + config_check.sh: |- + #!/bin/bash + grep "config" /skyhook-hello-world + sleep 5 +``` + +### Watch Skyhook apply the package +``` +kubectl get pods -w -n skyhook +``` +There will a pod for each lifecycle stage (apply, config) in this case. + +### Check the package +``` +kubectl describe skyhooks.skyhook.nvidia.com/demo +``` +The Status will show the overall package status as well as the status of each node + +### Check the annotations on the node using the label +``` +kubectl get nodes -o jsonpath='{range .items[?(@.metadata.labels.skyhook\.nvidia\.com/test-node=="demo")]}{.metadata.annotations.skyhook\.nvidia\.com/nodeState_demo}{"\n"}{end}' +``` + ## Benefits - The requested changes (the Packages) are native Kubernetes resources they can be combined and applied with common tools like ArgoCD, Helm, Flux etc. This means that all the tooling to manage applications can package customizations right alongside them to get applied, removed and upgraded as the applications themselves are. - Autoscaling, with skyhook if you want to enable autoscaling on your cluster but need to modify all Nodes added to a cluster, you need something that is kubernetes aware. Skyhook as feature to make sure you nodes are ready before then enter the cluster. diff --git a/agent/Makefile b/agent/Makefile index ee9738c0..da312056 100644 --- a/agent/Makefile +++ b/agent/Makefile @@ -13,8 +13,8 @@ # limitations under the License. VENV := ./venv/bin/ -REGISTRY ?= nvcr.io -AGENT_IMAGE ?= nvidian/swgpu-baseos/skyhook-agent +REGISTRY ?= ghcr.io +AGENT_IMAGE ?= nvidia/skyhook/agent DOCKER_CMD ?= docker .PHONY: all @@ -37,13 +37,13 @@ test: venv ## Test using hatch, prints coverage and outputs a report to coverage $(VENV)coverage report --show-missing --data-file=skyhook-agent/.coverage $(VENV)coverage xml --data-file=skyhook-agent/.coverage -.PHONY: format -format: - for file in $(find . -name "*.py" | grep -v venv | grep -v pycache); do \ - echo $(file); \ - python3 tools/license_formatter.py boilerplate/license_header.py.txt $(file) > $(file).tmp; \ - mv $(file).tmp $(file); \ - done +.PHONY: license-fmt +license-fmt: ## Run add license header to code. + python3 ../scripts/format_license.py --root-dir . --license-file ../LICENSE + +.PHONY: fmt +fmt: license-fmt ## Run go fmt against code. + @echo "formattted" ##@ Build .PHONY: build diff --git a/agent/README.md b/agent/README.md index ba1607a3..2768dca5 100644 --- a/agent/README.md +++ b/agent/README.md @@ -13,8 +13,7 @@ A basic example of using a container overlay 1. Do code changes 1. Write unit tests for code changes 1. Run `make test` to run the tests -1. Run `make format` to make sure formatting is correct - 1. Adds license header to any python files +1. Run `make fmt` to format the code 1. Push code to and make an MR ### Container Image Build diff --git a/agent/boilerplate/license_header.py.txt b/agent/boilerplate/license_header.py.txt deleted file mode 100644 index c80f9d90..00000000 --- a/agent/boilerplate/license_header.py.txt +++ /dev/null @@ -1,2 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/agent/skyhook-agent/src/skyhook_agent/__about__.py b/agent/skyhook-agent/src/skyhook_agent/__about__.py index 2f7883d6..9ba14a20 100644 --- a/agent/skyhook-agent/src/skyhook_agent/__about__.py +++ b/agent/skyhook-agent/src/skyhook_agent/__about__.py @@ -1,4 +1,28 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START # +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + __version__ = "0.0.0" diff --git a/agent/skyhook-agent/src/skyhook_agent/__init__.py b/agent/skyhook-agent/src/skyhook_agent/__init__.py index 508c71b5..ae7de4e2 100644 --- a/agent/skyhook-agent/src/skyhook_agent/__init__.py +++ b/agent/skyhook-agent/src/skyhook_agent/__init__.py @@ -1,3 +1,27 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START # +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + diff --git a/agent/skyhook-agent/src/skyhook_agent/config.py b/agent/skyhook-agent/src/skyhook_agent/config.py index 2fc92f9b..133873c9 100644 --- a/agent/skyhook-agent/src/skyhook_agent/config.py +++ b/agent/skyhook-agent/src/skyhook_agent/config.py @@ -1,5 +1,24 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + from enum import Enum import json import os, sys diff --git a/agent/skyhook-agent/src/skyhook_agent/controller.py b/agent/skyhook-agent/src/skyhook_agent/controller.py index fd6765cb..f663186d 100644 --- a/agent/skyhook-agent/src/skyhook_agent/controller.py +++ b/agent/skyhook-agent/src/skyhook_agent/controller.py @@ -1,6 +1,39 @@ #!/bin/python -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 + +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + + + import sys import os diff --git a/agent/skyhook-agent/src/skyhook_agent/enums.py b/agent/skyhook-agent/src/skyhook_agent/enums.py index 8230c6e1..6135b9e1 100644 --- a/agent/skyhook-agent/src/skyhook_agent/enums.py +++ b/agent/skyhook-agent/src/skyhook_agent/enums.py @@ -1,5 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + from enum import Enum class SortableEnum(Enum): diff --git a/agent/skyhook-agent/src/skyhook_agent/interrupts.py b/agent/skyhook-agent/src/skyhook_agent/interrupts.py index 0774cbbe..974cbb59 100644 --- a/agent/skyhook-agent/src/skyhook_agent/interrupts.py +++ b/agent/skyhook-agent/src/skyhook_agent/interrupts.py @@ -1,5 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + import string import base64 import json diff --git a/agent/skyhook-agent/src/skyhook_agent/step.py b/agent/skyhook-agent/src/skyhook_agent/step.py index 0a7727dd..33ba0f4c 100644 --- a/agent/skyhook-agent/src/skyhook_agent/step.py +++ b/agent/skyhook-agent/src/skyhook_agent/step.py @@ -1,5 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + from typing import IO from enum import Enum import json diff --git a/agent/skyhook-agent/tests/__init__.py b/agent/skyhook-agent/tests/__init__.py index 508c71b5..ae7de4e2 100644 --- a/agent/skyhook-agent/tests/__init__.py +++ b/agent/skyhook-agent/tests/__init__.py @@ -1,3 +1,27 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START # +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + diff --git a/agent/skyhook-agent/tests/test_config.py b/agent/skyhook-agent/tests/test_config.py index 6f490195..937d07fd 100644 --- a/agent/skyhook-agent/tests/test_config.py +++ b/agent/skyhook-agent/tests/test_config.py @@ -1,5 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + import unittest from tempfile import TemporaryDirectory diff --git a/agent/skyhook-agent/tests/test_controller.py b/agent/skyhook-agent/tests/test_controller.py index 15159847..fd2f7ac0 100644 --- a/agent/skyhook-agent/tests/test_controller.py +++ b/agent/skyhook-agent/tests/test_controller.py @@ -1,5 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + import unittest import tempfile import os diff --git a/agent/skyhook-agent/tests/test_enums.py b/agent/skyhook-agent/tests/test_enums.py index d710d17a..c9d0c7a3 100644 --- a/agent/skyhook-agent/tests/test_enums.py +++ b/agent/skyhook-agent/tests/test_enums.py @@ -1,5 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + import unittest from skyhook_agent.enums import SortableEnum, get_latest_schema diff --git a/agent/skyhook-agent/tests/test_interrupts.py b/agent/skyhook-agent/tests/test_interrupts.py index ebdbe0da..662fc30d 100644 --- a/agent/skyhook-agent/tests/test_interrupts.py +++ b/agent/skyhook-agent/tests/test_interrupts.py @@ -1,5 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + import unittest import base64 import json diff --git a/agent/skyhook-agent/tests/test_steps.py b/agent/skyhook-agent/tests/test_steps.py index f54025da..1e5595bf 100644 --- a/agent/skyhook-agent/tests/test_steps.py +++ b/agent/skyhook-agent/tests/test_steps.py @@ -1,5 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + + import unittest, os from tempfile import TemporaryDirectory diff --git a/agent/tools/license_formatter.py b/agent/tools/license_formatter.py deleted file mode 100644 index 16639d74..00000000 --- a/agent/tools/license_formatter.py +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 -import sys - -license_text=open(sys.argv[1]).read() -file_text=open(sys.argv[2]).read() -if license_text not in file_text: - license_lines = license_text.split('\n') - new_lines = [] - added_license = False - for i, l in enumerate(file_text.split('\n')): - if l.startswith("# SPDX-FileCopyrightText") or l.startswith("# SPDX-License-Identifier"): - continue - - if i == 0 and l.startswith("#!"): - new_lines.append(l) - continue - - if not added_license: - new_lines.extend(license_lines) - added_license = True - - new_lines.append(l) - - - print("\n".join(new_lines),end='') -else: - print(file_text,end='') \ No newline at end of file diff --git a/boilerplate/boilerplate.go.txt b/boilerplate/boilerplate.go.txt deleted file mode 100644 index 9c819e2e..00000000 --- a/boilerplate/boilerplate.go.txt +++ /dev/null @@ -1,15 +0,0 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ \ No newline at end of file diff --git a/boilerplate/boilerplate.sh.txt b/boilerplate/boilerplate.sh.txt deleted file mode 100644 index a8b56462..00000000 --- a/boilerplate/boilerplate.sh.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. \ No newline at end of file diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 90a896ef..981b6bd0 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -20,4 +20,4 @@ version: 0.7.0 # It is recommended to use it with quotes. appVersion: "0.7.0" ## TODO: not sure how we want to manage this version -kubeVersion: ">=1.28.0" \ No newline at end of file +#kubeVersion: ">=1.28.0" \ No newline at end of file diff --git a/chart/values.yaml b/chart/values.yaml index fe1a3708..803e5a37 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -64,9 +64,9 @@ controllerManager: ## puaseImage: is the image used for the pause container in the operator controller. pauseImage: registry.k8s.io/pause:3.10 ## agentImage: is the image used for the agent container. This image is the default for this install, but can be overridden in the CR at package level. - agentImage: nvcr.io/nvidian/swgpu-baseos/skyhook-agent:latest + agentImage: ghcr.io/nvidia/skyhook/agent:latest image: - repository: nvcr.io/nvidian/swgpu-baseos/skyhook-operator + repository: ghcr.io/nvidia/skyhook/operator tag: latest # resources: If this is defined it will override the default calculation for resources # from estimatedNodeCount and estimatedPackageCount. The below values are @@ -104,6 +104,7 @@ rbac: createSkyhookEditorRole: false ## imagePullSecret: is the secret used to pull the operator controller image, agent image, and package images. imagePullSecret: node-init-secret +## useHostNetwork: Whether the Operator pods should use hostNetwork: true or false useHostNetwork: false ## estimatedPackageCount: estimated number of packages to be installed on the cluster ## this is used to calculate the resources for the operator controller diff --git a/containers/agentless/entrypoint.sh b/containers/agentless/entrypoint.sh index 88d1b1fb..4ba9374b 100755 --- a/containers/agentless/entrypoint.sh +++ b/containers/agentless/entrypoint.sh @@ -1,18 +1,37 @@ #!/bin/sh -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + SLEEP_LEN=${SLEEP_LEN:-$(($RANDOM % 5 + 5))} diff --git a/containers/agentless/versions.sh b/containers/agentless/versions.sh index afefb285..1431f1b1 100644 --- a/containers/agentless/versions.sh +++ b/containers/agentless/versions.sh @@ -1,18 +1,37 @@ #!/bin/bash -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + ## This is the list of versions that will be tagged for the test container so it can be ## used in the e2e tests. diff --git a/demos/interrupt-wait-for-pod/non-workload.yaml b/demos/interrupt-wait-for-pod/non-workload.yaml index d6078677..face6753 100644 --- a/demos/interrupt-wait-for-pod/non-workload.yaml +++ b/demos/interrupt-wait-for-pod/non-workload.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: apps/v1 kind: ReplicaSet metadata: diff --git a/demos/interrupt-wait-for-pod/scr.yaml b/demos/interrupt-wait-for-pod/scr.yaml index b0954839..a57d0ff3 100644 --- a/demos/interrupt-wait-for-pod/scr.yaml +++ b/demos/interrupt-wait-for-pod/scr.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/demos/interrupt-wait-for-pod/workload.yaml b/demos/interrupt-wait-for-pod/workload.yaml index 468e633f..fead5d4f 100644 --- a/demos/interrupt-wait-for-pod/workload.yaml +++ b/demos/interrupt-wait-for-pod/workload.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: apps/v1 kind: DaemonSet metadata: diff --git a/demos/shellscript/Dockerfile b/demos/shellscript/Dockerfile deleted file mode 100644 index 6ba715cb..00000000 --- a/demos/shellscript/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM busybox:latest - -RUN mkdir -p /skyhook-package/skyhook_dir -COPY . /skyhook-package \ No newline at end of file diff --git a/demos/shellscript/config.json b/demos/shellscript/config.json deleted file mode 100644 index efc0cd27..00000000 --- a/demos/shellscript/config.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema_version": "v1", - "package_name": "shellscript", - "package_version": "1.0.0", - "expected_config_files": [], - "modes": { - "apply": [ - { - "name": "apply", - "path": "shellscript_run.sh", - "arguments": ["apply"], - "returncodes": [ - 0 - ], - "on_host": true, - "env": {}, - "idempotence": true, - "upgrade_step": false - } - ], - "apply-check": [ - { - "name": "apply-check", - "path": "shellscript_run.sh", - "arguments": ["apply_check"], - "returncodes": [ - 0 - ], - "on_host": true, - "env": {}, - "idempotence": true, - "upgrade_step": false - } - ], - "config": [ - { - "name": "config", - "path": "shellscript_run.sh", - "arguments": ["config"], - "returncodes": [ - 0 - ], - "on_host": true, - "env": {}, - "idempotence": true, - "upgrade_step": false - } - ], - "config-check": [ - { - "name": "config-check", - "path": "shellscript_run.sh", - "arguments": ["config_check"], - "returncodes": [ - 0 - ], - "on_host": true, - "env": {}, - "idempotence": true, - "upgrade_step": false - } - ], - "uninstall": [ - { - "name": "uninstall", - "path": "shellscript_run.sh", - "arguments": ["uninstall"], - "returncodes": [ - 0 - ], - "on_host": true, - "env": {}, - "idempotence": true, - "upgrade_step": false - } - ], - "uninstall-check": [ - { - "name": "uninstall-check", - "path": "shellscript_run.sh", - "arguments": ["uninstall_check"], - "returncodes": [ - 0 - ], - "on_host": true, - "env": {}, - "idempotence": true, - "upgrade_step": false - } - ] - } -} \ No newline at end of file diff --git a/demos/shellscript/skyhook_dir/shellscript_run.sh b/demos/shellscript/skyhook_dir/shellscript_run.sh deleted file mode 100644 index d85fb050..00000000 --- a/demos/shellscript/skyhook_dir/shellscript_run.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -file=$1 - -if [ -f ${SKYHOOK_DIR}/configmaps/${file}.sh ]; then - . ${SKYHOOK_DIR}/configmaps/${file}.sh -else - echo "Could not find file ${SKYHOOK_DIR}/configmaps/${file}.sh was this in the configmap?" -fi diff --git a/k8s-tests/chainsaw/helm/helm-chart-test/assert-no-schedule.yaml b/k8s-tests/chainsaw/helm/helm-chart-test/assert-no-schedule.yaml index 8d69cf5c..a3e3ff53 100644 --- a/k8s-tests/chainsaw/helm/helm-chart-test/assert-no-schedule.yaml +++ b/k8s-tests/chainsaw/helm/helm-chart-test/assert-no-schedule.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Pod metadata: diff --git a/k8s-tests/chainsaw/helm/helm-chart-test/assert-scheduled.yaml b/k8s-tests/chainsaw/helm/helm-chart-test/assert-scheduled.yaml index fef7b6bf..875b2ccd 100644 --- a/k8s-tests/chainsaw/helm/helm-chart-test/assert-scheduled.yaml +++ b/k8s-tests/chainsaw/helm/helm-chart-test/assert-scheduled.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Pod metadata: diff --git a/k8s-tests/chainsaw/helm/helm-chart-test/chainsaw-test.yaml b/k8s-tests/chainsaw/helm/helm-chart-test/chainsaw-test.yaml index 7653558f..19f123b7 100644 --- a/k8s-tests/chainsaw/helm/helm-chart-test/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/helm/helm-chart-test/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/helm/helm-chart-test/values.yaml b/k8s-tests/chainsaw/helm/helm-chart-test/values.yaml index 62b63e85..b2bffdce 100644 --- a/k8s-tests/chainsaw/helm/helm-chart-test/values.yaml +++ b/k8s-tests/chainsaw/helm/helm-chart-test/values.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + controllerManager: # setting a toleration on the manager for testing purposes tolerations: diff --git a/k8s-tests/chainsaw/helm/helm-scale-test/assert-override-resources.yaml b/k8s-tests/chainsaw/helm/helm-scale-test/assert-override-resources.yaml index f23344bd..76335270 100644 --- a/k8s-tests/chainsaw/helm/helm-scale-test/assert-override-resources.yaml +++ b/k8s-tests/chainsaw/helm/helm-scale-test/assert-override-resources.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Pod metadata: diff --git a/k8s-tests/chainsaw/helm/helm-scale-test/assert-scaled-resources.yaml b/k8s-tests/chainsaw/helm/helm-scale-test/assert-scaled-resources.yaml index b73334a9..078af114 100644 --- a/k8s-tests/chainsaw/helm/helm-scale-test/assert-scaled-resources.yaml +++ b/k8s-tests/chainsaw/helm/helm-scale-test/assert-scaled-resources.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Pod metadata: diff --git a/k8s-tests/chainsaw/helm/helm-scale-test/chainsaw-test.yaml b/k8s-tests/chainsaw/helm/helm-scale-test/chainsaw-test.yaml index 068b6d1a..b5ac8815 100644 --- a/k8s-tests/chainsaw/helm/helm-scale-test/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/helm/helm-scale-test/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/helm/helm-scale-test/values-scale.yaml b/k8s-tests/chainsaw/helm/helm-scale-test/values-scale.yaml index 9fceee29..db9c493a 100644 --- a/k8s-tests/chainsaw/helm/helm-scale-test/values-scale.yaml +++ b/k8s-tests/chainsaw/helm/helm-scale-test/values-scale.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + controllerManager: manager: # telling the helm chart to use the test operator image diff --git a/k8s-tests/chainsaw/helm/helm-scale-test/vaules-override-resources.yaml b/k8s-tests/chainsaw/helm/helm-scale-test/vaules-override-resources.yaml index 29783419..a632674e 100644 --- a/k8s-tests/chainsaw/helm/helm-scale-test/vaules-override-resources.yaml +++ b/k8s-tests/chainsaw/helm/helm-scale-test/vaules-override-resources.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + controllerManager: manager: resources: diff --git a/k8s-tests/chainsaw/helm/install-cert-manager.sh b/k8s-tests/chainsaw/helm/install-cert-manager.sh index 4ba15cec..a20a2f06 100755 --- a/k8s-tests/chainsaw/helm/install-cert-manager.sh +++ b/k8s-tests/chainsaw/helm/install-cert-manager.sh @@ -1,18 +1,37 @@ #!/bin/bash -xe -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + ## need to specify different paths for the helm binary ## depending on whether or not this is being ran in CI diff --git a/k8s-tests/chainsaw/helm/install-helm-chart.sh b/k8s-tests/chainsaw/helm/install-helm-chart.sh index 5f305a52..3bd3cbbd 100755 --- a/k8s-tests/chainsaw/helm/install-helm-chart.sh +++ b/k8s-tests/chainsaw/helm/install-helm-chart.sh @@ -1,18 +1,37 @@ #!/bin/bash -xe -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + OPERATOR_NAME=$1 VALUES_FILE_NAME=${2:-values.yaml} diff --git a/k8s-tests/chainsaw/helm/taint-nodes.sh b/k8s-tests/chainsaw/helm/taint-nodes.sh index 3c504924..05730301 100755 --- a/k8s-tests/chainsaw/helm/taint-nodes.sh +++ b/k8s-tests/chainsaw/helm/taint-nodes.sh @@ -1,18 +1,37 @@ #!/bin/bash -xe -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + TAINT=$1 diff --git a/k8s-tests/chainsaw/helm/uninstall-cert-manager.sh b/k8s-tests/chainsaw/helm/uninstall-cert-manager.sh index 33088a97..d58bb0a4 100755 --- a/k8s-tests/chainsaw/helm/uninstall-cert-manager.sh +++ b/k8s-tests/chainsaw/helm/uninstall-cert-manager.sh @@ -1,18 +1,37 @@ #!/bin/bash -xe -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + ## need to specify different paths for the helm binary ## depending on whether or not this is being ran in CI diff --git a/k8s-tests/chainsaw/helm/uninstall-helm-chart.sh b/k8s-tests/chainsaw/helm/uninstall-helm-chart.sh index 1456958c..c9c7a2a2 100755 --- a/k8s-tests/chainsaw/helm/uninstall-helm-chart.sh +++ b/k8s-tests/chainsaw/helm/uninstall-helm-chart.sh @@ -1,18 +1,37 @@ #!/bin/bash -xe -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + OPERATOR_NAME=$1 diff --git a/k8s-tests/chainsaw/helm/untaint-nodes.sh b/k8s-tests/chainsaw/helm/untaint-nodes.sh index 2c309da4..bed3bfc5 100755 --- a/k8s-tests/chainsaw/helm/untaint-nodes.sh +++ b/k8s-tests/chainsaw/helm/untaint-nodes.sh @@ -1,18 +1,37 @@ #!/bin/bash -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + set -x -e -o pipefail diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update-no-interrupt.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update-no-interrupt.yaml index 47912487..4430b96a 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update-no-interrupt.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update-no-interrupt.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: v1 kind: Node diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update-while-running.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update-while-running.yaml index c9120ae8..adb92de6 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update-while-running.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update-while-running.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: v1 kind: Node diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update.yaml index ad66c9de..00ad5dd5 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/assert-update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: v1 kind: Node diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/assert.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/assert.yaml index 5327217b..87e57dc2 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/chainsaw-test.yaml index 3bf298be..d787c1de 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/skyhook.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/skyhook.yaml index e74b8530..d34c1fdb 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/update-no-interrupt.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/update-no-interrupt.yaml index 248a6b8b..ed514276 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/update-no-interrupt.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/update-no-interrupt.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/update-while-running.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/update-while-running.yaml index f70bf7d3..976d19fd 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/update-while-running.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/update-while-running.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/config-skyhook/update.yaml b/k8s-tests/chainsaw/skyhook/config-skyhook/update.yaml index bc844e82..4616b6d5 100644 --- a/k8s-tests/chainsaw/skyhook/config-skyhook/update.yaml +++ b/k8s-tests/chainsaw/skyhook/config-skyhook/update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/failure-skyhook/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/failure-skyhook/chainsaw-test.yaml index 17669bfd..ac53447b 100644 --- a/k8s-tests/chainsaw/skyhook/failure-skyhook/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/failure-skyhook/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/failure-skyhook/node-assert.yaml b/k8s-tests/chainsaw/skyhook/failure-skyhook/node-assert.yaml index c5a15be0..04c6897e 100644 --- a/k8s-tests/chainsaw/skyhook/failure-skyhook/node-assert.yaml +++ b/k8s-tests/chainsaw/skyhook/failure-skyhook/node-assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/failure-skyhook/skyhook.yaml b/k8s-tests/chainsaw/skyhook/failure-skyhook/skyhook.yaml index 974f50d4..340d406a 100644 --- a/k8s-tests/chainsaw/skyhook/failure-skyhook/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/failure-skyhook/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/hello-world/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/hello-world/chainsaw-test.yaml index d20906d5..5306dbee 100644 --- a/k8s-tests/chainsaw/skyhook/hello-world/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/hello-world/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/hello-world/configmap-assert.yaml b/k8s-tests/chainsaw/skyhook/hello-world/configmap-assert.yaml index ec424d4f..e9a7ab26 100644 --- a/k8s-tests/chainsaw/skyhook/hello-world/configmap-assert.yaml +++ b/k8s-tests/chainsaw/skyhook/hello-world/configmap-assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: ConfigMap metadata: diff --git a/k8s-tests/chainsaw/skyhook/hello-world/configmap.yaml b/k8s-tests/chainsaw/skyhook/hello-world/configmap.yaml index ec424d4f..e9a7ab26 100644 --- a/k8s-tests/chainsaw/skyhook/hello-world/configmap.yaml +++ b/k8s-tests/chainsaw/skyhook/hello-world/configmap.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: ConfigMap metadata: diff --git a/k8s-tests/chainsaw/skyhook/interrupt-grouping/assert.yaml b/k8s-tests/chainsaw/skyhook/interrupt-grouping/assert.yaml index 8e27aaba..cd6c3e74 100644 --- a/k8s-tests/chainsaw/skyhook/interrupt-grouping/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/interrupt-grouping/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + kind: Pod apiVersion: v1 metadata: diff --git a/k8s-tests/chainsaw/skyhook/interrupt-grouping/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/interrupt-grouping/chainsaw-test.yaml index ccbc3a9c..e1f43350 100644 --- a/k8s-tests/chainsaw/skyhook/interrupt-grouping/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/interrupt-grouping/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/interrupt-grouping/skyhook.yaml b/k8s-tests/chainsaw/skyhook/interrupt-grouping/skyhook.yaml index 0225f520..cfa30e26 100644 --- a/k8s-tests/chainsaw/skyhook/interrupt-grouping/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/interrupt-grouping/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook diff --git a/k8s-tests/chainsaw/skyhook/interrupt/assert.yaml b/k8s-tests/chainsaw/skyhook/interrupt/assert.yaml index 8f728364..80e43937 100644 --- a/k8s-tests/chainsaw/skyhook/interrupt/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/interrupt/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- kind: Pod apiVersion: v1 diff --git a/k8s-tests/chainsaw/skyhook/interrupt/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/interrupt/chainsaw-test.yaml index 64420e56..4fbdf9d2 100644 --- a/k8s-tests/chainsaw/skyhook/interrupt/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/interrupt/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/interrupt/pod.yaml b/k8s-tests/chainsaw/skyhook/interrupt/pod.yaml index 151b18b3..6f73545b 100644 --- a/k8s-tests/chainsaw/skyhook/interrupt/pod.yaml +++ b/k8s-tests/chainsaw/skyhook/interrupt/pod.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: v1 kind: Pod diff --git a/k8s-tests/chainsaw/skyhook/interrupt/skyhook.yaml b/k8s-tests/chainsaw/skyhook/interrupt/skyhook.yaml index feba9cfb..671ce2f0 100644 --- a/k8s-tests/chainsaw/skyhook/interrupt/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/interrupt/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook diff --git a/k8s-tests/chainsaw/skyhook/nodes_add_taint.sh b/k8s-tests/chainsaw/skyhook/nodes_add_taint.sh index ddf92002..fa3ea3df 100755 --- a/k8s-tests/chainsaw/skyhook/nodes_add_taint.sh +++ b/k8s-tests/chainsaw/skyhook/nodes_add_taint.sh @@ -1,18 +1,37 @@ #!/bin/bash -ex -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + n_to_taint=$1 taint=$2 diff --git a/k8s-tests/chainsaw/skyhook/nodes_remove_taint.sh b/k8s-tests/chainsaw/skyhook/nodes_remove_taint.sh index d755121a..b263f97a 100755 --- a/k8s-tests/chainsaw/skyhook/nodes_remove_taint.sh +++ b/k8s-tests/chainsaw/skyhook/nodes_remove_taint.sh @@ -1,18 +1,37 @@ #!/bin/bash -x -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + n_to_taint=$1 taint=$2 diff --git a/k8s-tests/chainsaw/skyhook/pod-finalizer/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/pod-finalizer/chainsaw-test.yaml index 73aca3d1..0ee1329f 100644 --- a/k8s-tests/chainsaw/skyhook/pod-finalizer/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/pod-finalizer/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/pod-finalizer/node-assert.yaml b/k8s-tests/chainsaw/skyhook/pod-finalizer/node-assert.yaml index 1dcc7e5f..0ee1c39a 100644 --- a/k8s-tests/chainsaw/skyhook/pod-finalizer/node-assert.yaml +++ b/k8s-tests/chainsaw/skyhook/pod-finalizer/node-assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/pod-finalizer/pod.yaml b/k8s-tests/chainsaw/skyhook/pod-finalizer/pod.yaml index 3abdd88f..657530c7 100644 --- a/k8s-tests/chainsaw/skyhook/pod-finalizer/pod.yaml +++ b/k8s-tests/chainsaw/skyhook/pod-finalizer/pod.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Pod metadata: diff --git a/k8s-tests/chainsaw/skyhook/rest_nodes.sh b/k8s-tests/chainsaw/skyhook/rest_nodes.sh index 6a6109a8..63f65d81 100755 --- a/k8s-tests/chainsaw/skyhook/rest_nodes.sh +++ b/k8s-tests/chainsaw/skyhook/rest_nodes.sh @@ -1,18 +1,37 @@ #!/bin/bash -eox pipefail -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + ## helper script ## clears labels and annotate from nodes with the prefix "skyhook.nvidia.com" diff --git a/k8s-tests/chainsaw/skyhook/rest_test.sh b/k8s-tests/chainsaw/skyhook/rest_test.sh index 9ddf7640..9ce9a855 100755 --- a/k8s-tests/chainsaw/skyhook/rest_test.sh +++ b/k8s-tests/chainsaw/skyhook/rest_test.sh @@ -1,18 +1,37 @@ #!/bin/bash -x -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + ## helper script ## clears labels and annotate from nodes with the prefix for tests diff --git a/k8s-tests/chainsaw/skyhook/runtime-required/assert.yaml b/k8s-tests/chainsaw/skyhook/runtime-required/assert.yaml index b0b582e6..9622a66b 100644 --- a/k8s-tests/chainsaw/skyhook/runtime-required/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/runtime-required/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/runtime-required/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/runtime-required/chainsaw-test.yaml index 2702ac62..2e01c07d 100644 --- a/k8s-tests/chainsaw/skyhook/runtime-required/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/runtime-required/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/runtime-required/skyhook.yaml b/k8s-tests/chainsaw/skyhook/runtime-required/skyhook.yaml index 5e32a04d..8e05e782 100644 --- a/k8s-tests/chainsaw/skyhook/runtime-required/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/runtime-required/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/simple-skyhook/assert.yaml b/k8s-tests/chainsaw/skyhook/simple-skyhook/assert.yaml index dc1bc223..b7403f78 100644 --- a/k8s-tests/chainsaw/skyhook/simple-skyhook/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/simple-skyhook/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- kind: Pod apiVersion: v1 diff --git a/k8s-tests/chainsaw/skyhook/simple-skyhook/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/simple-skyhook/chainsaw-test.yaml index 3ea4856c..88438721 100644 --- a/k8s-tests/chainsaw/skyhook/simple-skyhook/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/simple-skyhook/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/simple-skyhook/skyhook.yaml b/k8s-tests/chainsaw/skyhook/simple-skyhook/skyhook.yaml index af10e06a..2020b9d7 100644 --- a/k8s-tests/chainsaw/skyhook/simple-skyhook/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/simple-skyhook/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/assert-update.yaml b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/assert-update.yaml index 841bfc3b..f855a0d6 100644 --- a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/assert-update.yaml +++ b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/assert-update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- kind: ConfigMap apiVersion: v1 diff --git a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/assert.yaml b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/assert.yaml index 223ef0c1..6de2e8e3 100644 --- a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/chainsaw-test.yaml index 5e2fe30a..13229051 100644 --- a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/skyhook.yaml b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/skyhook.yaml index 38b09918..ba6838b8 100644 --- a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/update.yaml b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/update.yaml index bbf6d8e9..381866a2 100644 --- a/k8s-tests/chainsaw/skyhook/simple-update-skyhook/update.yaml +++ b/k8s-tests/chainsaw/skyhook/simple-update-skyhook/update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/skyhook-upgrade/assert.yaml b/k8s-tests/chainsaw/skyhook/skyhook-upgrade/assert.yaml index 5fc07e2f..1e05c5a7 100644 --- a/k8s-tests/chainsaw/skyhook/skyhook-upgrade/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/skyhook-upgrade/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/skyhook-upgrade/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/skyhook-upgrade/chainsaw-test.yaml index 6ee75d8c..aaa792fe 100644 --- a/k8s-tests/chainsaw/skyhook/skyhook-upgrade/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/skyhook-upgrade/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/skyhook-upgrade/skyhook.yaml b/k8s-tests/chainsaw/skyhook/skyhook-upgrade/skyhook.yaml index b04d577b..97bb3b52 100644 --- a/k8s-tests/chainsaw/skyhook/skyhook-upgrade/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/skyhook-upgrade/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/taint-scheduling/assert-update.yaml b/k8s-tests/chainsaw/skyhook/taint-scheduling/assert-update.yaml index dd70a0ff..b657bed8 100644 --- a/k8s-tests/chainsaw/skyhook/taint-scheduling/assert-update.yaml +++ b/k8s-tests/chainsaw/skyhook/taint-scheduling/assert-update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/taint-scheduling/assert.yaml b/k8s-tests/chainsaw/skyhook/taint-scheduling/assert.yaml index bca69d41..05ed2baf 100644 --- a/k8s-tests/chainsaw/skyhook/taint-scheduling/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/taint-scheduling/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/taint-scheduling/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/taint-scheduling/chainsaw-test.yaml index d7df81a2..c3966aed 100644 --- a/k8s-tests/chainsaw/skyhook/taint-scheduling/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/taint-scheduling/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/taint-scheduling/skyhook.yaml b/k8s-tests/chainsaw/skyhook/taint-scheduling/skyhook.yaml index 3098c64d..c5911d36 100644 --- a/k8s-tests/chainsaw/skyhook/taint-scheduling/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/taint-scheduling/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/taint-scheduling/update-skyhook.yaml b/k8s-tests/chainsaw/skyhook/taint-scheduling/update-skyhook.yaml index 2221daf2..c7415c84 100644 --- a/k8s-tests/chainsaw/skyhook/taint-scheduling/update-skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/taint-scheduling/update-skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update-no-packages.yaml b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update-no-packages.yaml index b06d48cd..dfe607e0 100644 --- a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update-no-packages.yaml +++ b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update-no-packages.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- kind: Pod apiVersion: v1 diff --git a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update.yaml b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update.yaml index 44ae1886..ad51a84f 100644 --- a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update.yaml +++ b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- kind: Pod apiVersion: v1 diff --git a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert.yaml b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert.yaml index 56d54187..a97574c6 100644 --- a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/chainsaw-test.yaml index 44ab4ad3..eb84a7a9 100644 --- a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/skyhook.yaml b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/skyhook.yaml index 9cb5e639..16a09845 100644 --- a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/update-no-packages.yaml b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/update-no-packages.yaml index 25b407ef..32625103 100644 --- a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/update-no-packages.yaml +++ b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/update-no-packages.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/update.yaml b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/update.yaml index f48abc11..82a47f0a 100644 --- a/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/update.yaml +++ b/k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/validate-packages/assert-update.yaml b/k8s-tests/chainsaw/skyhook/validate-packages/assert-update.yaml index c89c187e..90d92109 100644 --- a/k8s-tests/chainsaw/skyhook/validate-packages/assert-update.yaml +++ b/k8s-tests/chainsaw/skyhook/validate-packages/assert-update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/validate-packages/assert.yaml b/k8s-tests/chainsaw/skyhook/validate-packages/assert.yaml index 2a00c7b4..46c044a6 100644 --- a/k8s-tests/chainsaw/skyhook/validate-packages/assert.yaml +++ b/k8s-tests/chainsaw/skyhook/validate-packages/assert.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Node metadata: diff --git a/k8s-tests/chainsaw/skyhook/validate-packages/chainsaw-test.yaml b/k8s-tests/chainsaw/skyhook/validate-packages/chainsaw-test.yaml index 7283119a..720de55e 100644 --- a/k8s-tests/chainsaw/skyhook/validate-packages/chainsaw-test.yaml +++ b/k8s-tests/chainsaw/skyhook/validate-packages/chainsaw-test.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json apiVersion: chainsaw.kyverno.io/v1alpha1 kind: Test diff --git a/k8s-tests/chainsaw/skyhook/validate-packages/skyhook.yaml b/k8s-tests/chainsaw/skyhook/validate-packages/skyhook.yaml index 89dd9100..ade772ff 100644 --- a/k8s-tests/chainsaw/skyhook/validate-packages/skyhook.yaml +++ b/k8s-tests/chainsaw/skyhook/validate-packages/skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/chainsaw/skyhook/validate-packages/update.yaml b/k8s-tests/chainsaw/skyhook/validate-packages/update.yaml index ce0528a4..76f448c7 100644 --- a/k8s-tests/chainsaw/skyhook/validate-packages/update.yaml +++ b/k8s-tests/chainsaw/skyhook/validate-packages/update.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/k8s-tests/time_travel_tests/migration_0.5.0/migration.sh b/k8s-tests/time_travel_tests/migration_0.5.0/migration.sh index 7cc6b932..e7681b86 100755 --- a/k8s-tests/time_travel_tests/migration_0.5.0/migration.sh +++ b/k8s-tests/time_travel_tests/migration_0.5.0/migration.sh @@ -1,18 +1,37 @@ #!/bin/bash -e -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + ## this test is to verify the migration from 0.4.0 to 0.5.0 works as expected diff --git a/kyverno/README.md b/kyverno/README.md index c6ddbfa7..4619bcc2 100644 --- a/kyverno/README.md +++ b/kyverno/README.md @@ -56,7 +56,7 @@ spec: config.sh: |- #!/bin/bash echo "hello" - image: shellscript + image: ghcr.io/nvidia/skyhook-packages/shellscript version: 1.3.2 # This will be blocked by the policy diff --git a/kyverno/disable_packages.yaml b/kyverno/disable_packages.yaml index a2c33384..1a89f7d4 100644 --- a/kyverno/disable_packages.yaml +++ b/kyverno/disable_packages.yaml @@ -1,3 +1,23 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + # This is an example to show how to restrict the images that can be used in a Skyhook package. # It is not a complete policy and it is expected end users will alter rules to fit their security needs. apiVersion: kyverno.io/v1 @@ -30,7 +50,7 @@ spec: deny: conditions: any: - - key: "{{ regex_match('nvcr.io/nvidian/swgpu-baseos/shellscript', '{{request.object.spec.packages.*.image}}' ) }}" + - key: "{{ regex_match('ghcr.io/nvidia/skyhook-packages/shellscript', '{{request.object.spec.packages.*.image}}' ) }}" operator: Equals value: true - key: "{{ regex_match('docker.io/.*', '{{request.object.spec.packages.*.image}}' ) }}" diff --git a/kyverno/skyhook-viewer-binding.yaml b/kyverno/skyhook-viewer-binding.yaml index 3f0ee809..d1c159d4 100644 --- a/kyverno/skyhook-viewer-binding.yaml +++ b/kyverno/skyhook-viewer-binding.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: diff --git a/operator/.golangci.yml b/operator/.golangci.yml index ffeef805..3cb95eea 100644 --- a/operator/.golangci.yml +++ b/operator/.golangci.yml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + run: deadline: 5m allow-parallel-runners: true diff --git a/operator/.mockery.yaml b/operator/.mockery.yaml index 1bd29203..746d31df 100644 --- a/operator/.mockery.yaml +++ b/operator/.mockery.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + dir: "{{.InterfaceDir}}/mock" filename: "{{.InterfaceName }}.go" diff --git a/operator/LICENSE b/operator/LICENSE new file mode 120000 index 00000000..ea5b6064 --- /dev/null +++ b/operator/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/operator/Makefile b/operator/Makefile index f1db31eb..55d08743 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -121,13 +121,14 @@ license-check: go-licenses ## Run go-licenses check against code. $(LOCALBIN)/go-licenses check ./... --allowed_licenses=MIT,BSD-2-Clause,BSD-3-Clause,Apache-2.0,ISC,Zlib .PHONY: license-fmt -license-fmt: go-license ## Run add license header to code. - $(LOCALBIN)/go-license --config license.yml $$(find "$$PWD" -name *.go | sed "s;$$PWD/;;g") +license-fmt: ## Run add license header to code. + python3 ../scripts/format_license.py --root-dir . --license-file ../LICENSE .PHONY: fmt fmt: license-fmt ## Run go fmt against code. go fmt $(GOFLAGS) ./... + .PHONY: vet vet: ## Run go vet against code. go vet $(GOFLAGS) ./... diff --git a/operator/README.md b/operator/README.md index 0ff0c6f7..68792962 100644 --- a/operator/README.md +++ b/operator/README.md @@ -130,7 +130,6 @@ Development generate-mocks Generate code for interface mocking license-report Run run license report license-check Run go-licenses check against code. - license-fmt Run add license header to code. fmt Run go fmt against code. vet Run go vet against code. test Run all tests. @@ -174,13 +173,10 @@ Build Dependencies # Deployment -The helm repos are here: -- [Prod - https://helm.ngc.nvidia.com/nv-ngc-devops/skyhook-operator](https://helm.ngc.nvidia.com/nv-ngc-devops/skyhook-operator) -- [Dev - https://helm.ngc.nvidia.com/nvidian/swgpu-baseos/skyhook-operator](https://helm.ngc.nvidia.com/nvidian/swgpu-baseos/skyhook-operator) +The helm repos are currently being migrated. Please use the chart directly in this repo. Operator containers: -- [Prod - nvcr.io/nv-ngc-devops/skyhook-operator](https://nvcr.io/nv-ngc-devops/skyhook-operator) -- [Dev - nvcr.io/nvidian/swgpu-baseos/skyhook-operator](https://nvcr.io/nvidian/swgpu-baseos/skyhook-operator) +- ghcr.io/nvidia/skyhook/operator ## Deploy from main diff --git a/operator/api/v1alpha1/groupversion_info.go b/operator/api/v1alpha1/groupversion_info.go index 5cb557b7..c257d6b8 100644 --- a/operator/api/v1alpha1/groupversion_info.go +++ b/operator/api/v1alpha1/groupversion_info.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + // Package v1alpha1 contains API Schema definitions for the skyhook v1alpha1 API group // +kubebuilder:object:generate=true diff --git a/operator/api/v1alpha1/skyhook_types.go b/operator/api/v1alpha1/skyhook_types.go index 04ea477a..4d1dba31 100644 --- a/operator/api/v1alpha1/skyhook_types.go +++ b/operator/api/v1alpha1/skyhook_types.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package v1alpha1 diff --git a/operator/api/v1alpha1/skyhook_types_test.go b/operator/api/v1alpha1/skyhook_types_test.go index 8a5b241e..d327012f 100644 --- a/operator/api/v1alpha1/skyhook_types_test.go +++ b/operator/api/v1alpha1/skyhook_types_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package v1alpha1 diff --git a/operator/api/v1alpha1/skyhook_webhook.go b/operator/api/v1alpha1/skyhook_webhook.go index 15913e06..7964f5ee 100644 --- a/operator/api/v1alpha1/skyhook_webhook.go +++ b/operator/api/v1alpha1/skyhook_webhook.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package v1alpha1 diff --git a/operator/api/v1alpha1/skyhook_webhook_test.go b/operator/api/v1alpha1/skyhook_webhook_test.go index 52bfa801..c4ed6091 100644 --- a/operator/api/v1alpha1/skyhook_webhook_test.go +++ b/operator/api/v1alpha1/skyhook_webhook_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package v1alpha1 diff --git a/operator/api/v1alpha1/webhook_suite_test.go b/operator/api/v1alpha1/webhook_suite_test.go index 715776b2..f4641644 100644 --- a/operator/api/v1alpha1/webhook_suite_test.go +++ b/operator/api/v1alpha1/webhook_suite_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package v1alpha1 diff --git a/operator/api/v1alpha1/zz_generated.deepcopy.go b/operator/api/v1alpha1/zz_generated.deepcopy.go index 3c8e8ee2..aafe7045 100644 --- a/operator/api/v1alpha1/zz_generated.deepcopy.go +++ b/operator/api/v1alpha1/zz_generated.deepcopy.go @@ -1,20 +1,30 @@ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + + + //go:build !ignore_autogenerated -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ + // Code generated by controller-gen. DO NOT EDIT. diff --git a/operator/cmd/main.go b/operator/cmd/main.go index 1b17114c..684dc9b5 100644 --- a/operator/cmd/main.go +++ b/operator/cmd/main.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package main diff --git a/operator/config/certmanager/certificate.yaml b/operator/config/certmanager/certificate.yaml index c00db6a5..ab4d48a2 100644 --- a/operator/config/certmanager/certificate.yaml +++ b/operator/config/certmanager/certificate.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # The following manifests contain a self-signed issuer CR and a certificate CR. # More document can be found at https://docs.cert-manager.io # WARNING: Targets CertManager v1.0. Check https://cert-manager.io/docs/installation/upgrading/ for breaking changes. diff --git a/operator/config/certmanager/kustomization.yaml b/operator/config/certmanager/kustomization.yaml index bebea5a5..a7b34351 100644 --- a/operator/config/certmanager/kustomization.yaml +++ b/operator/config/certmanager/kustomization.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + resources: - certificate.yaml diff --git a/operator/config/certmanager/kustomizeconfig.yaml b/operator/config/certmanager/kustomizeconfig.yaml index cf6f89e8..1f6d3c42 100644 --- a/operator/config/certmanager/kustomizeconfig.yaml +++ b/operator/config/certmanager/kustomizeconfig.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # This configuration is for teaching kustomize how to update name ref substitution nameReference: - kind: Issuer diff --git a/operator/config/crd/bases/skyhook.nvidia.com_skyhooks.yaml b/operator/config/crd/bases/skyhook.nvidia.com_skyhooks.yaml index 3826f0a5..06183079 100644 --- a/operator/config/crd/bases/skyhook.nvidia.com_skyhooks.yaml +++ b/operator/config/crd/bases/skyhook.nvidia.com_skyhooks.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/operator/config/crd/kustomization.yaml b/operator/config/crd/kustomization.yaml index 8c50c863..b6653223 100644 --- a/operator/config/crd/kustomization.yaml +++ b/operator/config/crd/kustomization.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # This kustomization.yaml is not intended to be run by itself, # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default diff --git a/operator/config/crd/kustomizeconfig.yaml b/operator/config/crd/kustomizeconfig.yaml index ec5c150a..b1bb587d 100644 --- a/operator/config/crd/kustomizeconfig.yaml +++ b/operator/config/crd/kustomizeconfig.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # This file is for teaching kustomize how to substitute name and namespace reference in CRD nameReference: - kind: Service diff --git a/operator/config/crd/patches/cainjection_in_skyhooks.yaml b/operator/config/crd/patches/cainjection_in_skyhooks.yaml index 495c90ee..081a569b 100644 --- a/operator/config/crd/patches/cainjection_in_skyhooks.yaml +++ b/operator/config/crd/patches/cainjection_in_skyhooks.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # The following patch adds a directive for certmanager to inject CA into the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/operator/config/crd/patches/webhook_in_skyhooks.yaml b/operator/config/crd/patches/webhook_in_skyhooks.yaml index 7a9e6c9c..ab4e29f0 100644 --- a/operator/config/crd/patches/webhook_in_skyhooks.yaml +++ b/operator/config/crd/patches/webhook_in_skyhooks.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # The following patch enables a conversion webhook for the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/operator/config/default/kustomization.yaml b/operator/config/default/kustomization.yaml index c385d62a..3d9a2685 100644 --- a/operator/config/default/kustomization.yaml +++ b/operator/config/default/kustomization.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # Adds namespace to all resources. namespace: skyhook-operator-system diff --git a/operator/config/default/manager_auth_proxy_patch.yaml b/operator/config/default/manager_auth_proxy_patch.yaml index e2ce327d..cc7b066a 100644 --- a/operator/config/default/manager_auth_proxy_patch.yaml +++ b/operator/config/default/manager_auth_proxy_patch.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # This patch inject a sidecar container which is a HTTP proxy for the # controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. apiVersion: apps/v1 diff --git a/operator/config/default/manager_config_patch.yaml b/operator/config/default/manager_config_patch.yaml index f6f58916..31ffba13 100644 --- a/operator/config/default/manager_config_patch.yaml +++ b/operator/config/default/manager_config_patch.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/operator/config/default/manager_webhook_patch.yaml b/operator/config/default/manager_webhook_patch.yaml index 738de350..3f6e0ef0 100644 --- a/operator/config/default/manager_webhook_patch.yaml +++ b/operator/config/default/manager_webhook_patch.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/operator/config/default/webhookcainjection_patch.yaml b/operator/config/default/webhookcainjection_patch.yaml index 68c055e7..f35efa32 100644 --- a/operator/config/default/webhookcainjection_patch.yaml +++ b/operator/config/default/webhookcainjection_patch.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # This patch add annotation to admission webhook config and # CERTIFICATE_NAMESPACE and CERTIFICATE_NAME will be substituted by kustomize apiVersion: admissionregistration.k8s.io/v1 diff --git a/operator/config/local-dev/dashboard.yaml b/operator/config/local-dev/dashboard.yaml index 4927c83e..9c95003e 100644 --- a/operator/config/local-dev/dashboard.yaml +++ b/operator/config/local-dev/dashboard.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + ## local dev only --- apiVersion: v1 diff --git a/operator/config/local-dev/kind-config.yaml b/operator/config/local-dev/kind-config.yaml index 1087413c..7444a8b5 100644 --- a/operator/config/local-dev/kind-config.yaml +++ b/operator/config/local-dev/kind-config.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # three node (two workers) local kind cluster config for testing # makefile references this to create this cluster kind: Cluster diff --git a/operator/config/manager/kustomization.yaml b/operator/config/manager/kustomization.yaml index dccd4ff3..0c5f091a 100644 --- a/operator/config/manager/kustomization.yaml +++ b/operator/config/manager/kustomization.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + resources: - manager.yaml apiVersion: kustomize.config.k8s.io/v1beta1 diff --git a/operator/config/manager/manager.yaml b/operator/config/manager/manager.yaml index c8927fe0..1e525588 100644 --- a/operator/config/manager/manager.yaml +++ b/operator/config/manager/manager.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Namespace metadata: diff --git a/operator/config/prometheus/kustomization.yaml b/operator/config/prometheus/kustomization.yaml index ed137168..3518ad80 100644 --- a/operator/config/prometheus/kustomization.yaml +++ b/operator/config/prometheus/kustomization.yaml @@ -1,2 +1,28 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + resources: - monitor.yaml diff --git a/operator/config/prometheus/monitor.yaml b/operator/config/prometheus/monitor.yaml index 465c12aa..119717cc 100644 --- a/operator/config/prometheus/monitor.yaml +++ b/operator/config/prometheus/monitor.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # Prometheus Monitor Service (Metrics) apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor diff --git a/operator/config/rbac/auth_proxy_client_clusterrole.yaml b/operator/config/rbac/auth_proxy_client_clusterrole.yaml index f4b02046..a1615d17 100644 --- a/operator/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/operator/config/rbac/auth_proxy_client_clusterrole.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: diff --git a/operator/config/rbac/auth_proxy_role.yaml b/operator/config/rbac/auth_proxy_role.yaml index b7c95644..4f969364 100644 --- a/operator/config/rbac/auth_proxy_role.yaml +++ b/operator/config/rbac/auth_proxy_role.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: diff --git a/operator/config/rbac/auth_proxy_role_binding.yaml b/operator/config/rbac/auth_proxy_role_binding.yaml index 6b48fb18..9e132192 100644 --- a/operator/config/rbac/auth_proxy_role_binding.yaml +++ b/operator/config/rbac/auth_proxy_role_binding.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: diff --git a/operator/config/rbac/auth_proxy_service.yaml b/operator/config/rbac/auth_proxy_service.yaml index ff69f2e8..1f9e5324 100644 --- a/operator/config/rbac/auth_proxy_service.yaml +++ b/operator/config/rbac/auth_proxy_service.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Service metadata: diff --git a/operator/config/rbac/kustomization.yaml b/operator/config/rbac/kustomization.yaml index 731832a6..b01374a6 100644 --- a/operator/config/rbac/kustomization.yaml +++ b/operator/config/rbac/kustomization.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + resources: # All RBAC will be applied under this service account in # the deployment namespace. You may comment out this resource diff --git a/operator/config/rbac/leader_election_role.yaml b/operator/config/rbac/leader_election_role.yaml index 53cb11b3..498b9ce2 100644 --- a/operator/config/rbac/leader_election_role.yaml +++ b/operator/config/rbac/leader_election_role.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # permissions to do leader election. apiVersion: rbac.authorization.k8s.io/v1 kind: Role diff --git a/operator/config/rbac/leader_election_role_binding.yaml b/operator/config/rbac/leader_election_role_binding.yaml index a1f0c527..c9883567 100644 --- a/operator/config/rbac/leader_election_role_binding.yaml +++ b/operator/config/rbac/leader_election_role_binding.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: diff --git a/operator/config/rbac/role.yaml b/operator/config/rbac/role.yaml index 215f8466..416bb840 100644 --- a/operator/config/rbac/role.yaml +++ b/operator/config/rbac/role.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/operator/config/rbac/role_binding.yaml b/operator/config/rbac/role_binding.yaml index a62a40a0..46662b3b 100644 --- a/operator/config/rbac/role_binding.yaml +++ b/operator/config/rbac/role_binding.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: diff --git a/operator/config/rbac/service_account.yaml b/operator/config/rbac/service_account.yaml index cdd1f60f..7359132e 100644 --- a/operator/config/rbac/service_account.yaml +++ b/operator/config/rbac/service_account.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: ServiceAccount metadata: diff --git a/operator/config/rbac/skyhook_editor_role.yaml b/operator/config/rbac/skyhook_editor_role.yaml index 99a5ef49..d24030e2 100644 --- a/operator/config/rbac/skyhook_editor_role.yaml +++ b/operator/config/rbac/skyhook_editor_role.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # permissions for end users to edit skyhooks. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/operator/config/rbac/skyhook_viewer_role.yaml b/operator/config/rbac/skyhook_viewer_role.yaml index 1f8d62d4..d89a96e9 100644 --- a/operator/config/rbac/skyhook_viewer_role.yaml +++ b/operator/config/rbac/skyhook_viewer_role.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # permissions for end users to view skyhooks. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/operator/config/samples/interrupt_group.yaml b/operator/config/samples/interrupt_group.yaml index 8370ebd1..801eb596 100644 --- a/operator/config/samples/interrupt_group.yaml +++ b/operator/config/samples/interrupt_group.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/operator/config/samples/kustomization.yaml b/operator/config/samples/kustomization.yaml index 4072b734..e498d8d7 100644 --- a/operator/config/samples/kustomization.yaml +++ b/operator/config/samples/kustomization.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + ## Append samples of your project ## resources: - skyhook_v1alpha1_skyhook.yaml diff --git a/operator/config/samples/skyhook_v1alpha1_skyhook.yaml b/operator/config/samples/skyhook_v1alpha1_skyhook.yaml index 26d05346..3021eb36 100644 --- a/operator/config/samples/skyhook_v1alpha1_skyhook.yaml +++ b/operator/config/samples/skyhook_v1alpha1_skyhook.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: skyhook.nvidia.com/v1alpha1 kind: Skyhook metadata: diff --git a/operator/config/webhook/kustomization.yaml b/operator/config/webhook/kustomization.yaml index 9cf26134..055b078a 100644 --- a/operator/config/webhook/kustomization.yaml +++ b/operator/config/webhook/kustomization.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + resources: - manifests.yaml - service.yaml diff --git a/operator/config/webhook/kustomizeconfig.yaml b/operator/config/webhook/kustomizeconfig.yaml index 206316e5..160471cf 100644 --- a/operator/config/webhook/kustomizeconfig.yaml +++ b/operator/config/webhook/kustomizeconfig.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + # the following config is for teaching kustomize where to look at when substituting nameReference. # It requires kustomize v2.1.0 or newer to work properly. nameReference: diff --git a/operator/config/webhook/manifests.yaml b/operator/config/webhook/manifests.yaml index 1325caac..9f1cba42 100644 --- a/operator/config/webhook/manifests.yaml +++ b/operator/config/webhook/manifests.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + --- apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration diff --git a/operator/config/webhook/service.yaml b/operator/config/webhook/service.yaml index fa89e988..63a42ce1 100644 --- a/operator/config/webhook/service.yaml +++ b/operator/config/webhook/service.yaml @@ -1,3 +1,29 @@ +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + + + + + + + apiVersion: v1 kind: Service metadata: diff --git a/operator/internal/controller/annotations.go b/operator/internal/controller/annotations.go index 98788f1e..c9816751 100644 --- a/operator/internal/controller/annotations.go +++ b/operator/internal/controller/annotations.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/cluster_state_v2.go b/operator/internal/controller/cluster_state_v2.go index 7e420491..d8ae3437 100644 --- a/operator/internal/controller/cluster_state_v2.go +++ b/operator/internal/controller/cluster_state_v2.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/cluster_state_v2_test.go b/operator/internal/controller/cluster_state_v2_test.go index 305e6c89..2ac0b333 100644 --- a/operator/internal/controller/cluster_state_v2_test.go +++ b/operator/internal/controller/cluster_state_v2_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/event_handler.go b/operator/internal/controller/event_handler.go index 44a04cf2..d1a859d6 100644 --- a/operator/internal/controller/event_handler.go +++ b/operator/internal/controller/event_handler.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/event_handler_test.go b/operator/internal/controller/event_handler_test.go index 05fa6e77..dea6fbd9 100644 --- a/operator/internal/controller/event_handler_test.go +++ b/operator/internal/controller/event_handler_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/mock/SkyhookNodes.go b/operator/internal/controller/mock/SkyhookNodes.go index 296f640f..a34b2ebe 100644 --- a/operator/internal/controller/mock/SkyhookNodes.go +++ b/operator/internal/controller/mock/SkyhookNodes.go @@ -1,18 +1,28 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + + + + // Code generated by mockery v2.42.3. DO NOT EDIT. package controller diff --git a/operator/internal/controller/pod_controller.go b/operator/internal/controller/pod_controller.go index d8d44c99..e2bd180f 100644 --- a/operator/internal/controller/pod_controller.go +++ b/operator/internal/controller/pod_controller.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/skyhook_controller.go b/operator/internal/controller/skyhook_controller.go index 36df8df3..ed82db24 100644 --- a/operator/internal/controller/skyhook_controller.go +++ b/operator/internal/controller/skyhook_controller.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/skyhook_controller_test.go b/operator/internal/controller/skyhook_controller_test.go index 451cceb0..33d5ef7d 100644 --- a/operator/internal/controller/skyhook_controller_test.go +++ b/operator/internal/controller/skyhook_controller_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/suite_test.go b/operator/internal/controller/suite_test.go index e3634043..d55a8bd9 100644 --- a/operator/internal/controller/suite_test.go +++ b/operator/internal/controller/suite_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/controller/zz.migration.0.5.0.go b/operator/internal/controller/zz.migration.0.5.0.go index b9ed4716..0b8dad4e 100644 --- a/operator/internal/controller/zz.migration.0.5.0.go +++ b/operator/internal/controller/zz.migration.0.5.0.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package controller diff --git a/operator/internal/dal/dal.go b/operator/internal/dal/dal.go index 6a879c8a..ec7f57c9 100644 --- a/operator/internal/dal/dal.go +++ b/operator/internal/dal/dal.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package dal diff --git a/operator/internal/dal/mock/DAL.go b/operator/internal/dal/mock/DAL.go index 38c5ed8a..291afbf6 100644 --- a/operator/internal/dal/mock/DAL.go +++ b/operator/internal/dal/mock/DAL.go @@ -1,18 +1,28 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + + + + // Code generated by mockery v2.42.3. DO NOT EDIT. package dal diff --git a/operator/internal/graph/dependency_graph.go b/operator/internal/graph/dependency_graph.go index b4f355c3..5e238eac 100644 --- a/operator/internal/graph/dependency_graph.go +++ b/operator/internal/graph/dependency_graph.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package graph diff --git a/operator/internal/graph/dependency_graph_test.go b/operator/internal/graph/dependency_graph_test.go index f2116bc8..5942e32f 100644 --- a/operator/internal/graph/dependency_graph_test.go +++ b/operator/internal/graph/dependency_graph_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package graph diff --git a/operator/internal/mocks/client/Client.go b/operator/internal/mocks/client/Client.go index 62992d78..b11003d5 100644 --- a/operator/internal/mocks/client/Client.go +++ b/operator/internal/mocks/client/Client.go @@ -1,18 +1,28 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + + + + // Code generated by mockery v2.42.3. DO NOT EDIT. package client diff --git a/operator/internal/mocks/record/EventRecorder.go b/operator/internal/mocks/record/EventRecorder.go index 8b842f7f..3e9d6ce8 100644 --- a/operator/internal/mocks/record/EventRecorder.go +++ b/operator/internal/mocks/record/EventRecorder.go @@ -1,18 +1,28 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + + + + // Code generated by mockery v2.42.3. DO NOT EDIT. package record diff --git a/operator/internal/mocks/workqueue/RateLimitingInterface.go b/operator/internal/mocks/workqueue/RateLimitingInterface.go index 07e3125c..0f6463b8 100644 --- a/operator/internal/mocks/workqueue/RateLimitingInterface.go +++ b/operator/internal/mocks/workqueue/RateLimitingInterface.go @@ -1,18 +1,28 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + + + + // Code generated by mockery v2.42.3. DO NOT EDIT. package workqueue diff --git a/operator/internal/version/version.go b/operator/internal/version/version.go index e3bbce81..ea9efa3a 100644 --- a/operator/internal/version/version.go +++ b/operator/internal/version/version.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package version diff --git a/operator/internal/wrapper/node.go b/operator/internal/wrapper/node.go index 3f56d273..f7810db1 100644 --- a/operator/internal/wrapper/node.go +++ b/operator/internal/wrapper/node.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package wrapper diff --git a/operator/internal/wrapper/skyhook.go b/operator/internal/wrapper/skyhook.go index 48dd93f3..8539f9d4 100644 --- a/operator/internal/wrapper/skyhook.go +++ b/operator/internal/wrapper/skyhook.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package wrapper diff --git a/operator/internal/wrapper/skyhook_test.go b/operator/internal/wrapper/skyhook_test.go index aa97e681..aeaf31ef 100644 --- a/operator/internal/wrapper/skyhook_test.go +++ b/operator/internal/wrapper/skyhook_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package wrapper diff --git a/operator/internal/wrapper/wrapper_suite_test.go b/operator/internal/wrapper/wrapper_suite_test.go index c08f646a..44f9d14d 100644 --- a/operator/internal/wrapper/wrapper_suite_test.go +++ b/operator/internal/wrapper/wrapper_suite_test.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package wrapper_test diff --git a/operator/internal/wrapper/zz.migration.0.5.0.go b/operator/internal/wrapper/zz.migration.0.5.0.go index 0a70a550..f2e1d9c5 100644 --- a/operator/internal/wrapper/zz.migration.0.5.0.go +++ b/operator/internal/wrapper/zz.migration.0.5.0.go @@ -1,18 +1,25 @@ -/** -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -**/ +/* + * LICENSE START + * + * Copyright (c) NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * LICENSE END + */ + + + package wrapper diff --git a/operator/license.yml b/operator/license.yml deleted file mode 100644 index 412c4b1c..00000000 --- a/operator/license.yml +++ /dev/null @@ -1,23 +0,0 @@ -# used with go-license https://github.com/palantir/go-license -header: | - /** - # Copyright (c) NVIDIA CORPORATION. All rights reserved. - # - # 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. - **/ - -exclude: - names: - - "mocks" - - "mock" - - "vendor" \ No newline at end of file diff --git a/scripts/find-skyhook-resources.sh b/scripts/find-skyhook-resources.sh index 5fa30900..79f32e19 100755 --- a/scripts/find-skyhook-resources.sh +++ b/scripts/find-skyhook-resources.sh @@ -1,18 +1,37 @@ #!/bin/bash -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + + + + + + + + + ## prints out all resources that are namespaced ## can be helpful for debuging diff --git a/scripts/format_license.py b/scripts/format_license.py new file mode 100755 index 00000000..e405f910 --- /dev/null +++ b/scripts/format_license.py @@ -0,0 +1,266 @@ +#!/usr/bin/env python3 + +# +# LICENSE START +# +# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# 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. +# +# LICENSE END +# + +import os +import argparse +from typing import Dict, List, Tuple +import fnmatch +import re + +# Comment style definitions for different file types +COMMENT_STYLES = { + '.py': { + 'start': '# ', + 'line': '# ', + 'end': '# ' + }, + '.sh': { + 'start': '# ', + 'line': '# ', + 'end': '# ' + }, + '.go': { + 'start': '/*', + 'line': ' * ', + 'end': ' */' + }, + '.yml': { + 'start': '# ', + 'line': '# ', + 'end': '# ' + }, + '.yaml': { + 'start': '# ', + 'line': '# ', + 'end': '# ' + } +} + +# Built-in ignore patterns +BUILT_IN_IGNORE_PATTERNS = [ + # Vendor directories + 'vendor', + 'vendor/*', + # Go vendor directories + 'Godeps', + 'Godeps/*', + # Node.js vendor directories + 'node_modules', + 'node_modules/*', + # Python vendor directories + 'venv', + 'venv/*', + '.env', + '.env/*', + 'env', + 'env/*', + # Chart directory + 'chart', + 'chart/*' +] + +def should_ignore(path: str, ignore_patterns: List[str]) -> bool: + """Check if a path should be ignored based on ignore patterns.""" + path_parts = path.split(os.sep) + + for pattern in ignore_patterns: + # Check if the pattern matches the full path + if fnmatch.fnmatch(path, pattern): + return True + + # Check if pattern matches any part of the path + for part in path_parts: + if fnmatch.fnmatch(part, pattern): + return True + + return False + +def read_license_template(template_path: str) -> str: + """Read the license template file.""" + with open(template_path, 'r') as f: + return f.read().strip() + +def format_license(license_text: str, comment_style: Dict[str, str]) -> str: + """Format the license text with the appropriate comment style.""" + lines = license_text.split('\n') + formatted = [ + comment_style['start'], + f"{comment_style['line']}LICENSE START", + comment_style['line'].rstrip() + ] + + for line in lines: + if line.strip(): + formatted.append(f"{comment_style['line']}{line}") + else: + formatted.append(f"{comment_style['line'].rstrip()}") + + formatted.extend([ + comment_style['line'].rstrip(), + f"{comment_style['line']}LICENSE END", + comment_style['end'] + ]) + return '\n'.join(formatted) + +def find_files(root_dir: str, extensions: List[str], ignore_patterns: List[str]) -> List[str]: + """Find all files with the given extensions recursively, respecting ignore patterns.""" + matches = [] + for root, _, filenames in os.walk(root_dir): + # Get relative path from root_dir + rel_root = os.path.relpath(root, root_dir) + + # Skip if this directory should be ignored + if should_ignore(rel_root, ignore_patterns): + continue + + for ext in extensions: + for filename in fnmatch.filter(filenames, f'*{ext}'): + rel_path = os.path.join(rel_root, filename) + + # Skip if the file should be ignored + if should_ignore(rel_path, ignore_patterns): + continue + + matches.append(os.path.join(root, filename)) + return matches + +def find_existing_license(content: str) -> Tuple[int, int]: + """Find the start and end positions of an existing license header.""" + lines = content.split('\n') + start_line = 0 + end_line = 0 + + # Look for LICENSE START and LICENSE END markers + for i, line in enumerate(lines): + if 'LICENSE START' in line: + start_line = i - 1 # Include the opening comment line + elif 'LICENSE END' in line: + end_line = i + 2 # Include the closing comment line + break + + return start_line, end_line + +def insert_license(file_path: str, formatted_license: str) -> None: + """Insert the formatted license at the beginning of the file.""" + with open(file_path, 'r') as f: + content = f.read() + + # Find any existing license header + start_line, end_line = find_existing_license(content) + + lines = content.split('\n') + if start_line != -1 and end_line != -1: + # Remove existing license + print(f"Replacing existing license in {file_path}") + lines = lines[:start_line] + lines[end_line:] + content = '\n'.join(lines) + + # For Python/Shell files, preserve any shebang line + if file_path.endswith(('.py', '.sh')): + lines = content.split('\n') + if lines and lines[0].startswith('#!'): + content = lines[0] + '\n\n' + formatted_license + '\n\n' + '\n'.join(lines[1:]) + else: + content = formatted_license + '\n\n' + content + else: + content = formatted_license + '\n\n' + content + + with open(file_path, 'w') as f: + f.write(content) + print(f"Updated license in {file_path}") + +def main(): + """License Header Formatting Tool for Multiple File Types. + + This script formats and applies NVIDIA's Apache 2.0 license headers to source code files. + It supports multiple file types (Python, Shell, Go, YAML) and handles each with appropriate + comment styles. The script will: + + 1. Add license headers to files that don't have them + 2. Replace existing license headers with the standardized format + 3. Preserve shebang lines in scripts + 4. Skip vendor directories and files matching .gitignore patterns + 5. Add LICENSE START/END markers for easier detection and replacement + + Supported file types: + - Python (.py) : Uses # comments + - Shell (.sh) : Uses # comments + - Go (.go) : Uses /* */ block comments + - YAML (.yml) : Uses # comments + - YAML (.yaml) : Uses # comments + + Usage: + ./format_license.py [--license-file PATH] [--root-dir PATH] + + Arguments: + --license-file : Path to the Apache 2.0 license file (default: LICENSE) + --root-dir : Root directory to search for files (default: current directory) + + Example: + # Format all supported files in the current directory + ./format_license.py + + # Format files using a specific license file and directory + ./format_license.py --license-file /path/to/LICENSE --root-dir /path/to/project + + Note: + The script automatically ignores common vendor directories. + The chart/ directory is also ignored by default. See BUILT_IN_IGNORE_PATTERNS for more details. + """ + parser = argparse.ArgumentParser(description='Format and apply license headers to source files') + parser.add_argument('--license-file', default='LICENSE', + help='Path to the license template file') + parser.add_argument('--root-dir', default='.', + help='Root directory to search for files') + args = parser.parse_args() + + # Read the license template + license_text = read_license_template(args.license_file) + + # Get the boilerplate section from the license + start_marker = " APPENDIX: How to apply the Apache License to your work." + end_marker = " limitations under the License." + + start_idx = license_text.find(start_marker) + if start_idx != -1: + # Skip to the actual boilerplate + boilerplate_start = license_text.find(" Copyright", start_idx) + if boilerplate_start != -1: + end_idx = license_text.find(end_marker, boilerplate_start) + if end_idx != -1: + license_text = license_text[boilerplate_start:end_idx + len(end_marker)] + + # Read .gitignore patterns + ignore_patterns = BUILT_IN_IGNORE_PATTERNS + + # Process each file type + for ext, comment_style in COMMENT_STYLES.items(): + # Format the license for this file type + formatted_license = format_license(license_text, comment_style) + + # Find and process all files of this type + files = find_files(args.root_dir, [ext], ignore_patterns) + for file_path in files: + insert_license(file_path, formatted_license) + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/scripts/monitor.sh b/scripts/monitor.sh index 9fe9f312..e88ce727 100755 --- a/scripts/monitor.sh +++ b/scripts/monitor.sh @@ -1,18 +1,29 @@ #!/bin/bash -# Copyright (c) NVIDIA CORPORATION. All rights reserved. +# +# LICENSE START # -# 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 +# Copyright (c) NVIDIA CORPORATION. All rights reserved. # -# http://www.apache.org/licenses/LICENSE-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 # -# 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. +# 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. +# +# LICENSE END +# + + + + + if [ -f $PWD/monitor.txt ]; then From 7e1b04eafa1e027ba1bb7746919103ceb81e1b63 Mon Sep 17 00:00:00 2001 From: Alex Yuskauskas Date: Mon, 10 Mar 2025 14:04:16 -0700 Subject: [PATCH 4/6] feat: consolidate agent and operator CI to better control dependencies Fix license formatter to recognize when license hasn't changed and not introduce extra lines --- .github/workflows/agent-ci.yaml | 89 ++++++++++++++- .github/workflows/agent-container.yaml | 125 --------------------- .github/workflows/operator-ci.yaml | 109 +++++++++++++++++-- .github/workflows/operator-container.yaml | 127 ---------------------- scripts/format_license.py | 12 +- 5 files changed, 195 insertions(+), 267 deletions(-) delete mode 100644 .github/workflows/agent-container.yaml delete mode 100644 .github/workflows/operator-container.yaml diff --git a/.github/workflows/agent-ci.yaml b/.github/workflows/agent-ci.yaml index d63d5b81..f855013a 100644 --- a/.github/workflows/agent-ci.yaml +++ b/.github/workflows/agent-ci.yaml @@ -24,12 +24,27 @@ -name: Agent Unittest +name: Agent CI on: pull_request: + branches: + - main paths: - agent/** - - .github/workflows/agent-ci.yaml + - containers/agent.Dockerfile + - .github/workflows/agent-container.yaml + push: + branches: + - main + tags: + - agent/* + paths: + - agent/** + - containers/agent.Dockerfile + - .github/workflows/agent-container.yaml +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} jobs: test: name: Skyhook Agent Unit Tests @@ -54,4 +69,72 @@ jobs: - name: Display Summary if: always() run: | - cat test-summary.md >> $GITHUB_STEP_SUMMARY \ No newline at end of file + cat test-summary.md >> $GITHUB_STEP_SUMMARY + build-and-push-agent: + runs-on: ubuntu-latest + needs: [test] # Don't run the build and push if the unit tests fail + # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. + permissions: + contents: read + packages: write + attestations: write + id-token: write + # + steps: + - name: Checkout repository + uses: actions/checkout@v4 + # Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Setup for multi-platform + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build the agent container image + id: build + run: | + apt-get update && apt-get install -y make git jq + cd agent + # if this is a tag build, use the tag as the version, otherwise use the sha + TAGS="-t ${REGISTRY@L}/${{env.IMAGE_NAME}}/agent:${{ github.sha }}" + case ${{ github.ref_type }} in + branch) + # The last tag + current git sha + export AGENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")+${{ github.sha }} + ;; + tag) + # The version part of the tag + export AGENT_VERSION=$(echo "${{ github.ref_name }}" | cut -f 2 -d /) + TAGS="$TAGS -t ${REGISTRY@L}/${{env.IMAGE_NAME}}/agent:${AGENT_VERSION} -t ${REGISTRY@L}/${{env.IMAGE_NAME}}/agent:latest" + ;; + *) + echo "Unkown type ${{ github.ref_type }}" + exit 1 + ;; + esac + export TAGS=$TAGS + export REGISTRY=${REGISTRY@L} + export BUILD_ARGS="--push" + make docker-build-only agent_version=${AGENT_VERSION} + cat metadata.json + echo "digest=$(cat metadata.json | jq -r .\"containerimage.digest\")" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT + env: + AGENT_IMAGE: ${{env.IMAGE_NAME}}/agent + + # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v2 + with: + subject-name: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}/agent + subject-digest: ${{ steps.build.outputs.digest }} + push-to-registry: true + diff --git a/.github/workflows/agent-container.yaml b/.github/workflows/agent-container.yaml deleted file mode 100644 index 7dfd0b75..00000000 --- a/.github/workflows/agent-container.yaml +++ /dev/null @@ -1,125 +0,0 @@ -# -# LICENSE START -# -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -# -# LICENSE END -# - - - - - - - -name: Build and push agent container image - -# Configures this workflow to run every time a tag is created -on: - pull_request: - branches: - - main - paths: - - agent/** - - containers/agent.Dockerfile - - .github/workflows/agent-container.yaml - push: - branches: - - main - tags: - - agent/* - paths: - - agent/** - - containers/agent.Dockerfile - - .github/workflows/agent-container.yaml - -# NOTE: we may want to switch to matrix build for multi-platform support if this is taking too long -# https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners - - -# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. -jobs: - build-and-push-agent: - runs-on: ubuntu-latest - # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. - permissions: - contents: read - packages: write - attestations: write - id-token: write - # - steps: - - name: Checkout repository - uses: actions/checkout@v4 - # Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - # Setup for multi-platform - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build the agent container image - id: build - run: | - apt-get update && apt-get install -y make git jq - cd agent - # if this is a tag build, use the tag as the version, otherwise use the sha - TAGS="-t ${REGISTRY@L}/${{env.IMAGE_NAME}}/agent:${{ github.sha }}" - case ${{ github.ref_type }} in - branch) - # The last tag + current git sha - export AGENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")+${{ github.sha }} - ;; - tag) - # The version part of the tag - export AGENT_VERSION=$(echo "${{ github.ref_name }}" | cut -f 2 -d /) - TAGS="$TAGS -t ${REGISTRY@L}/${{env.IMAGE_NAME}}/agent:${AGENT_VERSION}" - ;; - *) - echo "Unkown type ${{ github.ref_type }}" - exit 1 - ;; - esac - export TAGS=$TAGS - export REGISTRY=${REGISTRY@L} - export BUILD_ARGS="--push" - make docker-build-only agent_version=${AGENT_VERSION} - cat metadata.json - echo "digest=$(cat metadata.json | jq -r .\"containerimage.digest\")" >> $GITHUB_OUTPUT - cat $GITHUB_OUTPUT - env: - AGENT_IMAGE: ${{env.IMAGE_NAME}}/agent - - # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). - - name: Generate artifact attestation - uses: actions/attest-build-provenance@v2 - with: - subject-name: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}/agent - subject-digest: ${{ steps.build.outputs.digest }} - push-to-registry: true - diff --git a/.github/workflows/operator-ci.yaml b/.github/workflows/operator-ci.yaml index 7c61abf7..a39690c6 100644 --- a/.github/workflows/operator-ci.yaml +++ b/.github/workflows/operator-ci.yaml @@ -18,20 +18,38 @@ # LICENSE END # +# Build when operator code changes +name: Build and push operator container image +on: + pull_request: + branches: + - main + paths: + - operator/** + - containers/operator.Dockerfile + - .github/workflows/operator-container.yaml + push: + branches: + - main + tags: + - operator/* + paths: + - operator/**/*.go + - containers/operator.Dockerfile + - .github/workflows/operator-container.yaml +# NOTE: we may want to switch to matrix build for multi-platform support if this is taking too long +# https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners - - -name: Operator unit and functional tests -on: - pull_request: - paths: - - operator/** - - .github/workflows/operator-ci.yaml +# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + GO_VERSION: 1.23.6 + +# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: unit-test: runs-on: ubuntu-latest @@ -47,6 +65,7 @@ jobs: make unit-tests k8s-tests: runs-on: ubuntu-latest + needs: [unit-test] # Don't run the k8s tests if the unit tests fail steps: - uses: actions/checkout@v4 with: @@ -72,4 +91,76 @@ jobs: run: | cd operator GITHUB_TOKEN=${{ secrets.github_token }} make create-kind-cluster - make e2e-tests \ No newline at end of file + make e2e-tests + build-and-push-operator: + runs-on: ubuntu-latest + needs: [k8s-tests] # Don't run the build and push if the k8s tests fail + # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. + permissions: + contents: read + packages: write + attestations: write + id-token: write + # + steps: + - name: Checkout repository + uses: actions/checkout@v4 + # Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Setup for multi-platform + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build the operator container image + id: build + run: | + apt-get update && apt-get install -y make git jq + cd operator + # if this is a tag build, use the tag as the version, otherwise use the sha + TAGS="-t ${REGISTRY@L}/${{env.IMAGE_NAME}}/operator:${{ github.sha }}" + case ${{ github.ref_type }} in + branch) + # The last tag + current git sha + export OPERATOR_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")+${{ github.sha }} + ;; + tag) + # The version part of the tag + export OPERATOR_VERSION=$(echo "${{ github.ref_name }}" | cut -f 2 -d /) + TAGS="$TAGS -t ${REGISTRY@L}/${{env.IMAGE_NAME}}/operator:${OPERATOR_VERSION} -t ${REGISTRY@L}/${{env.IMAGE_NAME}}/operator:latest" + ;; + *) + echo "Unkown type ${{ github.ref_type }}" + exit 1 + ;; + esac + set -x + docker buildx build \ + --build-arg GIT_SHA=$${{ github.sha }} \ + --build-arg VERSION=${OPERATOR_VERSION} \ + --build-arg GO_VERSION=${GO_VERSION} \ + --push \ + --platform linux/amd64 \ + ${TAGS@L} \ + --metadata-file=metadata.json \ + -f ../containers/operator.Dockerfile . + cat metadata.json + echo "digest=$(cat metadata.json | jq -r .\"containerimage.digest\")" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT + + # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v2 + with: + subject-name: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}/operator + subject-digest: ${{ steps.build.outputs.digest }} + push-to-registry: true + diff --git a/.github/workflows/operator-container.yaml b/.github/workflows/operator-container.yaml deleted file mode 100644 index 3efaf3f0..00000000 --- a/.github/workflows/operator-container.yaml +++ /dev/null @@ -1,127 +0,0 @@ -# -# LICENSE START -# -# Copyright (c) NVIDIA CORPORATION. All rights reserved. -# -# 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. -# -# LICENSE END -# - - - - - - - -# Build when operator code changes -name: Build and push operator container image - -on: - push: - branches: - - main - tags: - - operator/* - paths: - - operator/**/*.go - - containers/operator.Dockerfile - - .github/workflows/operator-container.yaml - workflow_run: - workflows: ["Operator unit and functional tests"] - types: - - completed - -# NOTE: we may want to switch to matrix build for multi-platform support if this is taking too long -# https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners - - -# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - GO_VERSION: 1.23.6 - -# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. -jobs: - build-and-push-operator: - runs-on: ubuntu-latest - # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. - permissions: - contents: read - packages: write - attestations: write - id-token: write - # - steps: - - name: Checkout repository - uses: actions/checkout@v4 - # Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - # Setup for multi-platform - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build the operator container image - id: build - run: | - apt-get update && apt-get install -y make git jq - cd operator - # if this is a tag build, use the tag as the version, otherwise use the sha - TAGS="-t ${REGISTRY@L}/${{env.IMAGE_NAME}}/operator:${{ github.sha }} -t ${REGISTRY@L}/${{env.IMAGE_NAME}}/operator:latest" - case ${{ github.ref_type }} in - branch) - # The last tag + current git sha - export OPERATOR_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")+${{ github.sha }} - ;; - tag) - # The version part of the tag - export OPERATOR_VERSION=$(echo "${{ github.ref_name }}" | cut -f 2 -d /) - TAGS="$TAGS -t ${REGISTRY@L}/${{env.IMAGE_NAME}}/operator:${OPERATOR_VERSION}" - ;; - *) - echo "Unkown type ${{ github.ref_type }}" - exit 1 - ;; - esac - set -x - docker buildx build \ - --build-arg GIT_SHA=$${{ github.sha }} \ - --build-arg VERSION=${OPERATOR_VERSION} \ - --build-arg GO_VERSION=${GO_VERSION} \ - --push \ - --platform linux/amd64 \ - ${TAGS@L} \ - --metadata-file=metadata.json \ - -f ../containers/operator.Dockerfile . - cat metadata.json - echo "digest=$(cat metadata.json | jq -r .\"containerimage.digest\")" >> $GITHUB_OUTPUT - cat $GITHUB_OUTPUT - - # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). - - name: Generate artifact attestation - uses: actions/attest-build-provenance@v2 - with: - subject-name: ${{ env.REGISTRY }}/${{env.IMAGE_NAME}}/operator - subject-digest: ${{ steps.build.outputs.digest }} - push-to-registry: true - diff --git a/scripts/format_license.py b/scripts/format_license.py index e405f910..a305ecee 100755 --- a/scripts/format_license.py +++ b/scripts/format_license.py @@ -169,6 +169,12 @@ def insert_license(file_path: str, formatted_license: str) -> None: lines = content.split('\n') if start_line != -1 and end_line != -1: + # Check if the found license is the same as the formatted license + existing_license = "\n".join(lines[start_line:end_line]) + if existing_license == formatted_license: + print(f"License is already formatted in {file_path}") + return + # Remove existing license print(f"Replacing existing license in {file_path}") lines = lines[:start_line] + lines[end_line:] @@ -178,11 +184,11 @@ def insert_license(file_path: str, formatted_license: str) -> None: if file_path.endswith(('.py', '.sh')): lines = content.split('\n') if lines and lines[0].startswith('#!'): - content = lines[0] + '\n\n' + formatted_license + '\n\n' + '\n'.join(lines[1:]) + content = lines[0] + '\n\n' + formatted_license + '\n' + '\n'.join(lines[1:]) else: - content = formatted_license + '\n\n' + content + content = formatted_license + '\n' + content else: - content = formatted_license + '\n\n' + content + content = formatted_license + '\n' + content with open(file_path, 'w') as f: f.write(content) From 9d15e9edfdfc9906bd07cacfd9ad826825c2fd9d Mon Sep 17 00:00:00 2001 From: Alex Yuskauskas Date: Mon, 10 Mar 2025 14:39:37 -0700 Subject: [PATCH 5/6] feat(operator): rename the ci workflow to match agent workflow --- .github/workflows/operator-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/operator-ci.yaml b/.github/workflows/operator-ci.yaml index a39690c6..2357d1c9 100644 --- a/.github/workflows/operator-ci.yaml +++ b/.github/workflows/operator-ci.yaml @@ -19,7 +19,7 @@ # # Build when operator code changes -name: Build and push operator container image +name: Operator CI on: pull_request: From d215d9da1a4969fd961d1620bac142b371f7d8bd Mon Sep 17 00:00:00 2001 From: Alex Yuskauskas Date: Mon, 10 Mar 2025 16:03:29 -0700 Subject: [PATCH 6/6] fix: miscellaneous fixes to project structure Make chart license file a symlink of top level one Add a top level .gitignore Remove boilerplate references from operator mockery file Remove .vscode directory --- .cursorignore | 1 - .gitignore | 4 ++++ .vscode/launch.json | 37 ------------------------------------- chart/LICENSE | 2 +- operator/.mockery.yaml | 10 ---------- operator/deps.mk | 7 +------ 6 files changed, 6 insertions(+), 55 deletions(-) delete mode 100644 .cursorignore create mode 100644 .gitignore delete mode 100644 .vscode/launch.json diff --git a/.cursorignore b/.cursorignore deleted file mode 100644 index 6f9f00ff..00000000 --- a/.cursorignore +++ /dev/null @@ -1 +0,0 @@ -# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv) diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3c2c83e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.cursorignore +.pytest_cache +.vscode +.idea \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index d01b9cb3..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Debug Manager", - "type": "go", - "request": "launch", - "mode": "debug", - "program": "${workspaceRoot}/operator/cmd/main.go", - "buildFlags": "--ldflags '-X github.com/NVIDIA/skyhook/internal/version.GIT_SHA=foobars -X github.com/NVIDIA/skyhook/internal/version.VERSION=v0.5.0'", - "env": { - "ENABLE_WEBHOOKS": "false", - "LOG_ENCODER": "console", - "LOG_LEVEL": "info", - "REAPPLY_ON_REBOOT": "false", - // "AGENT_IMAGE": "nvcr.io/nvidian/swgpu-baseos/skyhook-agent:25.01.02-233800-38d9732d", - "AGENT_IMAGE": "ghcr.io/nvidia/skyhook/agentless:6.2.0", // this is the mock image, if you need to test for real, use the real image. - // "COPY_DIR_ROOT": "/var/lib/google/skyhook" - }, - "args": [], - "showLog": true - }, - { - "name": "Test Current File", - "type": "go", - "request": "launch", - "mode": "test", - "program": "${file}", - "env": {}, - "args": [], - "showLog": true - } - ] -} \ No newline at end of file diff --git a/chart/LICENSE b/chart/LICENSE index ea5b6064..7a694c96 120000 --- a/chart/LICENSE +++ b/chart/LICENSE @@ -1 +1 @@ -../LICENSE \ No newline at end of file +LICENSE \ No newline at end of file diff --git a/operator/.mockery.yaml b/operator/.mockery.yaml index 746d31df..e13fd22e 100644 --- a/operator/.mockery.yaml +++ b/operator/.mockery.yaml @@ -18,18 +18,10 @@ # LICENSE END # - - - - - - - dir: "{{.InterfaceDir}}/mock" filename: "{{.InterfaceName }}.go" quiet: False with-expecter: true -boilerplate-file: "../boilerplate/boilerplate.go.txt" packages: ## external packages k8s.io/client-go/util/workqueue: @@ -56,10 +48,8 @@ packages: github.com/NVIDIA/skyhook/internal/dal: config: all: True - boilerplate-file: "../boilerplate/boilerplate.go.txt" github.com/NVIDIA/skyhook/internal/controller: config: all: True - boilerplate-file: "../boilerplate/boilerplate.go.txt" interfaces: SkyhookNodes: \ No newline at end of file diff --git a/operator/deps.mk b/operator/deps.mk index a622637c..c3448499 100644 --- a/operator/deps.mk +++ b/operator/deps.mk @@ -46,11 +46,10 @@ MOCKERY_VERSION ?= v2.42.3 CHAINSAW_VERSION ?= v0.2.10 HELM_VERSION ?= v3.15.0 HELMIFY_VERSION ?= v0.4.12 -GO_LICENSE_VERSION ?= v1.39.0 GO_LICENSES_VERSION ?= v1.6.0 .PHONY: install-deps -install-deps: golangci-lint kustomize controller-gen envtest gocover-cobertura ginkgo mockery chainsaw helm helmify go-license ## Install all dependencies +install-deps: golangci-lint kustomize controller-gen envtest gocover-cobertura ginkgo mockery chainsaw helm helmify ## Install all dependencies ## Location to install dependencies to LOCALBIN ?= $(shell pwd)/bin @@ -122,10 +121,6 @@ helm: ## Download helm locally if necessary. helmify: ## Download helmify locally if necessary. test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@$(HELMIFY_VERSION) -.PHONY: go-license -go-license: ## Download go-license locally if necessary. - test -s $(LOCALBIN)/go-license || GOBIN=$(LOCALBIN) go install github.com/palantir/go-license@$(GO_LICENSE_VERSION) - .PHONY: go-licenses go-licenses: ## Download go-licenses locally if necessary. test -s $(LOCALBIN)/go-licenses || GOBIN=$(LOCALBIN) go install github.com/google/go-licenses@$(GO_LICENSES_VERSION)