From 14f59f59019bb3b44009c0e1e5d9e0b7d64d5f7c Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Thu, 1 Feb 2024 12:17:15 +0100 Subject: [PATCH] chore: add license to files --- internal/identity/doc.go | 16 ++++++++++++++++ internal/identity/impl.go | 16 ++++++++++++++++ internal/operator/doc.go | 16 ++++++++++++++++ internal/operator/impl.go | 16 ++++++++++++++++ internal/operator/mutations.go | 16 ++++++++++++++++ internal/operator/spec.go | 16 ++++++++++++++++ internal/operator/validation.go | 16 ++++++++++++++++ main.go | 16 ++++++++++++++++ pkg/logging/doc.go | 16 ++++++++++++++++ pkg/logging/logging.go | 16 ++++++++++++++++ pkg/metadata/doc.go | 16 ++++++++++++++++ pkg/pluginhelper/doc.go | 16 ++++++++++++++++ pkg/pluginhelper/helper.go | 16 ++++++++++++++++ pkg/pluginhelper/server.go | 16 ++++++++++++++++ scripts/build.sh | 16 ++++++++++++++++ scripts/check.sh | 17 ++++++++++++++++- scripts/image.sh | 15 +++++++++++++++ scripts/remove-all-files.sh | 17 ++++++++++++++++- scripts/run.sh | 18 +++++++++++++++++- scripts/test.sh | 15 +++++++++++++++ 20 files changed, 319 insertions(+), 3 deletions(-) diff --git a/internal/identity/doc.go b/internal/identity/doc.go index a5972d2..390f830 100644 --- a/internal/identity/doc.go +++ b/internal/identity/doc.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 identity contains the implementation of the // identity service package identity diff --git a/internal/identity/impl.go b/internal/identity/impl.go index fa9dcd8..3c1b4da 100644 --- a/internal/identity/impl.go +++ b/internal/identity/impl.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 identity import ( diff --git a/internal/operator/doc.go b/internal/operator/doc.go index c1173c9..5b85aa9 100644 --- a/internal/operator/doc.go +++ b/internal/operator/doc.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 operator contains the implementation of the // operator service package operator diff --git a/internal/operator/impl.go b/internal/operator/impl.go index 960f01a..1919cc9 100644 --- a/internal/operator/impl.go +++ b/internal/operator/impl.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 operator import ( diff --git a/internal/operator/mutations.go b/internal/operator/mutations.go index 3d58587..532f54c 100644 --- a/internal/operator/mutations.go +++ b/internal/operator/mutations.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 operator import ( diff --git a/internal/operator/spec.go b/internal/operator/spec.go index 0d87faa..66a2e19 100644 --- a/internal/operator/spec.go +++ b/internal/operator/spec.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 operator import corev1 "k8s.io/api/core/v1" diff --git a/internal/operator/validation.go b/internal/operator/validation.go index 69bb4eb..dd49243 100644 --- a/internal/operator/validation.go +++ b/internal/operator/validation.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 operator import ( diff --git a/main.go b/main.go index 84fe7e5..99b307c 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 main is the entrypoint of the application package main diff --git a/pkg/logging/doc.go b/pkg/logging/doc.go index ce506da..b346242 100644 --- a/pkg/logging/doc.go +++ b/pkg/logging/doc.go @@ -1,2 +1,18 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 logging is the logging infrastructure package logging diff --git a/pkg/logging/logging.go b/pkg/logging/logging.go index 568e096..ce68774 100644 --- a/pkg/logging/logging.go +++ b/pkg/logging/logging.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 logging import ( diff --git a/pkg/metadata/doc.go b/pkg/metadata/doc.go index ef6e002..3aa3a47 100644 --- a/pkg/metadata/doc.go +++ b/pkg/metadata/doc.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 metadata contains the metadata of this plugin package metadata diff --git a/pkg/pluginhelper/doc.go b/pkg/pluginhelper/doc.go index 248b3eb..bda5081 100644 --- a/pkg/pluginhelper/doc.go +++ b/pkg/pluginhelper/doc.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 pluginhelper contains some helper functions to quickly // implement CNPG-I plugins package pluginhelper diff --git a/pkg/pluginhelper/helper.go b/pkg/pluginhelper/helper.go index 5af720b..8f7615e 100644 --- a/pkg/pluginhelper/helper.go +++ b/pkg/pluginhelper/helper.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 pluginhelper import ( diff --git a/pkg/pluginhelper/server.go b/pkg/pluginhelper/server.go index 2148938..5df5b73 100644 --- a/pkg/pluginhelper/server.go +++ b/pkg/pluginhelper/server.go @@ -1,3 +1,19 @@ +/* +Copyright The CloudNativePG Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 pluginhelper import ( diff --git a/scripts/build.sh b/scripts/build.sh index 44098f2..ae0cb10 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,4 +1,20 @@ #!/usr/bin/env bash +## +## Copyright The CloudNativePG Contributors +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## cd "$(dirname "$0")/.." || exit + CGO_ENABLED=0 go build -o bin/plugin-pvc-backup main.go diff --git a/scripts/check.sh b/scripts/check.sh index b9b552a..28f24fe 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -1,4 +1,19 @@ #!/usr/bin/env bash +## +## Copyright The CloudNativePG Contributors +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## cd "$(dirname "$0")/.." || exit @@ -6,4 +21,4 @@ if [ ! -f "bin/golangci-lint" ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2 fi -bin/golangci-lint run \ No newline at end of file +bin/golangci-lint run diff --git a/scripts/image.sh b/scripts/image.sh index aa4e27d..001e9f2 100755 --- a/scripts/image.sh +++ b/scripts/image.sh @@ -1,4 +1,19 @@ #!/usr/bin/env bash +## +## Copyright The CloudNativePG Contributors +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## cd "$(dirname "$0")/.." || exit diff --git a/scripts/remove-all-files.sh b/scripts/remove-all-files.sh index 5f8e24a..715c308 100755 --- a/scripts/remove-all-files.sh +++ b/scripts/remove-all-files.sh @@ -1,4 +1,19 @@ #!/usr/bin/env bash +## +## Copyright The CloudNativePG Contributors +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## set -eu @@ -36,4 +51,4 @@ spec: EOF kubectl wait --for=condition=complete job/cleanup-files -kubectl delete job cleanup-files \ No newline at end of file +kubectl delete job cleanup-files diff --git a/scripts/run.sh b/scripts/run.sh index 788624a..bcda5be 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,4 +1,20 @@ #!/usr/bin/env bash +## +## Copyright The CloudNativePG Contributors +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## + set -eu cd "$(dirname "$0")/.." || exit @@ -14,4 +30,4 @@ kind load docker-image --name=${current_context} plugin-pvc-backup:${VERSION:-la kubectl patch deployment -n cnpg-system cnpg-controller-manager --patch-file kubernetes/deployment-patch.json kubectl rollout restart deployment -n cnpg-system cnpg-controller-manager -kubectl rollout status deployment -n cnpg-system cnpg-controller-manager \ No newline at end of file +kubectl rollout status deployment -n cnpg-system cnpg-controller-manager diff --git a/scripts/test.sh b/scripts/test.sh index f4eb831..420afae 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,4 +1,19 @@ #!/usr/bin/env bash +## +## Copyright The CloudNativePG Contributors +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## cd "$(dirname "$0")/.." || exit go test ./... \ No newline at end of file