From 469c08d1c25af5a8953706d05c4c9297ed42abc6 Mon Sep 17 00:00:00 2001 From: nvazquez Date: Tue, 21 May 2024 21:31:00 -0300 Subject: [PATCH] Add missing headers and fix end of line on files --- .../api/response/KubernetesUserVmResponse.java | 16 ++++++++++++++++ .../KubernetesClusterActionWorker.java | 18 ++++++++++++++++-- .../KubernetesClusterAddWorker.java | 16 ++++++++++++++++ .../KubernetesClusterRemoveWorker.java | 16 ++++++++++++++++ .../RemoveNodesFromKubernetesClusterCmd.java | 16 ++++++++++++++++ .../resources/script/remove-node-from-cluster | 18 +++++++++++++++++- .../main/resources/script/validate-cks-node | 2 +- .../cks/ubuntu/22.04/cks-ubuntu-2204.json | 2 +- .../appliance/cks/ubuntu/22.04/http/meta-data | 2 +- .../appliance/cks/ubuntu/22.04/http/user-data | 2 +- .../cks/ubuntu/22.04/scripts/apt_upgrade.sh | 2 +- .../22.04/scripts/configure-cloud-init.sh | 3 --- .../cks/ubuntu/22.04/scripts/setup_template.sh | 16 ++++++++++++++++ 13 files changed, 118 insertions(+), 11 deletions(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/KubernetesUserVmResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/KubernetesUserVmResponse.java index 61edbafd48f..2285547ab77 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/KubernetesUserVmResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/KubernetesUserVmResponse.java @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package org.apache.cloudstack.api.response; import com.cloud.network.router.VirtualRouter; diff --git a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java index 9728310b54d..df3e7675ce8 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java +++ b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java @@ -1,5 +1,19 @@ - - +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package com.cloud.kubernetes.cluster.actionworkers; import java.io.BufferedWriter; diff --git a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterAddWorker.java b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterAddWorker.java index 68d9810d80a..935d206e489 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterAddWorker.java +++ b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterAddWorker.java @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package com.cloud.kubernetes.cluster.actionworkers; import com.cloud.event.ActionEventUtils; diff --git a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterRemoveWorker.java b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterRemoveWorker.java index f39d81d7304..c76609686a6 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterRemoveWorker.java +++ b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterRemoveWorker.java @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package com.cloud.kubernetes.cluster.actionworkers; import com.cloud.event.ActionEventUtils; diff --git a/plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/command/user/kubernetes/cluster/RemoveNodesFromKubernetesClusterCmd.java b/plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/command/user/kubernetes/cluster/RemoveNodesFromKubernetesClusterCmd.java index c0b569778fe..72a5c114440 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/command/user/kubernetes/cluster/RemoveNodesFromKubernetesClusterCmd.java +++ b/plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/command/user/kubernetes/cluster/RemoveNodesFromKubernetesClusterCmd.java @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package org.apache.cloudstack.api.command.user.kubernetes.cluster; import com.cloud.exception.ConcurrentOperationException; diff --git a/plugins/integrations/kubernetes-service/src/main/resources/script/remove-node-from-cluster b/plugins/integrations/kubernetes-service/src/main/resources/script/remove-node-from-cluster index 1d2788bdd87..f852a0fd4dd 100644 --- a/plugins/integrations/kubernetes-service/src/main/resources/script/remove-node-from-cluster +++ b/plugins/integrations/kubernetes-service/src/main/resources/script/remove-node-from-cluster @@ -1,4 +1,20 @@ #!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. export PATH=$PATH:/opt/bin node_name=$1 @@ -24,4 +40,4 @@ else sudo cp /root/.kube/config /home/cloud/.kube/ sudo chown -R cloud:cloud /home/cloud/.kube kubectl delete node $node_name -fi \ No newline at end of file +fi diff --git a/plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node b/plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node index a6d38414b0a..e28614e05af 100644 --- a/plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node +++ b/plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node @@ -42,4 +42,4 @@ if (( ${#MISSING_PACKAGES[@]} )); then exit 1 else echo 0 -fi \ No newline at end of file +fi diff --git a/tools/appliance/cks/ubuntu/22.04/cks-ubuntu-2204.json b/tools/appliance/cks/ubuntu/22.04/cks-ubuntu-2204.json index 3cf0bd80641..c7ee09f0354 100644 --- a/tools/appliance/cks/ubuntu/22.04/cks-ubuntu-2204.json +++ b/tools/appliance/cks/ubuntu/22.04/cks-ubuntu-2204.json @@ -51,4 +51,4 @@ "type": "shell" } ] -} \ No newline at end of file +} diff --git a/tools/appliance/cks/ubuntu/22.04/http/meta-data b/tools/appliance/cks/ubuntu/22.04/http/meta-data index d216be4ddc9..13a83393a91 100644 --- a/tools/appliance/cks/ubuntu/22.04/http/meta-data +++ b/tools/appliance/cks/ubuntu/22.04/http/meta-data @@ -13,4 +13,4 @@ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations -# under the License. \ No newline at end of file +# under the License. diff --git a/tools/appliance/cks/ubuntu/22.04/http/user-data b/tools/appliance/cks/ubuntu/22.04/http/user-data index 341af6701b7..15a7f8f3235 100644 --- a/tools/appliance/cks/ubuntu/22.04/http/user-data +++ b/tools/appliance/cks/ubuntu/22.04/http/user-data @@ -100,4 +100,4 @@ autoinstall: - chroot /target apt-get purge -y snapd - curtin in-target --target=/target -- apt-get purge --auto-remove -y - curtin in-target --target=/target -- apt-get clean - - curtin in-target --target=/target -- rm -rf /var/lib/apt/lists/* \ No newline at end of file + - curtin in-target --target=/target -- rm -rf /var/lib/apt/lists/* diff --git a/tools/appliance/cks/ubuntu/22.04/scripts/apt_upgrade.sh b/tools/appliance/cks/ubuntu/22.04/scripts/apt_upgrade.sh index 4551be4f485..22d25d628ef 100644 --- a/tools/appliance/cks/ubuntu/22.04/scripts/apt_upgrade.sh +++ b/tools/appliance/cks/ubuntu/22.04/scripts/apt_upgrade.sh @@ -34,4 +34,4 @@ function apt_upgrade() { apt-get clean } -return 2>/dev/null || apt_upgrade \ No newline at end of file +return 2>/dev/null || apt_upgrade diff --git a/tools/appliance/cks/ubuntu/22.04/scripts/configure-cloud-init.sh b/tools/appliance/cks/ubuntu/22.04/scripts/configure-cloud-init.sh index cc26fd162d0..ca58d43f447 100644 --- a/tools/appliance/cks/ubuntu/22.04/scripts/configure-cloud-init.sh +++ b/tools/appliance/cks/ubuntu/22.04/scripts/configure-cloud-init.sh @@ -47,6 +47,3 @@ EOF } configure_services - - - diff --git a/tools/appliance/cks/ubuntu/22.04/scripts/setup_template.sh b/tools/appliance/cks/ubuntu/22.04/scripts/setup_template.sh index 0326b128daa..be8577cf4e8 100644 --- a/tools/appliance/cks/ubuntu/22.04/scripts/setup_template.sh +++ b/tools/appliance/cks/ubuntu/22.04/scripts/setup_template.sh @@ -1,4 +1,20 @@ #!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. function create_user() { username=$1