From ef50aa8c83fb5b154fa30d30b2fdcca209b1fb99 Mon Sep 17 00:00:00 2001 From: Paige Patton <64206430+paigerube14@users.noreply.github.com> Date: Tue, 31 Mar 2026 14:19:19 -0500 Subject: [PATCH] adding licsense to files (#1215) Signed-off-by: Paige Patton --- .gitignore | 2 +- .pre-commit-config.yaml | 2 +- krkn/__init__.py | 13 +++++++++++++ krkn/cerberus/__init__.py | 13 +++++++++++++ krkn/cerberus/setup.py | 13 +++++++++++++ krkn/chaos_recommender/__init__.py | 13 +++++++++++++ krkn/chaos_recommender/analysis.py | 13 +++++++++++++ krkn/chaos_recommender/kraken_tests.py | 13 +++++++++++++ krkn/chaos_recommender/prometheus.py | 13 +++++++++++++ krkn/invoke/__init__.py | 13 +++++++++++++ krkn/invoke/command.py | 13 +++++++++++++ krkn/prometheus/__init__.py | 13 +++++++++++++ krkn/prometheus/client.py | 13 +++++++++++++ krkn/prometheus/collector.py | 13 +++++++++++++ krkn/resiliency/__init__.py | 13 +++++++++++++ krkn/resiliency/resiliency.py | 13 +++++++++++++ krkn/resiliency/score.py | 13 +++++++++++++ krkn/rollback/__init__.py | 13 +++++++++++++ krkn/rollback/command.py | 13 +++++++++++++ krkn/rollback/config.py | 13 +++++++++++++ krkn/rollback/serialization.py | 13 +++++++++++++ krkn/rollback/signal.py | 13 +++++++++++++ krkn/scenario_plugins/__init__.py | 13 +++++++++++++ krkn/scenario_plugins/abstract_scenario_plugin.py | 13 +++++++++++++ .../scenario_plugins/application_outage/__init__.py | 13 +++++++++++++ .../application_outage_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/container/__init__.py | 13 +++++++++++++ .../container/container_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/hogs/__init__.py | 13 +++++++++++++ krkn/scenario_plugins/hogs/hogs_scenario_plugin.py | 13 +++++++++++++ .../scenario_plugins/kubevirt_vm_outage/__init__.py | 13 +++++++++++++ .../kubevirt_vm_outage_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/managed_cluster/__init__.py | 13 +++++++++++++ .../managed_cluster/common_functions.py | 13 +++++++++++++ .../managed_cluster_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/managed_cluster/scenarios.py | 13 +++++++++++++ krkn/scenario_plugins/native/__init__.py | 13 +++++++++++++ .../native/native_scenario_plugin.py | 13 +++++++++++++ .../native/network/ingress_shaping.py | 13 +++++++++++++ krkn/scenario_plugins/native/plugins.py | 13 +++++++++++++ .../pod_network_outage/pod_network_outage_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/native/run_python_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/network_chaos/__init__.py | 13 +++++++++++++ .../network_chaos/network_chaos_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/network_chaos_ng/__init__.py | 13 +++++++++++++ krkn/scenario_plugins/network_chaos_ng/models.py | 13 +++++++++++++ .../network_chaos_ng/modules/__init__.py | 13 +++++++++++++ .../modules/abstract_network_chaos_module.py | 13 +++++++++++++ .../network_chaos_ng/modules/node_network_chaos.py | 13 +++++++++++++ .../network_chaos_ng/modules/node_network_filter.py | 13 +++++++++++++ .../network_chaos_ng/modules/pod_network_chaos.py | 13 +++++++++++++ .../network_chaos_ng/modules/pod_network_filter.py | 13 +++++++++++++ .../network_chaos_ng/modules/utils.py | 13 +++++++++++++ .../network_chaos_ng/modules/utils_network_chaos.py | 13 +++++++++++++ .../modules/utils_network_filter.py | 13 +++++++++++++ .../network_chaos_ng/network_chaos_factory.py | 13 +++++++++++++ .../network_chaos_ng_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/node_actions/__init__.py | 13 +++++++++++++ .../node_actions/abstract_node_scenarios.py | 13 +++++++++++++ .../node_actions/alibaba_node_scenarios.py | 13 +++++++++++++ .../node_actions/aws_node_scenarios.py | 13 +++++++++++++ .../node_actions/az_node_scenarios.py | 13 +++++++++++++ .../node_actions/bm_node_scenarios.py | 13 +++++++++++++ .../node_actions/common_node_functions.py | 13 +++++++++++++ .../node_actions/docker_node_scenarios.py | 13 +++++++++++++ .../node_actions/gcp_node_scenarios.py | 13 +++++++++++++ .../node_actions/general_cloud_node_scenarios.py | 13 +++++++++++++ .../node_actions/ibmcloud_node_scenarios.py | 13 +++++++++++++ .../node_actions/ibmcloud_power_node_scenarios.py | 13 +++++++++++++ .../node_actions/node_actions_scenario_plugin.py | 13 +++++++++++++ .../node_actions/openstack_node_scenarios.py | 13 +++++++++++++ .../node_actions/vmware_node_scenarios.py | 13 +++++++++++++ krkn/scenario_plugins/pod_disruption/__init__.py | 13 +++++++++++++ .../pod_disruption/models/__init__.py | 13 +++++++++++++ .../pod_disruption/models/models.py | 13 +++++++++++++ .../pod_disruption_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/pvc/__init__.py | 13 +++++++++++++ krkn/scenario_plugins/pvc/pvc_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/scenario_plugin_factory.py | 13 +++++++++++++ .../scenario_plugins/service_disruption/__init__.py | 13 +++++++++++++ .../service_disruption_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/service_hijacking/__init__.py | 13 +++++++++++++ .../service_hijacking_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/shut_down/__init__.py | 13 +++++++++++++ .../shut_down/shut_down_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/syn_flood/__init__.py | 13 +++++++++++++ .../syn_flood/syn_flood_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/time_actions/__init__.py | 13 +++++++++++++ .../time_actions/time_actions_scenario_plugin.py | 13 +++++++++++++ krkn/scenario_plugins/zone_outage/__init__.py | 13 +++++++++++++ .../zone_outage/zone_outage_scenario_plugin.py | 13 +++++++++++++ krkn/utils/ErrorCollectionHandler.py | 13 +++++++++++++ krkn/utils/ErrorLog.py | 13 +++++++++++++ krkn/utils/HealthChecker.py | 13 +++++++++++++ krkn/utils/TeeLogHandler.py | 13 +++++++++++++ krkn/utils/VirtChecker.py | 13 +++++++++++++ krkn/utils/__init__.py | 13 +++++++++++++ krkn/utils/functions.py | 13 +++++++++++++ run_kraken.py | 13 +++++++++++++ scenarios/kind/container_etcd.yml | 8 ++++++++ scenarios/openshift/cnv.yaml | 8 ++++++++ scenarios/openshift/container.yml | 9 +++++++++ scenarios/openshift/container_ovn.yml | 8 ++++++++ scenarios/openshift/openshift-ovn-kube.yml | 7 +++++++ scenarios/openshift/ovn-pod.yaml | 7 +++++++ scenarios/openshift/submariner.yml | 5 +++++ server.py | 13 +++++++++++++ setup.py | 13 +++++++++++++ utils/chaos_recommender/chaos_recommender.py | 13 +++++++++++++ 109 files changed, 1354 insertions(+), 2 deletions(-) create mode 100755 scenarios/kind/container_etcd.yml create mode 100644 scenarios/openshift/cnv.yaml create mode 100755 scenarios/openshift/container.yml create mode 100755 scenarios/openshift/container_ovn.yml create mode 100755 scenarios/openshift/openshift-ovn-kube.yml create mode 100644 scenarios/openshift/ovn-pod.yaml create mode 100755 scenarios/openshift/submariner.yml diff --git a/.gitignore b/.gitignore index a2c0e3ac..b5b14e5e 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,7 @@ MANIFEST # Per-project virtualenvs .venv*/ venv*/ -kraken.report +*.report collected-metrics/* inspect.local.* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 23a560dd..ac307c9f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,4 +6,4 @@ repos: language: python entry: python scripts/check_license.py types: [python] - exclude: ^tests/|/test_|CI/ + exclude: ^tests/|/test_|^CI/ diff --git a/krkn/__init__.py b/krkn/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/__init__.py +++ b/krkn/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/cerberus/__init__.py b/krkn/cerberus/__init__.py index 9ca22d34..74ad694b 100644 --- a/krkn/cerberus/__init__.py +++ b/krkn/cerberus/__init__.py @@ -1 +1,14 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from .setup import * diff --git a/krkn/cerberus/setup.py b/krkn/cerberus/setup.py index c20f2a13..5b132613 100644 --- a/krkn/cerberus/setup.py +++ b/krkn/cerberus/setup.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import requests import sys diff --git a/krkn/chaos_recommender/__init__.py b/krkn/chaos_recommender/__init__.py index 250eef9b..1d90d2f1 100644 --- a/krkn/chaos_recommender/__init__.py +++ b/krkn/chaos_recommender/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from .analysis import * from .kraken_tests import * from .prometheus import * \ No newline at end of file diff --git a/krkn/chaos_recommender/analysis.py b/krkn/chaos_recommender/analysis.py index 96361695..a36bcc42 100644 --- a/krkn/chaos_recommender/analysis.py +++ b/krkn/chaos_recommender/analysis.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import pandas as pd diff --git a/krkn/chaos_recommender/kraken_tests.py b/krkn/chaos_recommender/kraken_tests.py index 8909e329..b92a8e4d 100644 --- a/krkn/chaos_recommender/kraken_tests.py +++ b/krkn/chaos_recommender/kraken_tests.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. def get_entries_by_category(filename, category): # Read the file with open(filename, "r") as file: diff --git a/krkn/chaos_recommender/prometheus.py b/krkn/chaos_recommender/prometheus.py index c00f73d3..49f270b0 100644 --- a/krkn/chaos_recommender/prometheus.py +++ b/krkn/chaos_recommender/prometheus.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging from prometheus_api_client import PrometheusConnect diff --git a/krkn/invoke/__init__.py b/krkn/invoke/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/invoke/__init__.py +++ b/krkn/invoke/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/invoke/command.py b/krkn/invoke/command.py index 5a543335..54de1e20 100644 --- a/krkn/invoke/command.py +++ b/krkn/invoke/command.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import subprocess import logging import sys diff --git a/krkn/prometheus/__init__.py b/krkn/prometheus/__init__.py index 4c51a321..6935b188 100644 --- a/krkn/prometheus/__init__.py +++ b/krkn/prometheus/__init__.py @@ -1 +1,14 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from .client import * \ No newline at end of file diff --git a/krkn/prometheus/client.py b/krkn/prometheus/client.py index 4e624fc4..41727e64 100644 --- a/krkn/prometheus/client.py +++ b/krkn/prometheus/client.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from __future__ import annotations import datetime diff --git a/krkn/prometheus/collector.py b/krkn/prometheus/collector.py index 42ee5168..e2f33fc4 100644 --- a/krkn/prometheus/collector.py +++ b/krkn/prometheus/collector.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from __future__ import annotations import datetime diff --git a/krkn/resiliency/__init__.py b/krkn/resiliency/__init__.py index b18b57c2..02a23800 100644 --- a/krkn/resiliency/__init__.py +++ b/krkn/resiliency/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. """krkn.resiliency package public interface.""" from .resiliency import Resiliency # noqa: F401 diff --git a/krkn/resiliency/resiliency.py b/krkn/resiliency/resiliency.py index 367e4e9c..5d5f9320 100644 --- a/krkn/resiliency/resiliency.py +++ b/krkn/resiliency/resiliency.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. """Resiliency evaluation orchestrator for Krkn chaos runs. This module provides the `Resiliency` class which loads the canonical diff --git a/krkn/resiliency/score.py b/krkn/resiliency/score.py index 811ed216..57ad52df 100644 --- a/krkn/resiliency/score.py +++ b/krkn/resiliency/score.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from __future__ import annotations from typing import Dict, List, Tuple diff --git a/krkn/rollback/__init__.py b/krkn/rollback/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/rollback/__init__.py +++ b/krkn/rollback/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/rollback/command.py b/krkn/rollback/command.py index 506edf20..fc154a32 100644 --- a/krkn/rollback/command.py +++ b/krkn/rollback/command.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import os import logging from typing import Optional, TYPE_CHECKING diff --git a/krkn/rollback/config.py b/krkn/rollback/config.py index 03455c5c..041b57bd 100644 --- a/krkn/rollback/config.py +++ b/krkn/rollback/config.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from __future__ import annotations from dataclasses import dataclass diff --git a/krkn/rollback/serialization.py b/krkn/rollback/serialization.py index f59e3549..b1a7f4c0 100644 --- a/krkn/rollback/serialization.py +++ b/krkn/rollback/serialization.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import inspect import os import logging diff --git a/krkn/rollback/signal.py b/krkn/rollback/signal.py index 54ac13e1..d03e3c72 100644 --- a/krkn/rollback/signal.py +++ b/krkn/rollback/signal.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from typing import Dict, Any, Optional import threading import signal diff --git a/krkn/scenario_plugins/__init__.py b/krkn/scenario_plugins/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/__init__.py +++ b/krkn/scenario_plugins/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/abstract_scenario_plugin.py b/krkn/scenario_plugins/abstract_scenario_plugin.py index 5fa8d051..de99cab1 100644 --- a/krkn/scenario_plugins/abstract_scenario_plugin.py +++ b/krkn/scenario_plugins/abstract_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import os import time diff --git a/krkn/scenario_plugins/application_outage/__init__.py b/krkn/scenario_plugins/application_outage/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/application_outage/__init__.py +++ b/krkn/scenario_plugins/application_outage/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/application_outage/application_outage_scenario_plugin.py b/krkn/scenario_plugins/application_outage/application_outage_scenario_plugin.py index a7c0d51b..b0a9651e 100644 --- a/krkn/scenario_plugins/application_outage/application_outage_scenario_plugin.py +++ b/krkn/scenario_plugins/application_outage/application_outage_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import time import yaml diff --git a/krkn/scenario_plugins/container/__init__.py b/krkn/scenario_plugins/container/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/container/__init__.py +++ b/krkn/scenario_plugins/container/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/container/container_scenario_plugin.py b/krkn/scenario_plugins/container/container_scenario_plugin.py index e079f6b6..097632e3 100644 --- a/krkn/scenario_plugins/container/container_scenario_plugin.py +++ b/krkn/scenario_plugins/container/container_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import random import time diff --git a/krkn/scenario_plugins/hogs/__init__.py b/krkn/scenario_plugins/hogs/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/hogs/__init__.py +++ b/krkn/scenario_plugins/hogs/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/hogs/hogs_scenario_plugin.py b/krkn/scenario_plugins/hogs/hogs_scenario_plugin.py index 929d6875..ac1b6f32 100644 --- a/krkn/scenario_plugins/hogs/hogs_scenario_plugin.py +++ b/krkn/scenario_plugins/hogs/hogs_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import copy import logging import queue diff --git a/krkn/scenario_plugins/kubevirt_vm_outage/__init__.py b/krkn/scenario_plugins/kubevirt_vm_outage/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/kubevirt_vm_outage/__init__.py +++ b/krkn/scenario_plugins/kubevirt_vm_outage/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/kubevirt_vm_outage/kubevirt_vm_outage_scenario_plugin.py b/krkn/scenario_plugins/kubevirt_vm_outage/kubevirt_vm_outage_scenario_plugin.py index f8e30779..a9c1bf67 100644 --- a/krkn/scenario_plugins/kubevirt_vm_outage/kubevirt_vm_outage_scenario_plugin.py +++ b/krkn/scenario_plugins/kubevirt_vm_outage/kubevirt_vm_outage_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import time from typing import Dict, Any diff --git a/krkn/scenario_plugins/managed_cluster/__init__.py b/krkn/scenario_plugins/managed_cluster/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/managed_cluster/__init__.py +++ b/krkn/scenario_plugins/managed_cluster/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/managed_cluster/common_functions.py b/krkn/scenario_plugins/managed_cluster/common_functions.py index 15e73c13..f0a5c094 100644 --- a/krkn/scenario_plugins/managed_cluster/common_functions.py +++ b/krkn/scenario_plugins/managed_cluster/common_functions.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import random import logging from krkn_lib.k8s import KrknKubernetes diff --git a/krkn/scenario_plugins/managed_cluster/managed_cluster_scenario_plugin.py b/krkn/scenario_plugins/managed_cluster/managed_cluster_scenario_plugin.py index fc5f91ed..5c70c2be 100644 --- a/krkn/scenario_plugins/managed_cluster/managed_cluster_scenario_plugin.py +++ b/krkn/scenario_plugins/managed_cluster/managed_cluster_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import yaml diff --git a/krkn/scenario_plugins/managed_cluster/scenarios.py b/krkn/scenario_plugins/managed_cluster/scenarios.py index 5e22a31e..2c1d7a27 100644 --- a/krkn/scenario_plugins/managed_cluster/scenarios.py +++ b/krkn/scenario_plugins/managed_cluster/scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from jinja2 import Environment, FileSystemLoader import os import time diff --git a/krkn/scenario_plugins/native/__init__.py b/krkn/scenario_plugins/native/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/native/__init__.py +++ b/krkn/scenario_plugins/native/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/native/native_scenario_plugin.py b/krkn/scenario_plugins/native/native_scenario_plugin.py index 7f361121..f2d66256 100644 --- a/krkn/scenario_plugins/native/native_scenario_plugin.py +++ b/krkn/scenario_plugins/native/native_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from krkn.scenario_plugins.abstract_scenario_plugin import AbstractScenarioPlugin from krkn.scenario_plugins.native.plugins import PLUGINS from krkn_lib.models.telemetry import ScenarioTelemetry diff --git a/krkn/scenario_plugins/native/network/ingress_shaping.py b/krkn/scenario_plugins/native/network/ingress_shaping.py index 9f61e2da..4d426936 100644 --- a/krkn/scenario_plugins/native/network/ingress_shaping.py +++ b/krkn/scenario_plugins/native/network/ingress_shaping.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from dataclasses import dataclass, field import yaml import logging diff --git a/krkn/scenario_plugins/native/plugins.py b/krkn/scenario_plugins/native/plugins.py index 96b050d9..a09cef3c 100644 --- a/krkn/scenario_plugins/native/plugins.py +++ b/krkn/scenario_plugins/native/plugins.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import dataclasses import json import logging diff --git a/krkn/scenario_plugins/native/pod_network_outage/pod_network_outage_plugin.py b/krkn/scenario_plugins/native/pod_network_outage/pod_network_outage_plugin.py index 80dd3df4..f7cbfd83 100755 --- a/krkn/scenario_plugins/native/pod_network_outage/pod_network_outage_plugin.py +++ b/krkn/scenario_plugins/native/pod_network_outage/pod_network_outage_plugin.py @@ -1,4 +1,17 @@ #!/usr/bin/env python3 +# Copyright 2025 The Krkn Authors +# +# 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. import sys import os import typing diff --git a/krkn/scenario_plugins/native/run_python_plugin.py b/krkn/scenario_plugins/native/run_python_plugin.py index 357cf7fb..38a2a930 100644 --- a/krkn/scenario_plugins/native/run_python_plugin.py +++ b/krkn/scenario_plugins/native/run_python_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import dataclasses import subprocess import sys diff --git a/krkn/scenario_plugins/network_chaos/__init__.py b/krkn/scenario_plugins/network_chaos/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/network_chaos/__init__.py +++ b/krkn/scenario_plugins/network_chaos/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/network_chaos/network_chaos_scenario_plugin.py b/krkn/scenario_plugins/network_chaos/network_chaos_scenario_plugin.py index 80b422e8..3db2f5c4 100644 --- a/krkn/scenario_plugins/network_chaos/network_chaos_scenario_plugin.py +++ b/krkn/scenario_plugins/network_chaos/network_chaos_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import os import random diff --git a/krkn/scenario_plugins/network_chaos_ng/__init__.py b/krkn/scenario_plugins/network_chaos_ng/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/network_chaos_ng/__init__.py +++ b/krkn/scenario_plugins/network_chaos_ng/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/network_chaos_ng/models.py b/krkn/scenario_plugins/network_chaos_ng/models.py index faeef5f0..aa923606 100644 --- a/krkn/scenario_plugins/network_chaos_ng/models.py +++ b/krkn/scenario_plugins/network_chaos_ng/models.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import re from dataclasses import dataclass from enum import Enum diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/__init__.py b/krkn/scenario_plugins/network_chaos_ng/modules/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/__init__.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/abstract_network_chaos_module.py b/krkn/scenario_plugins/network_chaos_ng/modules/abstract_network_chaos_module.py index fa258cc3..8a3104e3 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/abstract_network_chaos_module.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/abstract_network_chaos_module.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import abc import logging import queue diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/node_network_chaos.py b/krkn/scenario_plugins/network_chaos_ng/modules/node_network_chaos.py index 0a73417c..79ad4093 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/node_network_chaos.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/node_network_chaos.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import queue import time from typing import Tuple diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/node_network_filter.py b/krkn/scenario_plugins/network_chaos_ng/modules/node_network_filter.py index 4e79a060..289a33c7 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/node_network_filter.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/node_network_filter.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import queue import time from typing import Tuple diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/pod_network_chaos.py b/krkn/scenario_plugins/network_chaos_ng/modules/pod_network_chaos.py index caf8db12..4da790bf 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/pod_network_chaos.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/pod_network_chaos.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import queue import time from typing import Tuple diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/pod_network_filter.py b/krkn/scenario_plugins/network_chaos_ng/modules/pod_network_filter.py index 8ecf8ddb..1e1af44c 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/pod_network_filter.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/pod_network_filter.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import queue import time from typing import Tuple diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/utils.py b/krkn/scenario_plugins/network_chaos_ng/modules/utils.py index c92e9df4..24231d6a 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/utils.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/utils.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import os from typing import Tuple diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/utils_network_chaos.py b/krkn/scenario_plugins/network_chaos_ng/modules/utils_network_chaos.py index 689ccb28..91f84c41 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/utils_network_chaos.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/utils_network_chaos.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import subprocess import logging from typing import Optional diff --git a/krkn/scenario_plugins/network_chaos_ng/modules/utils_network_filter.py b/krkn/scenario_plugins/network_chaos_ng/modules/utils_network_filter.py index 7677e086..f1f67d2f 100644 --- a/krkn/scenario_plugins/network_chaos_ng/modules/utils_network_filter.py +++ b/krkn/scenario_plugins/network_chaos_ng/modules/utils_network_filter.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from typing import Tuple from krkn_lib.k8s import KrknKubernetes diff --git a/krkn/scenario_plugins/network_chaos_ng/network_chaos_factory.py b/krkn/scenario_plugins/network_chaos_ng/network_chaos_factory.py index afb2f40b..e6d16024 100644 --- a/krkn/scenario_plugins/network_chaos_ng/network_chaos_factory.py +++ b/krkn/scenario_plugins/network_chaos_ng/network_chaos_factory.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from krkn_lib.telemetry.ocp import KrknTelemetryOpenshift from krkn.scenario_plugins.network_chaos_ng.models import ( diff --git a/krkn/scenario_plugins/network_chaos_ng/network_chaos_ng_scenario_plugin.py b/krkn/scenario_plugins/network_chaos_ng/network_chaos_ng_scenario_plugin.py index 6c08e8e7..ce934534 100644 --- a/krkn/scenario_plugins/network_chaos_ng/network_chaos_ng_scenario_plugin.py +++ b/krkn/scenario_plugins/network_chaos_ng/network_chaos_ng_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import queue import random diff --git a/krkn/scenario_plugins/node_actions/__init__.py b/krkn/scenario_plugins/node_actions/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/node_actions/__init__.py +++ b/krkn/scenario_plugins/node_actions/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/node_actions/abstract_node_scenarios.py b/krkn/scenario_plugins/node_actions/abstract_node_scenarios.py index a86f8e4f..5f696bb9 100644 --- a/krkn/scenario_plugins/node_actions/abstract_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/abstract_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import sys import logging import time diff --git a/krkn/scenario_plugins/node_actions/alibaba_node_scenarios.py b/krkn/scenario_plugins/node_actions/alibaba_node_scenarios.py index 39889844..596ef68a 100644 --- a/krkn/scenario_plugins/node_actions/alibaba_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/alibaba_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import sys import time import logging diff --git a/krkn/scenario_plugins/node_actions/aws_node_scenarios.py b/krkn/scenario_plugins/node_actions/aws_node_scenarios.py index e11f837b..74340f04 100644 --- a/krkn/scenario_plugins/node_actions/aws_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/aws_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import sys import time import boto3 diff --git a/krkn/scenario_plugins/node_actions/az_node_scenarios.py b/krkn/scenario_plugins/node_actions/az_node_scenarios.py index 3caa427c..6920a934 100644 --- a/krkn/scenario_plugins/node_actions/az_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/az_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import time import os import logging diff --git a/krkn/scenario_plugins/node_actions/bm_node_scenarios.py b/krkn/scenario_plugins/node_actions/bm_node_scenarios.py index f9667c70..c7264001 100644 --- a/krkn/scenario_plugins/node_actions/bm_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/bm_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import krkn.scenario_plugins.node_actions.common_node_functions as nodeaction from krkn.scenario_plugins.node_actions.abstract_node_scenarios import ( abstract_node_scenarios, diff --git a/krkn/scenario_plugins/node_actions/common_node_functions.py b/krkn/scenario_plugins/node_actions/common_node_functions.py index e4443393..7a2aeb68 100644 --- a/krkn/scenario_plugins/node_actions/common_node_functions.py +++ b/krkn/scenario_plugins/node_actions/common_node_functions.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import time import random import logging diff --git a/krkn/scenario_plugins/node_actions/docker_node_scenarios.py b/krkn/scenario_plugins/node_actions/docker_node_scenarios.py index 9731883a..6f786116 100644 --- a/krkn/scenario_plugins/node_actions/docker_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/docker_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import krkn.scenario_plugins.node_actions.common_node_functions as nodeaction from krkn.scenario_plugins.node_actions.abstract_node_scenarios import ( abstract_node_scenarios, diff --git a/krkn/scenario_plugins/node_actions/gcp_node_scenarios.py b/krkn/scenario_plugins/node_actions/gcp_node_scenarios.py index cf7d6044..75060e7b 100644 --- a/krkn/scenario_plugins/node_actions/gcp_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/gcp_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import time import logging import google.auth diff --git a/krkn/scenario_plugins/node_actions/general_cloud_node_scenarios.py b/krkn/scenario_plugins/node_actions/general_cloud_node_scenarios.py index 830b7d35..a043aa94 100644 --- a/krkn/scenario_plugins/node_actions/general_cloud_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/general_cloud_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging from krkn.scenario_plugins.node_actions.abstract_node_scenarios import ( abstract_node_scenarios, diff --git a/krkn/scenario_plugins/node_actions/ibmcloud_node_scenarios.py b/krkn/scenario_plugins/node_actions/ibmcloud_node_scenarios.py index 039d766a..65d6c60d 100644 --- a/krkn/scenario_plugins/node_actions/ibmcloud_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/ibmcloud_node_scenarios.py @@ -1,4 +1,17 @@ #!/usr/bin/env python +# Copyright 2025 The Krkn Authors +# +# 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. import time import typing from os import environ diff --git a/krkn/scenario_plugins/node_actions/ibmcloud_power_node_scenarios.py b/krkn/scenario_plugins/node_actions/ibmcloud_power_node_scenarios.py index 80c478be..e8d69db8 100644 --- a/krkn/scenario_plugins/node_actions/ibmcloud_power_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/ibmcloud_power_node_scenarios.py @@ -1,4 +1,17 @@ #!/usr/bin/env python +# Copyright 2025 The Krkn Authors +# +# 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. import time from os import environ from dataclasses import dataclass diff --git a/krkn/scenario_plugins/node_actions/node_actions_scenario_plugin.py b/krkn/scenario_plugins/node_actions/node_actions_scenario_plugin.py index d981e964..d12b912a 100644 --- a/krkn/scenario_plugins/node_actions/node_actions_scenario_plugin.py +++ b/krkn/scenario_plugins/node_actions/node_actions_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import time from multiprocessing.pool import ThreadPool diff --git a/krkn/scenario_plugins/node_actions/openstack_node_scenarios.py b/krkn/scenario_plugins/node_actions/openstack_node_scenarios.py index 044bae9b..d39b63db 100644 --- a/krkn/scenario_plugins/node_actions/openstack_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/openstack_node_scenarios.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import sys import time import logging diff --git a/krkn/scenario_plugins/node_actions/vmware_node_scenarios.py b/krkn/scenario_plugins/node_actions/vmware_node_scenarios.py index 20ed23c3..7a654023 100644 --- a/krkn/scenario_plugins/node_actions/vmware_node_scenarios.py +++ b/krkn/scenario_plugins/node_actions/vmware_node_scenarios.py @@ -1,4 +1,17 @@ #!/usr/bin/env python +# Copyright 2025 The Krkn Authors +# +# 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. import logging import random import sys diff --git a/krkn/scenario_plugins/pod_disruption/__init__.py b/krkn/scenario_plugins/pod_disruption/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/pod_disruption/__init__.py +++ b/krkn/scenario_plugins/pod_disruption/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/pod_disruption/models/__init__.py b/krkn/scenario_plugins/pod_disruption/models/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/pod_disruption/models/__init__.py +++ b/krkn/scenario_plugins/pod_disruption/models/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/pod_disruption/models/models.py b/krkn/scenario_plugins/pod_disruption/models/models.py index b763fdd5..67adb868 100644 --- a/krkn/scenario_plugins/pod_disruption/models/models.py +++ b/krkn/scenario_plugins/pod_disruption/models/models.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from dataclasses import dataclass @dataclass diff --git a/krkn/scenario_plugins/pod_disruption/pod_disruption_scenario_plugin.py b/krkn/scenario_plugins/pod_disruption/pod_disruption_scenario_plugin.py index 66a74891..dce059c4 100644 --- a/krkn/scenario_plugins/pod_disruption/pod_disruption_scenario_plugin.py +++ b/krkn/scenario_plugins/pod_disruption/pod_disruption_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import random import time diff --git a/krkn/scenario_plugins/pvc/__init__.py b/krkn/scenario_plugins/pvc/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/pvc/__init__.py +++ b/krkn/scenario_plugins/pvc/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/pvc/pvc_scenario_plugin.py b/krkn/scenario_plugins/pvc/pvc_scenario_plugin.py index 6bc1f8ce..1d6b7f17 100644 --- a/krkn/scenario_plugins/pvc/pvc_scenario_plugin.py +++ b/krkn/scenario_plugins/pvc/pvc_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import base64 import json import logging diff --git a/krkn/scenario_plugins/scenario_plugin_factory.py b/krkn/scenario_plugins/scenario_plugin_factory.py index ec791df5..e0ba4f4d 100644 --- a/krkn/scenario_plugins/scenario_plugin_factory.py +++ b/krkn/scenario_plugins/scenario_plugin_factory.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import importlib import inspect import pkgutil diff --git a/krkn/scenario_plugins/service_disruption/__init__.py b/krkn/scenario_plugins/service_disruption/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/service_disruption/__init__.py +++ b/krkn/scenario_plugins/service_disruption/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/service_disruption/service_disruption_scenario_plugin.py b/krkn/scenario_plugins/service_disruption/service_disruption_scenario_plugin.py index 5816307b..2515f14a 100644 --- a/krkn/scenario_plugins/service_disruption/service_disruption_scenario_plugin.py +++ b/krkn/scenario_plugins/service_disruption/service_disruption_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import random import time diff --git a/krkn/scenario_plugins/service_hijacking/__init__.py b/krkn/scenario_plugins/service_hijacking/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/service_hijacking/__init__.py +++ b/krkn/scenario_plugins/service_hijacking/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/service_hijacking/service_hijacking_scenario_plugin.py b/krkn/scenario_plugins/service_hijacking/service_hijacking_scenario_plugin.py index c0e8f7f7..7f0f9a28 100644 --- a/krkn/scenario_plugins/service_hijacking/service_hijacking_scenario_plugin.py +++ b/krkn/scenario_plugins/service_hijacking/service_hijacking_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import json import logging import time diff --git a/krkn/scenario_plugins/shut_down/__init__.py b/krkn/scenario_plugins/shut_down/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/shut_down/__init__.py +++ b/krkn/scenario_plugins/shut_down/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/shut_down/shut_down_scenario_plugin.py b/krkn/scenario_plugins/shut_down/shut_down_scenario_plugin.py index df1373a0..2d93424d 100644 --- a/krkn/scenario_plugins/shut_down/shut_down_scenario_plugin.py +++ b/krkn/scenario_plugins/shut_down/shut_down_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import time from multiprocessing.pool import ThreadPool diff --git a/krkn/scenario_plugins/syn_flood/__init__.py b/krkn/scenario_plugins/syn_flood/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/syn_flood/__init__.py +++ b/krkn/scenario_plugins/syn_flood/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/syn_flood/syn_flood_scenario_plugin.py b/krkn/scenario_plugins/syn_flood/syn_flood_scenario_plugin.py index 3e4b14d8..98e6949f 100644 --- a/krkn/scenario_plugins/syn_flood/syn_flood_scenario_plugin.py +++ b/krkn/scenario_plugins/syn_flood/syn_flood_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import base64 import json import logging diff --git a/krkn/scenario_plugins/time_actions/__init__.py b/krkn/scenario_plugins/time_actions/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/time_actions/__init__.py +++ b/krkn/scenario_plugins/time_actions/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/time_actions/time_actions_scenario_plugin.py b/krkn/scenario_plugins/time_actions/time_actions_scenario_plugin.py index 2f780204..52cfb5c2 100644 --- a/krkn/scenario_plugins/time_actions/time_actions_scenario_plugin.py +++ b/krkn/scenario_plugins/time_actions/time_actions_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import datetime import logging import random diff --git a/krkn/scenario_plugins/zone_outage/__init__.py b/krkn/scenario_plugins/zone_outage/__init__.py index e69de29b..8ac0d87b 100644 --- a/krkn/scenario_plugins/zone_outage/__init__.py +++ b/krkn/scenario_plugins/zone_outage/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2025 The Krkn Authors +# +# 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. diff --git a/krkn/scenario_plugins/zone_outage/zone_outage_scenario_plugin.py b/krkn/scenario_plugins/zone_outage/zone_outage_scenario_plugin.py index cd26f697..094d0bed 100644 --- a/krkn/scenario_plugins/zone_outage/zone_outage_scenario_plugin.py +++ b/krkn/scenario_plugins/zone_outage/zone_outage_scenario_plugin.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import base64 import json import logging diff --git a/krkn/utils/ErrorCollectionHandler.py b/krkn/utils/ErrorCollectionHandler.py index a9263076..1d99e922 100644 --- a/krkn/utils/ErrorCollectionHandler.py +++ b/krkn/utils/ErrorCollectionHandler.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging import threading from datetime import datetime, timezone diff --git a/krkn/utils/ErrorLog.py b/krkn/utils/ErrorLog.py index bfb30177..5e395547 100644 --- a/krkn/utils/ErrorLog.py +++ b/krkn/utils/ErrorLog.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from dataclasses import dataclass, asdict diff --git a/krkn/utils/HealthChecker.py b/krkn/utils/HealthChecker.py index f8b59e94..a6ab853d 100644 --- a/krkn/utils/HealthChecker.py +++ b/krkn/utils/HealthChecker.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import requests import time import logging diff --git a/krkn/utils/TeeLogHandler.py b/krkn/utils/TeeLogHandler.py index cf3d501d..fbfa6cf3 100644 --- a/krkn/utils/TeeLogHandler.py +++ b/krkn/utils/TeeLogHandler.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import logging class TeeLogHandler(logging.Handler): logs: list[str] = [] diff --git a/krkn/utils/VirtChecker.py b/krkn/utils/VirtChecker.py index 08ab41a6..a9b90c1a 100644 --- a/krkn/utils/VirtChecker.py +++ b/krkn/utils/VirtChecker.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import time import logging diff --git a/krkn/utils/__init__.py b/krkn/utils/__init__.py index a392e3e0..16a6d7fb 100644 --- a/krkn/utils/__init__.py +++ b/krkn/utils/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. from .TeeLogHandler import TeeLogHandler from .ErrorLog import ErrorLog from .ErrorCollectionHandler import ErrorCollectionHandler diff --git a/krkn/utils/functions.py b/krkn/utils/functions.py index 0774865f..0ac8fa33 100644 --- a/krkn/utils/functions.py +++ b/krkn/utils/functions.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import krkn_lib.utils from krkn_lib.k8s import KrknKubernetes from krkn_lib.models.telemetry import ScenarioTelemetry diff --git a/run_kraken.py b/run_kraken.py index 4e00c553..58a9785d 100644 --- a/run_kraken.py +++ b/run_kraken.py @@ -1,4 +1,17 @@ #!/usr/bin/env python +# Copyright 2025 The Krkn Authors +# +# 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. import datetime import json import os diff --git a/scenarios/kind/container_etcd.yml b/scenarios/kind/container_etcd.yml new file mode 100755 index 00000000..33b0a0ce --- /dev/null +++ b/scenarios/kind/container_etcd.yml @@ -0,0 +1,8 @@ +scenarios: +- name: "kill etcd container" + namespace: "kube-system" + label_selector: "component=etcd" + container_name: "etcd" + action: 1 + count: 1 + expected_recovery_time: 120 diff --git a/scenarios/openshift/cnv.yaml b/scenarios/openshift/cnv.yaml new file mode 100644 index 00000000..f5e0c475 --- /dev/null +++ b/scenarios/openshift/cnv.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=../plugin.schema.json +- id: kill-pods + config: + namespace_pattern: ^openshift-cnv$ + label_selector: kubevirt.io=virt-operator + krkn_pod_recovery_time: 120 + exclude_label: "" # excludes pods marked with this label from chaos + diff --git a/scenarios/openshift/container.yml b/scenarios/openshift/container.yml new file mode 100755 index 00000000..87728f0d --- /dev/null +++ b/scenarios/openshift/container.yml @@ -0,0 +1,9 @@ +scenarios: +- name: "kill etcd container" + namespace: "kube-system" + label_selector: "app=kindnet" + container_name: "" + action: 1 + count: 1 + expected_recovery_time: 120 + exclude_label: "" \ No newline at end of file diff --git a/scenarios/openshift/container_ovn.yml b/scenarios/openshift/container_ovn.yml new file mode 100755 index 00000000..a587ca36 --- /dev/null +++ b/scenarios/openshift/container_ovn.yml @@ -0,0 +1,8 @@ +scenarios: +- name: "kill ovn container" + namespace: "openshift-ovn-kubernetes" + label_selector: "app=ovnkube-node" + container_name: "ovn-controller" + action: 1 + count: 1 + expected_recovery_time: 120 diff --git a/scenarios/openshift/openshift-ovn-kube.yml b/scenarios/openshift/openshift-ovn-kube.yml new file mode 100755 index 00000000..6e3048b1 --- /dev/null +++ b/scenarios/openshift/openshift-ovn-kube.yml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=../plugin.schema.json +- id: kill-pods + config: + namespace_pattern: ^openshift-ovn-kubernetes$ + label_selector: app=ovnkube-node + krkn_pod_recovery_time: 120 + diff --git a/scenarios/openshift/ovn-pod.yaml b/scenarios/openshift/ovn-pod.yaml new file mode 100644 index 00000000..2f141e61 --- /dev/null +++ b/scenarios/openshift/ovn-pod.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=../plugin.schema.json +- id: kill-pods + config: + namespace_pattern: openshift-ovn-kubernetes + krkn_pod_recovery_time: 120 + label_selector: app=ovnkube-node + exclude_label: "" # excludes pods marked with this label from chaos diff --git a/scenarios/openshift/submariner.yml b/scenarios/openshift/submariner.yml new file mode 100755 index 00000000..b0011e56 --- /dev/null +++ b/scenarios/openshift/submariner.yml @@ -0,0 +1,5 @@ +- id: kill-pods + config: + namespace_pattern: submariner-operator + label_selector: app=submariner-routeagent + krkn_pod_recovery_time: 120 \ No newline at end of file diff --git a/server.py b/server.py index 3bbc3a7b..477c10ec 100644 --- a/server.py +++ b/server.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import sys import logging import _thread diff --git a/setup.py b/setup.py index 111ba7ff..7f623973 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. # -*- coding: utf-8 -*- import sys diff --git a/utils/chaos_recommender/chaos_recommender.py b/utils/chaos_recommender/chaos_recommender.py index 4b3af527..e985d0a4 100644 --- a/utils/chaos_recommender/chaos_recommender.py +++ b/utils/chaos_recommender/chaos_recommender.py @@ -1,3 +1,16 @@ +# Copyright 2025 The Krkn Authors +# +# 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. import argparse import json import logging