diff --git a/Makefile b/Makefile index 787b000fe..3fd50a2a1 100644 --- a/Makefile +++ b/Makefile @@ -112,6 +112,10 @@ add-license: license: @$(MAKE) license.add +.PHONY: license.controller +license.controller: + @$(MAKE) license.controller.add + ## gen: Generate all necessary files. .PHONY: gen gen: diff --git a/controllers/account/controllers/cache/cache.go b/controllers/account/controllers/cache/cache.go index 0cad15ff6..8ff6eb8bb 100644 --- a/controllers/account/controllers/cache/cache.go +++ b/controllers/account/controllers/cache/cache.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 cache import ( diff --git a/controllers/account/testdata/account/recharge.go b/controllers/account/testdata/account/recharge.go index d48cd0e4b..3b87238d5 100755 --- a/controllers/account/testdata/account/recharge.go +++ b/controllers/account/testdata/account/recharge.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 import ( diff --git a/controllers/account/testdata/api/account.go b/controllers/account/testdata/api/account.go index 8bdd9e152..cc34d658d 100644 --- a/controllers/account/testdata/api/account.go +++ b/controllers/account/testdata/api/account.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/account/testdata/api/debt.go b/controllers/account/testdata/api/debt.go index dafc12179..d010e247e 100644 --- a/controllers/account/testdata/api/debt.go +++ b/controllers/account/testdata/api/debt.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/account/testdata/api/deployment.go b/controllers/account/testdata/api/deployment.go index ea1679143..3f27c6fea 100644 --- a/controllers/account/testdata/api/deployment.go +++ b/controllers/account/testdata/api/deployment.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/account/testdata/api/replicaset.go b/controllers/account/testdata/api/replicaset.go index 778f64ec1..a16e67b09 100644 --- a/controllers/account/testdata/api/replicaset.go +++ b/controllers/account/testdata/api/replicaset.go @@ -1 +1,15 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api diff --git a/controllers/account/testdata/api/user.go b/controllers/account/testdata/api/user.go index a246f8a54..393e24b37 100644 --- a/controllers/account/testdata/api/user.go +++ b/controllers/account/testdata/api/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/account/testdata/e2e/debt_test.go b/controllers/account/testdata/e2e/debt_test.go index 51027e3e2..deb9558a8 100644 --- a/controllers/account/testdata/e2e/debt_test.go +++ b/controllers/account/testdata/e2e/debt_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 e2e import ( diff --git a/controllers/admission/api/v1/validate.go b/controllers/admission/api/v1/validate.go index 61c4f8988..6090fd273 100644 --- a/controllers/admission/api/v1/validate.go +++ b/controllers/admission/api/v1/validate.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 v1 import ( diff --git a/controllers/cluster/common/common.go b/controllers/cluster/common/common.go index dd828fe8a..4a1bac4ab 100644 --- a/controllers/cluster/common/common.go +++ b/controllers/cluster/common/common.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 common const ( diff --git a/controllers/cluster/utils/ssh.go b/controllers/cluster/utils/ssh.go index 1862c0c70..924a68cc1 100644 --- a/controllers/cluster/utils/ssh.go +++ b/controllers/cluster/utils/ssh.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 utils import ( diff --git a/controllers/db/bytebase/client/api/auth.go b/controllers/db/bytebase/client/api/auth.go index 962899c16..f89788488 100644 --- a/controllers/db/bytebase/client/api/auth.go +++ b/controllers/db/bytebase/client/api/auth.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api type AuthRequest struct { diff --git a/controllers/db/bytebase/client/api/client.go b/controllers/db/bytebase/client/api/client.go index 9901e38b9..e5bf97f31 100644 --- a/controllers/db/bytebase/client/api/client.go +++ b/controllers/db/bytebase/client/api/client.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/db/bytebase/client/api/common.go b/controllers/db/bytebase/client/api/common.go index e1834827d..ef10fede5 100644 --- a/controllers/db/bytebase/client/api/common.go +++ b/controllers/db/bytebase/client/api/common.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api // State is the state for a row. diff --git a/controllers/db/bytebase/client/api/data_source.go b/controllers/db/bytebase/client/api/data_source.go index f6a3446f6..e16ec92e7 100644 --- a/controllers/db/bytebase/client/api/data_source.go +++ b/controllers/db/bytebase/client/api/data_source.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api // DataSourceType is the type for data source. diff --git a/controllers/db/bytebase/client/api/database_role.go b/controllers/db/bytebase/client/api/database_role.go index d7ed75c34..e042ecce2 100644 --- a/controllers/db/bytebase/client/api/database_role.go +++ b/controllers/db/bytebase/client/api/database_role.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api // RoleAttribute is the attribute for role. diff --git a/controllers/db/bytebase/client/api/environment.go b/controllers/db/bytebase/client/api/environment.go index 37ad940fc..330aa0044 100644 --- a/controllers/db/bytebase/client/api/environment.go +++ b/controllers/db/bytebase/client/api/environment.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api // EnvironmentMessage is the API message for an environment. diff --git a/controllers/db/bytebase/client/api/instance.go b/controllers/db/bytebase/client/api/instance.go index 00fd0be27..c9cc94392 100644 --- a/controllers/db/bytebase/client/api/instance.go +++ b/controllers/db/bytebase/client/api/instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api // check InstanceCreate diff --git a/controllers/db/bytebase/client/auth.go b/controllers/db/bytebase/client/auth.go index b15970e9c..471f3d9bf 100644 --- a/controllers/db/bytebase/client/auth.go +++ b/controllers/db/bytebase/client/auth.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 client import ( diff --git a/controllers/db/bytebase/client/client.go b/controllers/db/bytebase/client/client.go index cdc98b013..96d943edd 100644 --- a/controllers/db/bytebase/client/client.go +++ b/controllers/db/bytebase/client/client.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 client is the API message for Bytebase API client. package client diff --git a/controllers/db/bytebase/client/environment.go b/controllers/db/bytebase/client/environment.go index 12e2cea69..9da5ed4a3 100644 --- a/controllers/db/bytebase/client/environment.go +++ b/controllers/db/bytebase/client/environment.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 client import ( diff --git a/controllers/db/bytebase/client/instance.go b/controllers/db/bytebase/client/instance.go index 3c36038bf..c4d31730f 100644 --- a/controllers/db/bytebase/client/instance.go +++ b/controllers/db/bytebase/client/instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 client import ( diff --git a/controllers/db/bytebase/controllers/bytebase/instance.go b/controllers/db/bytebase/controllers/bytebase/instance.go index 7b8b4ae97..c5e183d0b 100644 --- a/controllers/db/bytebase/controllers/bytebase/instance.go +++ b/controllers/db/bytebase/controllers/bytebase/instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 bytebase import ( diff --git a/controllers/db/bytebase/controllers/bytebase/sync.go b/controllers/db/bytebase/controllers/bytebase/sync.go index 13e8e06a7..3f85dd016 100644 --- a/controllers/db/bytebase/controllers/bytebase/sync.go +++ b/controllers/db/bytebase/controllers/bytebase/sync.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 bytebase import ( diff --git a/controllers/db/bytebase/controllers/bytebase/util.go b/controllers/db/bytebase/controllers/bytebase/util.go index f4f0fbfbe..1944b5ee7 100644 --- a/controllers/db/bytebase/controllers/bytebase/util.go +++ b/controllers/db/bytebase/controllers/bytebase/util.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 bytebase import ( diff --git a/controllers/imagehub/api/v1/common_types.go b/controllers/imagehub/api/v1/common_types.go index 4515f8cf8..3b1b6d11a 100644 --- a/controllers/imagehub/api/v1/common_types.go +++ b/controllers/imagehub/api/v1/common_types.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 v1 const ( diff --git a/controllers/imagehub/controllers/data_helper.go b/controllers/imagehub/controllers/data_helper.go index 76324dbc0..4675127e4 100644 --- a/controllers/imagehub/controllers/data_helper.go +++ b/controllers/imagehub/controllers/data_helper.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 controllers import ( diff --git a/controllers/infra/api/v1/common.go b/controllers/infra/api/v1/common.go index 94f1706f6..5b7d04ef1 100644 --- a/controllers/infra/api/v1/common.go +++ b/controllers/infra/api/v1/common.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 v1 import meteringcommonv1 "github.com/labring/sealos/controllers/common/metering/api/v1" diff --git a/controllers/infra/common/common.go b/controllers/infra/common/common.go index e825b57bc..e931e53a8 100644 --- a/controllers/infra/common/common.go +++ b/controllers/infra/common/common.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 common import "time" diff --git a/controllers/infra/common/utils/finalizer_helper.go b/controllers/infra/common/utils/finalizer_helper.go index 1a2abe959..2c8e72fc0 100644 --- a/controllers/infra/common/utils/finalizer_helper.go +++ b/controllers/infra/common/utils/finalizer_helper.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 utils // Helper functions to check and remove string from a slice of strings. diff --git a/controllers/infra/drivers/aliyun/aliyun.go b/controllers/infra/drivers/aliyun/aliyun.go index ffd3e4736..7aab89ae3 100644 --- a/controllers/infra/drivers/aliyun/aliyun.go +++ b/controllers/infra/drivers/aliyun/aliyun.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/create_instance.go b/controllers/infra/drivers/aliyun/create_instance.go index 1a94040b4..b9da86562 100644 --- a/controllers/infra/drivers/aliyun/create_instance.go +++ b/controllers/infra/drivers/aliyun/create_instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/create_keypair.go b/controllers/infra/drivers/aliyun/create_keypair.go index 1fb78bc49..01fdb726f 100644 --- a/controllers/infra/drivers/aliyun/create_keypair.go +++ b/controllers/infra/drivers/aliyun/create_keypair.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/create_volume.go b/controllers/infra/drivers/aliyun/create_volume.go index 5e7ded61d..2f93c6978 100644 --- a/controllers/infra/drivers/aliyun/create_volume.go +++ b/controllers/infra/drivers/aliyun/create_volume.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/delete_instance.go b/controllers/infra/drivers/aliyun/delete_instance.go index 2acadd15d..7ad28f1bb 100644 --- a/controllers/infra/drivers/aliyun/delete_instance.go +++ b/controllers/infra/drivers/aliyun/delete_instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/delete_keypair.go b/controllers/infra/drivers/aliyun/delete_keypair.go index fbda11380..2d5b09093 100644 --- a/controllers/infra/drivers/aliyun/delete_keypair.go +++ b/controllers/infra/drivers/aliyun/delete_keypair.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/delete_volume.go b/controllers/infra/drivers/aliyun/delete_volume.go index 9f00fff70..8b25c4efd 100644 --- a/controllers/infra/drivers/aliyun/delete_volume.go +++ b/controllers/infra/drivers/aliyun/delete_volume.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/ecs_common.go b/controllers/infra/drivers/aliyun/ecs_common.go index bfd9b586b..90bea1404 100644 --- a/controllers/infra/drivers/aliyun/ecs_common.go +++ b/controllers/infra/drivers/aliyun/ecs_common.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" diff --git a/controllers/infra/drivers/aliyun/get_instance.go b/controllers/infra/drivers/aliyun/get_instance.go index 254c00937..0e5b98dff 100644 --- a/controllers/infra/drivers/aliyun/get_instance.go +++ b/controllers/infra/drivers/aliyun/get_instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/modify_instance.go b/controllers/infra/drivers/aliyun/modify_instance.go index 7b528d5ae..b0ae1fd0a 100644 --- a/controllers/infra/drivers/aliyun/modify_instance.go +++ b/controllers/infra/drivers/aliyun/modify_instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/modify_volume.go b/controllers/infra/drivers/aliyun/modify_volume.go index fceb0fd0b..d9740a2e5 100644 --- a/controllers/infra/drivers/aliyun/modify_volume.go +++ b/controllers/infra/drivers/aliyun/modify_volume.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aliyun/stop_instance.go b/controllers/infra/drivers/aliyun/stop_instance.go index b8dd05335..68c77d348 100644 --- a/controllers/infra/drivers/aliyun/stop_instance.go +++ b/controllers/infra/drivers/aliyun/stop_instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aliyun import ( diff --git a/controllers/infra/drivers/aws/aws_gc.go b/controllers/infra/drivers/aws/aws_gc.go index b4b86d77c..64200e37b 100644 --- a/controllers/infra/drivers/aws/aws_gc.go +++ b/controllers/infra/drivers/aws/aws_gc.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aws import ( diff --git a/controllers/infra/drivers/aws/aws_gc_test.go b/controllers/infra/drivers/aws/aws_gc_test.go index 0e5f85b65..958944dc6 100644 --- a/controllers/infra/drivers/aws/aws_gc_test.go +++ b/controllers/infra/drivers/aws/aws_gc_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aws import "testing" diff --git a/controllers/infra/drivers/aws/create_volume.go b/controllers/infra/drivers/aws/create_volume.go index 80cbab75c..0d0042932 100644 --- a/controllers/infra/drivers/aws/create_volume.go +++ b/controllers/infra/drivers/aws/create_volume.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aws import ( diff --git a/controllers/infra/drivers/aws/delete_volume.go b/controllers/infra/drivers/aws/delete_volume.go index 2eb71c641..c5fbbd97e 100644 --- a/controllers/infra/drivers/aws/delete_volume.go +++ b/controllers/infra/drivers/aws/delete_volume.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aws import ( diff --git a/controllers/infra/drivers/aws/get_image.go b/controllers/infra/drivers/aws/get_image.go index d39957f90..2b5771716 100644 --- a/controllers/infra/drivers/aws/get_image.go +++ b/controllers/infra/drivers/aws/get_image.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aws import ( diff --git a/controllers/infra/drivers/aws/modify_instance.go b/controllers/infra/drivers/aws/modify_instance.go index 76e0f8370..10051b815 100644 --- a/controllers/infra/drivers/aws/modify_instance.go +++ b/controllers/infra/drivers/aws/modify_instance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aws import ( diff --git a/controllers/infra/drivers/aws/modify_volume.go b/controllers/infra/drivers/aws/modify_volume.go index d90001488..10c43a245 100644 --- a/controllers/infra/drivers/aws/modify_volume.go +++ b/controllers/infra/drivers/aws/modify_volume.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 aws import ( diff --git a/controllers/infra/drivers/create_instance_test.go b/controllers/infra/drivers/create_instance_test.go index 1d6734656..1fcf2d633 100644 --- a/controllers/infra/drivers/create_instance_test.go +++ b/controllers/infra/drivers/create_instance_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/create_keypair_test.go b/controllers/infra/drivers/create_keypair_test.go index f1b5f6263..fa6659dd8 100644 --- a/controllers/infra/drivers/create_keypair_test.go +++ b/controllers/infra/drivers/create_keypair_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/create_volume_test.go b/controllers/infra/drivers/create_volume_test.go index 8fda88c08..ecc14bc62 100644 --- a/controllers/infra/drivers/create_volume_test.go +++ b/controllers/infra/drivers/create_volume_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/delete_instance_test.go b/controllers/infra/drivers/delete_instance_test.go index 572b98863..1dc103d3f 100644 --- a/controllers/infra/drivers/delete_instance_test.go +++ b/controllers/infra/drivers/delete_instance_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/delete_keypair_test.go b/controllers/infra/drivers/delete_keypair_test.go index 065c848b3..5a1aabc53 100644 --- a/controllers/infra/drivers/delete_keypair_test.go +++ b/controllers/infra/drivers/delete_keypair_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/delete_volume_test.go b/controllers/infra/drivers/delete_volume_test.go index 1ac0f0c52..74334e492 100644 --- a/controllers/infra/drivers/delete_volume_test.go +++ b/controllers/infra/drivers/delete_volume_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/get_instance_test.go b/controllers/infra/drivers/get_instance_test.go index e9fbb358c..530636d3b 100644 --- a/controllers/infra/drivers/get_instance_test.go +++ b/controllers/infra/drivers/get_instance_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/modify_instance_test.go b/controllers/infra/drivers/modify_instance_test.go index e9914e48f..f9706f32d 100644 --- a/controllers/infra/drivers/modify_instance_test.go +++ b/controllers/infra/drivers/modify_instance_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/modify_volume_test.go b/controllers/infra/drivers/modify_volume_test.go index 6f1abeea8..a6b851e55 100644 --- a/controllers/infra/drivers/modify_volume_test.go +++ b/controllers/infra/drivers/modify_volume_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/price_test.go b/controllers/infra/drivers/price_test.go index b1f8475c0..e85194460 100644 --- a/controllers/infra/drivers/price_test.go +++ b/controllers/infra/drivers/price_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/reconcile.go b/controllers/infra/drivers/reconcile.go index 7b03e084b..99ba50e80 100644 --- a/controllers/infra/drivers/reconcile.go +++ b/controllers/infra/drivers/reconcile.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/reconcile_test.go b/controllers/infra/drivers/reconcile_test.go index 32ba738d2..476b986ec 100644 --- a/controllers/infra/drivers/reconcile_test.go +++ b/controllers/infra/drivers/reconcile_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/drivers/stop_instance_test.go b/controllers/infra/drivers/stop_instance_test.go index 9b4920f76..2507442b7 100644 --- a/controllers/infra/drivers/stop_instance_test.go +++ b/controllers/infra/drivers/stop_instance_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 drivers import ( diff --git a/controllers/infra/testdata/api/cluster.go b/controllers/infra/testdata/api/cluster.go index ab5c66248..7723dd24c 100644 --- a/controllers/infra/testdata/api/cluster.go +++ b/controllers/infra/testdata/api/cluster.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/infra/testdata/api/extension_resource_price.go b/controllers/infra/testdata/api/extension_resource_price.go index 8ce512b31..efbbfcbd5 100644 --- a/controllers/infra/testdata/api/extension_resource_price.go +++ b/controllers/infra/testdata/api/extension_resource_price.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/infra/testdata/api/infra.go b/controllers/infra/testdata/api/infra.go index ce5e9025b..213412b36 100644 --- a/controllers/infra/testdata/api/infra.go +++ b/controllers/infra/testdata/api/infra.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/infra/testdata/api/resource.go b/controllers/infra/testdata/api/resource.go index 0a3635042..e35937907 100644 --- a/controllers/infra/testdata/api/resource.go +++ b/controllers/infra/testdata/api/resource.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/infra/testdata/e2e/infra_metering_test.go b/controllers/infra/testdata/e2e/infra_metering_test.go index a85c83517..cc13f1bf5 100644 --- a/controllers/infra/testdata/e2e/infra_metering_test.go +++ b/controllers/infra/testdata/e2e/infra_metering_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 e2e import ( diff --git a/controllers/infra/testdata/e2e/infra_test.go b/controllers/infra/testdata/e2e/infra_test.go index 7f2c5c755..8ade9d720 100644 --- a/controllers/infra/testdata/e2e/infra_test.go +++ b/controllers/infra/testdata/e2e/infra_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 e2e import ( diff --git a/controllers/metering/api/v1/common_type.go b/controllers/metering/api/v1/common_type.go index 6f8bcb3ec..0fdaa4daf 100644 --- a/controllers/metering/api/v1/common_type.go +++ b/controllers/metering/api/v1/common_type.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 v1 const ( diff --git a/controllers/metering/testdata/api/AccountBalance.go b/controllers/metering/testdata/api/AccountBalance.go index 583a739c1..8755b816d 100644 --- a/controllers/metering/testdata/api/AccountBalance.go +++ b/controllers/metering/testdata/api/AccountBalance.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/metering/testdata/api/account.go b/controllers/metering/testdata/api/account.go index c894fb385..20d958bfb 100644 --- a/controllers/metering/testdata/api/account.go +++ b/controllers/metering/testdata/api/account.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/metering/testdata/api/extensionResourcePrice.go b/controllers/metering/testdata/api/extensionResourcePrice.go index c64ca6531..bc049fa44 100644 --- a/controllers/metering/testdata/api/extensionResourcePrice.go +++ b/controllers/metering/testdata/api/extensionResourcePrice.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/metering/testdata/api/metering.go b/controllers/metering/testdata/api/metering.go index a1bc030f7..a40f124e7 100644 --- a/controllers/metering/testdata/api/metering.go +++ b/controllers/metering/testdata/api/metering.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/metering/testdata/api/podController.go b/controllers/metering/testdata/api/podController.go index 162e98dd6..3d2078e3e 100644 --- a/controllers/metering/testdata/api/podController.go +++ b/controllers/metering/testdata/api/podController.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/metering/testdata/api/resource.go b/controllers/metering/testdata/api/resource.go index 0fe9a5078..025239e0a 100644 --- a/controllers/metering/testdata/api/resource.go +++ b/controllers/metering/testdata/api/resource.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 api import ( diff --git a/controllers/metering/testdata/e2e/metering_test.go b/controllers/metering/testdata/e2e/metering_test.go index 792a0d482..eaeff0275 100644 --- a/controllers/metering/testdata/e2e/metering_test.go +++ b/controllers/metering/testdata/e2e/metering_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 e2e //import ( diff --git a/controllers/pkg/common/gpu/nvidia.go b/controllers/pkg/common/gpu/nvidia.go index 1b47889af..0fb15c063 100644 --- a/controllers/pkg/common/gpu/nvidia.go +++ b/controllers/pkg/common/gpu/nvidia.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 gpu import ( diff --git a/controllers/pkg/common/resources.go b/controllers/pkg/common/resources.go index 26a17aa2a..c0003bbb1 100644 --- a/controllers/pkg/common/resources.go +++ b/controllers/pkg/common/resources.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 common import ( diff --git a/controllers/pkg/crypto/crypto_test.go b/controllers/pkg/crypto/crypto_test.go index d5bec5de3..8fa702857 100644 --- a/controllers/pkg/crypto/crypto_test.go +++ b/controllers/pkg/crypto/crypto_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 crypto import ( diff --git a/controllers/pkg/database/interface.go b/controllers/pkg/database/interface.go index aebf1c0a8..037def2e5 100644 --- a/controllers/pkg/database/interface.go +++ b/controllers/pkg/database/interface.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 database import ( diff --git a/controllers/pkg/database/mongodb.go b/controllers/pkg/database/mongodb.go index 684654c8a..c1e450c8a 100644 --- a/controllers/pkg/database/mongodb.go +++ b/controllers/pkg/database/mongodb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 database import ( diff --git a/controllers/pkg/database/mongodb_test.go b/controllers/pkg/database/mongodb_test.go index 91fb2e723..4ce1a3213 100644 --- a/controllers/pkg/database/mongodb_test.go +++ b/controllers/pkg/database/mongodb_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 database import ( diff --git a/controllers/pkg/utils/env.go b/controllers/pkg/utils/env.go index 912291750..ccc8f7e1f 100644 --- a/controllers/pkg/utils/env.go +++ b/controllers/pkg/utils/env.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 utils import ( diff --git a/controllers/resources/metering/main.go b/controllers/resources/metering/main.go index ceaa54e9b..691cc39e8 100644 --- a/controllers/resources/metering/main.go +++ b/controllers/resources/metering/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 sealos. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 import ( diff --git a/scripts/make-rules/common.mk b/scripts/make-rules/common.mk index a6a19e538..995a9f63e 100644 --- a/scripts/make-rules/common.mk +++ b/scripts/make-rules/common.mk @@ -60,7 +60,9 @@ endif # Linux command settings CODE_DIRS := $(ROOT_DIR)/pkg $(ROOT_DIR)/cmd $(ROOT_DIR)/test $(ROOT_DIR)/staging +CONTROLLERS_DIR := $(ROOT_DIR)/controllers FIND := find $(CODE_DIRS) +FIND_CONTROLLERS := find $(CONTROLLERS_DIR) # verbose settings ifndef V diff --git a/scripts/make-rules/license.mk b/scripts/make-rules/license.mk index 5492ff77e..99f46c6d6 100644 --- a/scripts/make-rules/license.mk +++ b/scripts/make-rules/license.mk @@ -20,5 +20,10 @@ license.verify: tools.verify.addlicense @$(TOOLS_DIR)/addlicense -check -ignore **/test/** -f $(TEMPLATE) $(CODE_DIRS) .PHONY: license.add -license.add: tools.verify.addlicense +license.add: tools.verify.addlicense license.controller.add @$(TOOLS_DIR)/addlicense -y $(shell date +"%Y") -c "sealos." -f $(TEMPLATE) $(CODE_DIRS) + +.PHONY: license.controller.add +license.controller.add: tools.verify.addlicense + @echo "===========> Formating controllers codes" + @$(FIND_CONTROLLERS) -type f -name '*.go' | xargs $(TOOLS_DIR)/addlicense -v -y $(shell date +"%Y") -c "sealos." -f $(TEMPLATE) \ No newline at end of file