From e7260878510ef618d0c55a8567ae5716288f4f63 Mon Sep 17 00:00:00 2001 From: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:44:45 +0100 Subject: [PATCH] feat: add push secret to e2e tests (#3017) * feat: add push secret to e2e tests Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * finally, a fully working example for an e2e flow with push secret Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * fix value field duplication issue Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> --------- Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> --- .../v1beta1/externalsecret_validator.go | 1 + .../v1beta1/externalsecret_validator_test.go | 1 + .../v1beta1/provider_schema_test.go | 1 + cmd/certcontroller.go | 1 + cmd/root.go | 1 + cmd/webhook.go | 1 + e2e/framework/addon/addon.go | 1 + e2e/framework/addon/chart.go | 1 + e2e/framework/addon/eso.go | 1 + e2e/framework/addon/eso_argocd_application.go | 1 + e2e/framework/addon/eso_flux_helm.go | 1 + e2e/framework/addon/helmserver.go | 1 + e2e/framework/addon/uninstall_eso_crds.go | 1 + e2e/framework/addon/vault.go | 3 +- e2e/framework/framework.go | 1 + e2e/framework/log/log.go | 1 + e2e/framework/testcase.go | 152 +++++++++++++----- e2e/framework/util/util.go | 1 + e2e/suites/argocd/argocd.go | 3 +- e2e/suites/argocd/install.go | 1 + e2e/suites/argocd/suite_test.go | 1 + e2e/suites/flux/flux.go | 3 +- e2e/suites/flux/install.go | 1 + e2e/suites/flux/suite_test.go | 1 + e2e/suites/generator/ecr.go | 1 + e2e/suites/generator/fake.go | 1 + e2e/suites/generator/password.go | 1 + e2e/suites/generator/suite_test.go | 1 + e2e/suites/generator/testcase.go | 1 + .../provider/cases/akeyless/akeyless.go | 2 +- e2e/suites/provider/cases/alibaba/alibaba.go | 2 +- e2e/suites/provider/cases/aws/common.go | 1 + .../aws/parameterstore/parameterstore.go | 2 +- .../parameterstore/parameterstore_managed.go | 4 +- .../aws/secretsmanager/secretsmanager.go | 2 +- .../secretsmanager/secretsmanager_managed.go | 4 +- e2e/suites/provider/cases/azure/azure_cert.go | 2 +- e2e/suites/provider/cases/azure/azure_key.go | 2 +- .../provider/cases/azure/azure_managed.go | 2 +- .../provider/cases/azure/azure_secret.go | 2 +- e2e/suites/provider/cases/delinea/delinea.go | 2 +- e2e/suites/provider/cases/fake/provider.go | 2 +- e2e/suites/provider/cases/gcp/gcp.go | 2 +- e2e/suites/provider/cases/gcp/gcp_managed.go | 4 +- e2e/suites/provider/cases/gitlab/gitlab.go | 2 +- e2e/suites/provider/cases/gitlab/provider.go | 3 +- e2e/suites/provider/cases/import.go | 1 + .../provider/cases/kubernetes/kubernetes.go | 2 +- .../provider/cases/kubernetes/provider.go | 1 + e2e/suites/provider/cases/oracle/oracle.go | 2 +- .../provider/cases/scaleway/scaleway.go | 5 +- .../provider/cases/template/provider.go | 1 + .../provider/cases/template/template.go | 139 ++++++++++++++-- e2e/suites/provider/cases/vault/provider.go | 1 + e2e/suites/provider/cases/vault/vault.go | 7 +- e2e/suites/provider/suite_test.go | 1 + main.go | 1 + pkg/cache/cache_test.go | 1 + pkg/constants/constants.go | 1 + pkg/controllers/crds/common_test.go | 1 + .../externalsecret_controller.go | 7 - .../externalsecret_controller_test.go | 1 + pkg/controllers/externalsecret/util.go | 3 +- pkg/controllers/externalsecret/util_test.go | 1 + pkg/controllers/secretstore/common.go | 1 + pkg/controllers/secretstore/common_test.go | 1 + .../webhookconfig/webhookconfig_test.go | 1 + pkg/feature/feature.go | 1 + pkg/provider/akeyless/akeyless_test.go | 1 + pkg/provider/akeyless/fake/fake.go | 1 + pkg/provider/akeyless/utils.go | 1 + pkg/provider/aws/auth/fake/assumeroler.go | 1 + pkg/provider/aws/auth/resolver.go | 1 + pkg/provider/aws/auth/resolver_test.go | 1 + pkg/provider/aws/auth/token_fetcher.go | 1 + pkg/provider/aws/auth/token_fetcher_test.go | 1 + pkg/provider/aws/parameterstore/fake/fake.go | 1 + .../aws/parameterstore/parameterstore.go | 1 + .../aws/parameterstore/parameterstore_test.go | 1 + pkg/provider/aws/util/errors_test.go | 1 + pkg/provider/aws/util/provider.go | 1 + pkg/provider/aws/util/validation.go | 1 + pkg/provider/azure/keyvault/fake/fake.go | 1 + pkg/provider/conjur/auth_jwt.go | 1 + pkg/provider/conjur/conjur_api.go | 1 + pkg/provider/conjur/provider.go | 3 +- pkg/provider/conjur/util/provider.go | 1 + pkg/provider/delinea/client.go | 1 + pkg/provider/delinea/client_test.go | 1 + pkg/provider/delinea/provider_test.go | 1 + pkg/provider/delinea/secret_api.go | 1 + pkg/provider/doppler/fake/fake.go | 1 + pkg/provider/fake/fake.go | 2 + pkg/provider/fake/fake_test.go | 1 + pkg/provider/gcp/secretmanager/auth.go | 1 + pkg/provider/gcp/secretmanager/client.go | 1 + pkg/provider/gcp/secretmanager/client_test.go | 1 + pkg/provider/gcp/secretmanager/fake/fake.go | 1 + pkg/provider/gcp/secretmanager/provider.go | 1 + pkg/provider/gcp/secretmanager/push_secret.go | 1 + .../gcp/secretmanager/workload_identity.go | 1 + .../secretmanager/workload_identity_test.go | 1 + pkg/provider/gitlab/fake/fake.go | 3 +- pkg/provider/gitlab/gitlab.go | 1 + pkg/provider/gitlab/gitlab_test.go | 1 + pkg/provider/gitlab/provider.go | 1 + pkg/provider/ibm/fake/fake.go | 1 + pkg/provider/ibm/provider.go | 1 + pkg/provider/ibm/provider_test.go | 1 + pkg/provider/keepersecurity/client.go | 1 + pkg/provider/keepersecurity/client_test.go | 1 + pkg/provider/keepersecurity/fake/fake.go | 1 + pkg/provider/keepersecurity/provider.go | 1 + pkg/provider/kubernetes/auth_test.go | 1 + pkg/provider/kubernetes/client_test.go | 1 + pkg/provider/kubernetes/provider_test.go | 1 + pkg/provider/kubernetes/validate.go | 1 + pkg/provider/kubernetes/validate_test.go | 1 + pkg/provider/onepassword/fake/fake.go | 1 + pkg/provider/onepassword/onepassword.go | 1 + pkg/provider/onepassword/onepassword_test.go | 3 +- pkg/provider/oracle/fake/fake.go | 1 + pkg/provider/oracle/oracle.go | 1 + pkg/provider/oracle/oracle_test.go | 1 + pkg/provider/oracle/serviceaccount.go | 1 + pkg/provider/scaleway/cache.go | 1 + pkg/provider/scaleway/cache_test.go | 1 + pkg/provider/scaleway/client.go | 1 + pkg/provider/scaleway/client_test.go | 1 + pkg/provider/scaleway/fake_secret_api_test.go | 1 + pkg/provider/scaleway/secret_api.go | 1 + pkg/provider/testing/fake/fake.go | 1 - pkg/provider/util/fake/token_fetcher.go | 1 + pkg/provider/util/locks/secret_locks.go | 1 + pkg/provider/util/locks/secret_locks_test.go | 1 + pkg/provider/vault/iamauth/iamauth_test.go | 1 + pkg/provider/webhook/webhook_test.go | 1 + .../certificatemanager/certificatemanager.go | 1 + .../certificatemanager_test.go | 1 + .../certificatemanagersecretgetter.go | 1 + .../certificatemanager/client/client.go | 1 + .../certificatemanager/client/fakeclient.go | 1 + .../certificatemanager/client/grpcclient.go | 1 + pkg/provider/yandex/common/clock/clock.go | 1 + pkg/provider/yandex/common/clock/fakeclock.go | 1 + pkg/provider/yandex/common/clock/realclock.go | 1 + pkg/provider/yandex/common/provider.go | 1 + pkg/provider/yandex/common/sdk.go | 1 + pkg/provider/yandex/common/secretgetter.go | 1 + pkg/provider/yandex/common/secretsclient.go | 1 + pkg/provider/yandex/common/secretsetter.go | 1 + pkg/provider/yandex/lockbox/client/client.go | 1 + .../yandex/lockbox/client/fakeclient.go | 1 + .../yandex/lockbox/client/grpcclient.go | 1 + pkg/provider/yandex/lockbox/lockbox.go | 1 + pkg/provider/yandex/lockbox/lockbox_test.go | 1 + .../yandex/lockbox/lockboxsecretgetter.go | 1 + pkg/template/engine.go | 1 + pkg/template/v1/template.go | 1 + pkg/template/v1/template_test.go | 1 + pkg/template/v2/jwk.go | 1 + pkg/template/v2/pem.go | 1 + pkg/template/v2/pem_chain.go | 1 + pkg/template/v2/pem_test.go | 1 + pkg/template/v2/pkcs12.go | 1 + pkg/template/v2/template.go | 1 + pkg/template/v2/template_test.go | 1 + pkg/template/v2/yaml.go | 1 + 168 files changed, 424 insertions(+), 89 deletions(-) diff --git a/apis/externalsecrets/v1beta1/externalsecret_validator.go b/apis/externalsecrets/v1beta1/externalsecret_validator.go index 19fdf699d..67c5c3366 100644 --- a/apis/externalsecrets/v1beta1/externalsecret_validator.go +++ b/apis/externalsecrets/v1beta1/externalsecret_validator.go @@ -11,6 +11,7 @@ WITHOUT 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 v1beta1 import ( diff --git a/apis/externalsecrets/v1beta1/externalsecret_validator_test.go b/apis/externalsecrets/v1beta1/externalsecret_validator_test.go index c6d6d2172..7d49e96d6 100644 --- a/apis/externalsecrets/v1beta1/externalsecret_validator_test.go +++ b/apis/externalsecrets/v1beta1/externalsecret_validator_test.go @@ -11,6 +11,7 @@ WITHOUT 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 v1beta1 import ( diff --git a/apis/externalsecrets/v1beta1/provider_schema_test.go b/apis/externalsecrets/v1beta1/provider_schema_test.go index a9ae79a90..a9d7710ff 100644 --- a/apis/externalsecrets/v1beta1/provider_schema_test.go +++ b/apis/externalsecrets/v1beta1/provider_schema_test.go @@ -11,6 +11,7 @@ WITHOUT 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 v1beta1 import ( diff --git a/cmd/certcontroller.go b/cmd/certcontroller.go index d670ccaeb..c87bd5f9f 100644 --- a/cmd/certcontroller.go +++ b/cmd/certcontroller.go @@ -13,6 +13,7 @@ WITHOUT 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 cmd import ( diff --git a/cmd/root.go b/cmd/root.go index fb690e465..bf575050b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -13,6 +13,7 @@ WITHOUT 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 cmd import ( diff --git a/cmd/webhook.go b/cmd/webhook.go index ac439f8ab..9f78baa3c 100644 --- a/cmd/webhook.go +++ b/cmd/webhook.go @@ -13,6 +13,7 @@ WITHOUT 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 cmd import ( diff --git a/e2e/framework/addon/addon.go b/e2e/framework/addon/addon.go index 01e716773..9dd4ae6d3 100644 --- a/e2e/framework/addon/addon.go +++ b/e2e/framework/addon/addon.go @@ -11,6 +11,7 @@ WITHOUT 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 addon import ( diff --git a/e2e/framework/addon/chart.go b/e2e/framework/addon/chart.go index 3450fa85e..c692b31d2 100644 --- a/e2e/framework/addon/chart.go +++ b/e2e/framework/addon/chart.go @@ -12,6 +12,7 @@ WITHOUT 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 addon import ( diff --git a/e2e/framework/addon/eso.go b/e2e/framework/addon/eso.go index 4b1b6610b..48e6fe836 100644 --- a/e2e/framework/addon/eso.go +++ b/e2e/framework/addon/eso.go @@ -11,6 +11,7 @@ WITHOUT 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 addon import ( diff --git a/e2e/framework/addon/eso_argocd_application.go b/e2e/framework/addon/eso_argocd_application.go index 285f19297..90ecf6beb 100644 --- a/e2e/framework/addon/eso_argocd_application.go +++ b/e2e/framework/addon/eso_argocd_application.go @@ -12,6 +12,7 @@ WITHOUT 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 addon import ( diff --git a/e2e/framework/addon/eso_flux_helm.go b/e2e/framework/addon/eso_flux_helm.go index 8ac8b05dd..2a2a602b1 100644 --- a/e2e/framework/addon/eso_flux_helm.go +++ b/e2e/framework/addon/eso_flux_helm.go @@ -10,6 +10,7 @@ WITHOUT 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 addon import ( diff --git a/e2e/framework/addon/helmserver.go b/e2e/framework/addon/helmserver.go index fae3ef8cd..8f77e8d4b 100644 --- a/e2e/framework/addon/helmserver.go +++ b/e2e/framework/addon/helmserver.go @@ -10,6 +10,7 @@ WITHOUT 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 addon import ( diff --git a/e2e/framework/addon/uninstall_eso_crds.go b/e2e/framework/addon/uninstall_eso_crds.go index d3b015a4a..03b4343c8 100644 --- a/e2e/framework/addon/uninstall_eso_crds.go +++ b/e2e/framework/addon/uninstall_eso_crds.go @@ -11,6 +11,7 @@ WITHOUT 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 addon import ( diff --git a/e2e/framework/addon/vault.go b/e2e/framework/addon/vault.go index e6126946c..a46984b89 100644 --- a/e2e/framework/addon/vault.go +++ b/e2e/framework/addon/vault.go @@ -11,6 +11,7 @@ WITHOUT 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 addon import ( @@ -33,7 +34,7 @@ import ( vault "github.com/hashicorp/vault/api" // nolint - ginkgo "github.com/onsi/ginkgo/v2" + "github.com/onsi/ginkgo/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/e2e/framework/framework.go b/e2e/framework/framework.go index df99cdc1a..47c9f8ec7 100644 --- a/e2e/framework/framework.go +++ b/e2e/framework/framework.go @@ -11,6 +11,7 @@ WITHOUT 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 framework import ( diff --git a/e2e/framework/log/log.go b/e2e/framework/log/log.go index 61c9f9712..62bb30172 100644 --- a/e2e/framework/log/log.go +++ b/e2e/framework/log/log.go @@ -11,6 +11,7 @@ WITHOUT 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 log import ( diff --git a/e2e/framework/testcase.go b/e2e/framework/testcase.go index a7eeaf4ca..6524c920d 100644 --- a/e2e/framework/testcase.go +++ b/e2e/framework/testcase.go @@ -11,6 +11,7 @@ WITHOUT 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 framework import ( @@ -31,13 +32,16 @@ var TargetSecretName = "target-secret" // TestCase contains the test infra to run a table driven test. type TestCase struct { - Framework *Framework - ExternalSecret *esv1beta1.ExternalSecret - ExternalSecretV1Alpha1 *esv1alpha1.ExternalSecret - AdditionalObjects []client.Object - Secrets map[string]SecretEntry - ExpectedSecret *v1.Secret - AfterSync func(SecretStoreProvider, *v1.Secret) + Framework *Framework + ExternalSecret *esv1beta1.ExternalSecret + ExternalSecretV1Alpha1 *esv1alpha1.ExternalSecret + PushSecret *esv1alpha1.PushSecret + PushSecretSource *v1.Secret + AdditionalObjects []client.Object + Secrets map[string]SecretEntry + ExpectedSecret *v1.Secret + AfterSync func(SecretStoreProvider, *v1.Secret) + VerifyPushSecretOutcome func(ps *esv1alpha1.PushSecret, pushClient esv1beta1.SecretsClient) } type SecretEntry struct { @@ -52,64 +56,114 @@ type SecretStoreProvider interface { DeleteSecret(key string) } -// TableFunc returns the main func that runs a TestCase in a table driven test. -func TableFunc(f *Framework, prov SecretStoreProvider) func(...func(*TestCase)) { +// TableFuncWithExternalSecret returns the main func that runs a TestCase in a table driven test. +func TableFuncWithExternalSecret(f *Framework, prov SecretStoreProvider) func(...func(*TestCase)) { return func(tweaks ...func(*TestCase)) { - var err error - // make default test case // and apply customization to it - tc := makeDefaultTestCase(f) + tc := makeDefaultExternalSecretTestCase(f) for _, tweak := range tweaks { tweak(tc) } // create secrets & defer delete + var deferRemoveKeys []string for k, v := range tc.Secrets { key := k prov.CreateSecret(key, v) - defer func() { - prov.DeleteSecret(key) - }() + deferRemoveKeys = append(deferRemoveKeys, key) } - // create v1alpha1 external secret, if provided - if tc.ExternalSecretV1Alpha1 != nil { - err = tc.Framework.CRClient.Create(context.Background(), tc.ExternalSecretV1Alpha1) - Expect(err).ToNot(HaveOccurred()) - } else if tc.ExternalSecret != nil { - // create v1beta1 external secret otherwise - err = tc.Framework.CRClient.Create(context.Background(), tc.ExternalSecret) - Expect(err).ToNot(HaveOccurred()) - } - if tc.AdditionalObjects != nil { - for _, obj := range tc.AdditionalObjects { - err = tc.Framework.CRClient.Create(context.Background(), obj) - Expect(err).ToNot(HaveOccurred()) + defer func() { + for _, k := range deferRemoveKeys { + prov.DeleteSecret(k) } - } + }() + + // create v1alpha1 external secret, if provided + createProvidedExternalSecret(tc) + + // create additional objects + generateAdditionalObjects(tc) + // in case target name is empty if tc.ExternalSecret != nil && tc.ExternalSecret.Spec.Target.Name == "" { TargetSecretName = tc.ExternalSecret.ObjectMeta.Name } // wait for Kind=Secret to have the expected data - if tc.ExpectedSecret != nil { - secret, err := tc.Framework.WaitForSecretValue(tc.Framework.Namespace.Name, TargetSecretName, tc.ExpectedSecret) - if err != nil { - f.printESDebugLogs(tc.ExternalSecret.Name, tc.ExternalSecret.Namespace) - log.Logf("Did not match. Expected: %+v, Got: %+v", tc.ExpectedSecret, secret) - } + executeAfterSync(tc, f, prov) + } +} +func executeAfterSync(tc *TestCase, f *Framework, prov SecretStoreProvider) { + if tc.ExpectedSecret != nil { + secret, err := tc.Framework.WaitForSecretValue(tc.Framework.Namespace.Name, TargetSecretName, tc.ExpectedSecret) + if err != nil { + f.printESDebugLogs(tc.ExternalSecret.Name, tc.ExternalSecret.Namespace) + log.Logf("Did not match. Expected: %+v, Got: %+v", tc.ExpectedSecret, secret) + } + + Expect(err).ToNot(HaveOccurred()) + tc.AfterSync(prov, secret) + } else { + tc.AfterSync(prov, nil) + } +} + +func generateAdditionalObjects(tc *TestCase) { + if tc.AdditionalObjects != nil { + for _, obj := range tc.AdditionalObjects { + err := tc.Framework.CRClient.Create(context.Background(), obj) Expect(err).ToNot(HaveOccurred()) - tc.AfterSync(prov, secret) - } else { - tc.AfterSync(prov, nil) } } } -func makeDefaultTestCase(f *Framework) *TestCase { +func createProvidedExternalSecret(tc *TestCase) { + if tc.ExternalSecretV1Alpha1 != nil { + err := tc.Framework.CRClient.Create(context.Background(), tc.ExternalSecretV1Alpha1) + Expect(err).ToNot(HaveOccurred()) + } else if tc.ExternalSecret != nil { + // create v1beta1 external secret otherwise + err := tc.Framework.CRClient.Create(context.Background(), tc.ExternalSecret) + Expect(err).ToNot(HaveOccurred()) + } +} + +// TableFuncWithPushSecret returns the main func that runs a TestCase in a table driven test for push secrets. +func TableFuncWithPushSecret(f *Framework, prov SecretStoreProvider, pushClient esv1beta1.SecretsClient) func(...func(*TestCase)) { + return func(tweaks ...func(*TestCase)) { + var err error + + // make default test case + // and apply customization to it + tc := makeDefaultPushSecretTestCase(f) + for _, tweak := range tweaks { + tweak(tc) + } + + if tc.PushSecretSource != nil { + err := tc.Framework.CRClient.Create(context.Background(), tc.PushSecretSource) + Expect(err).ToNot(HaveOccurred()) + } + + // create v1alpha1 push secret, if provided + if tc.PushSecret != nil { + // create v1beta1 external secret otherwise + err = tc.Framework.CRClient.Create(context.Background(), tc.PushSecret) + Expect(err).ToNot(HaveOccurred()) + } + + // additional objects + generateAdditionalObjects(tc) + + // Run verification on the secret that push secret created or not. + tc.VerifyPushSecretOutcome(tc.PushSecret, pushClient) + } +} + +func makeDefaultExternalSecretTestCase(f *Framework) *TestCase { return &TestCase{ AfterSync: func(ssp SecretStoreProvider, s *v1.Secret) {}, Framework: f, @@ -130,3 +184,23 @@ func makeDefaultTestCase(f *Framework) *TestCase { }, } } + +func makeDefaultPushSecretTestCase(f *Framework) *TestCase { + return &TestCase{ + Framework: f, + PushSecret: &esv1alpha1.PushSecret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "e2e-ps", + Namespace: f.Namespace.Name, + }, + Spec: esv1alpha1.PushSecretSpec{ + RefreshInterval: &metav1.Duration{Duration: time.Second * 5}, + SecretStoreRefs: []esv1alpha1.PushSecretStoreRef{ + { + Name: f.Namespace.Name, + }, + }, + }, + }, + } +} diff --git a/e2e/framework/util/util.go b/e2e/framework/util/util.go index 9b0a67840..0fc90d378 100644 --- a/e2e/framework/util/util.go +++ b/e2e/framework/util/util.go @@ -11,6 +11,7 @@ WITHOUT 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 util import ( diff --git a/e2e/suites/argocd/argocd.go b/e2e/suites/argocd/argocd.go index d9db6792d..996c3f04b 100644 --- a/e2e/suites/argocd/argocd.go +++ b/e2e/suites/argocd/argocd.go @@ -12,6 +12,7 @@ WITHOUT 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 argocd import ( @@ -28,7 +29,7 @@ var _ = Describe("argocd", Label("argocd"), func() { f := framework.New("argocd") prov := fake.NewProvider(f) - DescribeTable("sync secrets", framework.TableFunc(f, prov), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), Entry(common.SimpleDataSync(f)), Entry(common.JSONDataFromSync(f)), Entry(common.SSHKeySync(f)), diff --git a/e2e/suites/argocd/install.go b/e2e/suites/argocd/install.go index ef4b31658..8a6298ca7 100644 --- a/e2e/suites/argocd/install.go +++ b/e2e/suites/argocd/install.go @@ -12,6 +12,7 @@ WITHOUT 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 argocd import ( diff --git a/e2e/suites/argocd/suite_test.go b/e2e/suites/argocd/suite_test.go index f4bcf0f17..c1f6e91f9 100644 --- a/e2e/suites/argocd/suite_test.go +++ b/e2e/suites/argocd/suite_test.go @@ -11,6 +11,7 @@ WITHOUT 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 argocd import ( diff --git a/e2e/suites/flux/flux.go b/e2e/suites/flux/flux.go index 82302384c..e11062656 100644 --- a/e2e/suites/flux/flux.go +++ b/e2e/suites/flux/flux.go @@ -12,6 +12,7 @@ WITHOUT 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 flux import ( @@ -28,7 +29,7 @@ var _ = Describe("flux", Label("flux"), func() { f := framework.New("flux") prov := fake.NewProvider(f) - DescribeTable("sync secrets", framework.TableFunc(f, prov), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), Entry(common.SimpleDataSync(f)), Entry(common.JSONDataFromSync(f)), Entry(common.SSHKeySync(f)), diff --git a/e2e/suites/flux/install.go b/e2e/suites/flux/install.go index 9004d4d3f..222b24072 100644 --- a/e2e/suites/flux/install.go +++ b/e2e/suites/flux/install.go @@ -12,6 +12,7 @@ WITHOUT 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 flux import ( diff --git a/e2e/suites/flux/suite_test.go b/e2e/suites/flux/suite_test.go index 8b43ada6e..469a6aa88 100644 --- a/e2e/suites/flux/suite_test.go +++ b/e2e/suites/flux/suite_test.go @@ -11,6 +11,7 @@ WITHOUT 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 flux import ( diff --git a/e2e/suites/generator/ecr.go b/e2e/suites/generator/ecr.go index 92debfcd0..177ea1f6a 100644 --- a/e2e/suites/generator/ecr.go +++ b/e2e/suites/generator/ecr.go @@ -12,6 +12,7 @@ WITHOUT 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 generator import ( diff --git a/e2e/suites/generator/fake.go b/e2e/suites/generator/fake.go index 86f521eaf..6af40f877 100644 --- a/e2e/suites/generator/fake.go +++ b/e2e/suites/generator/fake.go @@ -12,6 +12,7 @@ WITHOUT 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 generator import ( diff --git a/e2e/suites/generator/password.go b/e2e/suites/generator/password.go index d0857b824..3bad42ae1 100644 --- a/e2e/suites/generator/password.go +++ b/e2e/suites/generator/password.go @@ -12,6 +12,7 @@ WITHOUT 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 generator import ( diff --git a/e2e/suites/generator/suite_test.go b/e2e/suites/generator/suite_test.go index 124f9d128..64f5f357f 100644 --- a/e2e/suites/generator/suite_test.go +++ b/e2e/suites/generator/suite_test.go @@ -11,6 +11,7 @@ WITHOUT 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 generator import ( diff --git a/e2e/suites/generator/testcase.go b/e2e/suites/generator/testcase.go index 34db3b5ea..0938bc2b3 100644 --- a/e2e/suites/generator/testcase.go +++ b/e2e/suites/generator/testcase.go @@ -12,6 +12,7 @@ WITHOUT 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 generator import ( diff --git a/e2e/suites/provider/cases/akeyless/akeyless.go b/e2e/suites/provider/cases/akeyless/akeyless.go index 5cb9960b7..78ba27729 100644 --- a/e2e/suites/provider/cases/akeyless/akeyless.go +++ b/e2e/suites/provider/cases/akeyless/akeyless.go @@ -27,7 +27,7 @@ var _ = Describe("[akeyless]", Label("akeyless"), func() { f := framework.New("eso-akeyless") prov := newFromEnv(f) - DescribeTable("sync secrets", framework.TableFunc(f, prov), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), Entry(common.SimpleDataSync(f)), Entry(common.NestedJSONWithGJSON(f)), Entry(common.JSONDataFromSync(f)), diff --git a/e2e/suites/provider/cases/alibaba/alibaba.go b/e2e/suites/provider/cases/alibaba/alibaba.go index 5213a7f13..1bcae97a2 100644 --- a/e2e/suites/provider/cases/alibaba/alibaba.go +++ b/e2e/suites/provider/cases/alibaba/alibaba.go @@ -27,7 +27,7 @@ var _ = Describe("[alibaba]", Label("alibaba"), func() { f := framework.New("eso-alibaba") prov := newFromEnv(f) - DescribeTable("sync secrets", framework.TableFunc(f, prov), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), Entry(common.SimpleDataSync(f)), Entry(common.NestedJSONWithGJSON(f)), Entry(common.JSONDataFromSync(f)), diff --git a/e2e/suites/provider/cases/aws/common.go b/e2e/suites/provider/cases/aws/common.go index 11153ba6d..04459715a 100644 --- a/e2e/suites/provider/cases/aws/common.go +++ b/e2e/suites/provider/cases/aws/common.go @@ -11,6 +11,7 @@ WITHOUT 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/e2e/suites/provider/cases/aws/parameterstore/parameterstore.go b/e2e/suites/provider/cases/aws/parameterstore/parameterstore.go index 192631623..872ff0727 100644 --- a/e2e/suites/provider/cases/aws/parameterstore/parameterstore.go +++ b/e2e/suites/provider/cases/aws/parameterstore/parameterstore.go @@ -35,7 +35,7 @@ var _ = Describe("[aws] ", Label("aws", "parameterstore"), func() { prov := NewFromEnv(f) DescribeTable("sync secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), framework.Compose(withStaticAuth, f, common.SimpleDataSync, useStaticAuth), framework.Compose(withStaticAuth, f, common.NestedJSONWithGJSON, useStaticAuth), diff --git a/e2e/suites/provider/cases/aws/parameterstore/parameterstore_managed.go b/e2e/suites/provider/cases/aws/parameterstore/parameterstore_managed.go index bd9c6c606..d400c1a56 100644 --- a/e2e/suites/provider/cases/aws/parameterstore/parameterstore_managed.go +++ b/e2e/suites/provider/cases/aws/parameterstore/parameterstore_managed.go @@ -34,7 +34,7 @@ var _ = Describe("[awsmanaged] IRSA via referenced service account", Label("aws" // nolint DescribeTable("sync secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), framework.Compose(awscommon.WithReferencedIRSA, f, common.SimpleDataSync, awscommon.UseClusterSecretStore), framework.Compose(awscommon.WithReferencedIRSA, f, common.NestedJSONWithGJSON, awscommon.UseClusterSecretStore), @@ -74,7 +74,7 @@ var _ = Describe("[awsmanaged] with mounted IRSA", Label("aws", "parameterstore" // nolint DescribeTable("sync secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), framework.Compose(awscommon.WithMountedIRSA, f, common.SimpleDataSync, awscommon.UseMountedIRSAStore), framework.Compose(awscommon.WithMountedIRSA, f, common.NestedJSONWithGJSON, awscommon.UseMountedIRSAStore), diff --git a/e2e/suites/provider/cases/aws/secretsmanager/secretsmanager.go b/e2e/suites/provider/cases/aws/secretsmanager/secretsmanager.go index 1325bd992..67930ba06 100644 --- a/e2e/suites/provider/cases/aws/secretsmanager/secretsmanager.go +++ b/e2e/suites/provider/cases/aws/secretsmanager/secretsmanager.go @@ -37,7 +37,7 @@ var _ = Describe("[aws] ", Label("aws", "secretsmanager"), func() { prov := NewFromEnv(f) DescribeTable("sync secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), framework.Compose(withStaticAuth, f, common.SimpleDataSync, useStaticAuth), framework.Compose(withStaticAuth, f, common.NestedJSONWithGJSON, useStaticAuth), diff --git a/e2e/suites/provider/cases/aws/secretsmanager/secretsmanager_managed.go b/e2e/suites/provider/cases/aws/secretsmanager/secretsmanager_managed.go index 8182e39ef..530b70e9a 100644 --- a/e2e/suites/provider/cases/aws/secretsmanager/secretsmanager_managed.go +++ b/e2e/suites/provider/cases/aws/secretsmanager/secretsmanager_managed.go @@ -34,7 +34,7 @@ var _ = Describe("[awsmanaged] IRSA via referenced service account", Label("aws" // nolint DescribeTable("sync secretsmanager secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), framework.Compose(awscommon.WithReferencedIRSA, f, common.SimpleDataSync, awscommon.UseClusterSecretStore), framework.Compose(awscommon.WithReferencedIRSA, f, common.NestedJSONWithGJSON, awscommon.UseClusterSecretStore), @@ -74,7 +74,7 @@ var _ = Describe("[awsmanaged] with mounted IRSA", Label("aws", "secretsmanager" // nolint DescribeTable("sync secretsmanager secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), framework.Compose(awscommon.WithMountedIRSA, f, common.SimpleDataSync, awscommon.UseMountedIRSAStore), framework.Compose(awscommon.WithMountedIRSA, f, common.NestedJSONWithGJSON, awscommon.UseMountedIRSAStore), diff --git a/e2e/suites/provider/cases/azure/azure_cert.go b/e2e/suites/provider/cases/azure/azure_cert.go index c8a0e2087..40545c409 100644 --- a/e2e/suites/provider/cases/azure/azure_cert.go +++ b/e2e/suites/provider/cases/azure/azure_cert.go @@ -41,7 +41,7 @@ var _ = Describe("[azure]", Label("azure", "keyvault", "cert"), func() { prov.DeleteCertificate(certName) }) - ff := framework.TableFunc(f, prov) + ff := framework.TableFuncWithExternalSecret(f, prov) It("should sync keyvault objects with type=cert", func() { ff(func(tc *framework.TestCase) { secretKey := "azkv-cert" diff --git a/e2e/suites/provider/cases/azure/azure_key.go b/e2e/suites/provider/cases/azure/azure_key.go index 9fa3225fd..70283dce8 100644 --- a/e2e/suites/provider/cases/azure/azure_key.go +++ b/e2e/suites/provider/cases/azure/azure_key.go @@ -42,7 +42,7 @@ var _ = Describe("[azure]", Label("azure", "keyvault", "key"), func() { prov.DeleteKey(keyName) }) - ff := framework.TableFunc(f, prov) + ff := framework.TableFuncWithExternalSecret(f, prov) It("should sync keyvault objects with type=key", func() { ff(func(tc *framework.TestCase) { diff --git a/e2e/suites/provider/cases/azure/azure_managed.go b/e2e/suites/provider/cases/azure/azure_managed.go index 4608a2f4d..9f72e58e5 100644 --- a/e2e/suites/provider/cases/azure/azure_managed.go +++ b/e2e/suites/provider/cases/azure/azure_managed.go @@ -49,7 +49,7 @@ var _ = Describe("[azuremanaged] with pod identity", Label("azure", "keyvault", }) DescribeTable("sync secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), // uses pod id framework.Compose(withPodID, f, common.SimpleDataSync, usePodIDESReference), diff --git a/e2e/suites/provider/cases/azure/azure_secret.go b/e2e/suites/provider/cases/azure/azure_secret.go index e4e5e044e..52eb1dea8 100644 --- a/e2e/suites/provider/cases/azure/azure_secret.go +++ b/e2e/suites/provider/cases/azure/azure_secret.go @@ -32,7 +32,7 @@ var _ = Describe("[azure]", Label("azure", "keyvault", "secret"), func() { f := framework.New("eso-azure") prov := newFromEnv(f) - DescribeTable("sync secrets", framework.TableFunc(f, prov), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), framework.Compose(withStaticCredentials, f, common.SimpleDataSync, useStaticCredentials), framework.Compose(withStaticCredentials, f, common.NestedJSONWithGJSON, useStaticCredentials), framework.Compose(withStaticCredentials, f, common.JSONDataFromSync, useStaticCredentials), diff --git a/e2e/suites/provider/cases/delinea/delinea.go b/e2e/suites/provider/cases/delinea/delinea.go index 93d22c4a1..3ec4d497d 100644 --- a/e2e/suites/provider/cases/delinea/delinea.go +++ b/e2e/suites/provider/cases/delinea/delinea.go @@ -30,7 +30,7 @@ var _ = ginkgo.Describe("[delinea]", ginkgo.Label("delinea"), func() { createResources(context.Background(), f, cfg) }) - ginkgo.DescribeTable("sync secrets", framework.TableFunc(f, provider), + ginkgo.DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, provider), ginkgo.Entry(common.JSONDataWithProperty(f)), ginkgo.Entry(common.JSONDataWithoutTargetName(f)), diff --git a/e2e/suites/provider/cases/fake/provider.go b/e2e/suites/provider/cases/fake/provider.go index d8bba0788..5932bfa6c 100644 --- a/e2e/suites/provider/cases/fake/provider.go +++ b/e2e/suites/provider/cases/fake/provider.go @@ -11,12 +11,12 @@ WITHOUT 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 fake import ( "context" "encoding/json" - // nolint . "github.com/onsi/ginkgo/v2" diff --git a/e2e/suites/provider/cases/gcp/gcp.go b/e2e/suites/provider/cases/gcp/gcp.go index ed8450ea8..852a73ed4 100644 --- a/e2e/suites/provider/cases/gcp/gcp.go +++ b/e2e/suites/provider/cases/gcp/gcp.go @@ -39,7 +39,7 @@ var _ = Describe("[gcp]", Label("gcp", "secretsmanager"), func() { f := framework.New("eso-gcp") prov := NewFromEnv(f, "") - DescribeTable("sync secrets", framework.TableFunc(f, prov), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), framework.Compose(withStaticAuth, f, common.SimpleDataSync, useStaticAuth), framework.Compose(withStaticAuth, f, common.JSONDataWithProperty, useStaticAuth), framework.Compose(withStaticAuth, f, common.JSONDataFromSync, useStaticAuth), diff --git a/e2e/suites/provider/cases/gcp/gcp_managed.go b/e2e/suites/provider/cases/gcp/gcp_managed.go index b4a7c84bb..c2b44d6f8 100644 --- a/e2e/suites/provider/cases/gcp/gcp_managed.go +++ b/e2e/suites/provider/cases/gcp/gcp_managed.go @@ -50,7 +50,7 @@ var _ = Describe("[gcpmanaged] with pod identity", Label("gcp", "secretsmanager" }) DescribeTable("sync secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), // uses pod id framework.Compose(withPodID, f, common.SimpleDataSync, usePodIDESReference), @@ -86,7 +86,7 @@ var _ = Describe("[gcpmanaged] with service account", Label("gcp", "secretsmanag }) DescribeTable("sync secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), // uses specific sa framework.Compose(withSpecifcSA, f, common.JSONDataFromSync, useSpecifcSAESReference(prov)), diff --git a/e2e/suites/provider/cases/gitlab/gitlab.go b/e2e/suites/provider/cases/gitlab/gitlab.go index f4f79d161..56133f6ee 100644 --- a/e2e/suites/provider/cases/gitlab/gitlab.go +++ b/e2e/suites/provider/cases/gitlab/gitlab.go @@ -30,7 +30,7 @@ var _ = Describe("[gitlab]", Label("gitlab"), func() { f := framework.New("eso-gitlab") prov := newFromEnv(f) - DescribeTable("sync secrets", framework.TableFunc(f, prov), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), Entry(common.SimpleDataSync(f)), Entry(common.JSONDataWithProperty(f)), Entry(common.JSONDataFromSync(f)), diff --git a/e2e/suites/provider/cases/gitlab/provider.go b/e2e/suites/provider/cases/gitlab/provider.go index 41b89e11c..094703f85 100644 --- a/e2e/suites/provider/cases/gitlab/provider.go +++ b/e2e/suites/provider/cases/gitlab/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 gitlab import ( @@ -23,7 +24,7 @@ import ( // nolint . "github.com/onsi/gomega" - gitlab "github.com/xanzy/go-gitlab" + "github.com/xanzy/go-gitlab" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/e2e/suites/provider/cases/import.go b/e2e/suites/provider/cases/import.go index 8a88f7de3..d152e7358 100644 --- a/e2e/suites/provider/cases/import.go +++ b/e2e/suites/provider/cases/import.go @@ -11,6 +11,7 @@ WITHOUT 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 suite import ( diff --git a/e2e/suites/provider/cases/kubernetes/kubernetes.go b/e2e/suites/provider/cases/kubernetes/kubernetes.go index c88279f1a..f18673d09 100644 --- a/e2e/suites/provider/cases/kubernetes/kubernetes.go +++ b/e2e/suites/provider/cases/kubernetes/kubernetes.go @@ -33,7 +33,7 @@ var _ = Describe("[kubernetes] ", Label("kubernetes"), func() { prov := NewProvider(f) DescribeTable("sync secrets", - framework.TableFunc(f, + framework.TableFuncWithExternalSecret(f, prov), Entry(common.JSONDataWithProperty(f)), Entry(common.JSONDataWithoutTargetName(f)), diff --git a/e2e/suites/provider/cases/kubernetes/provider.go b/e2e/suites/provider/cases/kubernetes/provider.go index 330576db6..dee95659a 100644 --- a/e2e/suites/provider/cases/kubernetes/provider.go +++ b/e2e/suites/provider/cases/kubernetes/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 kubernetes import ( diff --git a/e2e/suites/provider/cases/oracle/oracle.go b/e2e/suites/provider/cases/oracle/oracle.go index 92bab1ad6..6c3aef5c1 100644 --- a/e2e/suites/provider/cases/oracle/oracle.go +++ b/e2e/suites/provider/cases/oracle/oracle.go @@ -25,7 +25,7 @@ var _ = Describe("[oracle]", Label("oracle"), func() { f := framework.New("eso-oracle") prov := newFromEnv(f) - DescribeTable("sync secrets", framework.TableFunc(f, prov), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), Entry(common.SimpleDataSync(f)), Entry(common.NestedJSONWithGJSON(f)), Entry(common.JSONDataFromSync(f)), diff --git a/e2e/suites/provider/cases/scaleway/scaleway.go b/e2e/suites/provider/cases/scaleway/scaleway.go index d1be5deb1..54b5bdf6e 100644 --- a/e2e/suites/provider/cases/scaleway/scaleway.go +++ b/e2e/suites/provider/cases/scaleway/scaleway.go @@ -2,6 +2,8 @@ package scaleway import ( "context" + "sync" + "github.com/external-secrets/external-secrets-e2e/framework" "github.com/external-secrets/external-secrets-e2e/suites/provider/cases/common" esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1" @@ -10,7 +12,6 @@ import ( "github.com/onsi/gomega" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sync" ) var cleanupOnce sync.Once @@ -37,7 +38,7 @@ var _ = ginkgo.Describe("[scaleway]", ginkgo.Label("scaleway"), func() { createResources(context.Background(), f, cfg) }) - ginkgo.DescribeTable("sync secrets", framework.TableFunc(f, provider), + ginkgo.DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, provider), //ginkgo.Entry(common.SyncV1Alpha1(f)), // not supported ginkgo.Entry(common.SimpleDataSync(f)), diff --git a/e2e/suites/provider/cases/template/provider.go b/e2e/suites/provider/cases/template/provider.go index 570fd4919..299139b06 100644 --- a/e2e/suites/provider/cases/template/provider.go +++ b/e2e/suites/provider/cases/template/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 template import ( diff --git a/e2e/suites/provider/cases/template/template.go b/e2e/suites/provider/cases/template/template.go index ba2e3107a..3c60ec459 100644 --- a/e2e/suites/provider/cases/template/template.go +++ b/e2e/suites/provider/cases/template/template.go @@ -10,25 +10,41 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. limitations under the License. */ + package template import ( + "context" + "fmt" + "time" + + "github.com/external-secrets/external-secrets-e2e/framework" + esv1alpha1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1alpha1" + esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1" + "github.com/external-secrets/external-secrets/pkg/provider/testing/fake" + "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" // nolint . "github.com/onsi/ginkgo/v2" - v1 "k8s.io/api/core/v1" - - "github.com/external-secrets/external-secrets-e2e/framework" - esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1" ) var _ = Describe("[template]", Label("template"), func() { - f := framework.New("eso-template") + f := framework.New("templating") prov := newProvider(f) + fakeSecretClient := fake.New() - DescribeTable("sync secrets", framework.TableFunc(f, prov), - framework.Compose("template v1", f, genericTemplate, useTemplateV1), - framework.Compose("template v2", f, genericTemplate, useTemplateV2), + DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, prov), + framework.Compose("template v1", f, genericExternalSecretTemplate, useTemplateV1), + framework.Compose("template v2", f, genericExternalSecretTemplate, useTemplateV2), + ) + + DescribeTable("push secret", framework.TableFuncWithPushSecret(f, prov, fakeSecretClient), + framework.Compose("template", f, genericPushSecretTemplate, useTemplateWithPushSecret), ) }) @@ -67,7 +83,7 @@ func useTemplateV2(tc *framework.TestCase) { } // This case uses template engine v1. -func genericTemplate(f *framework.Framework) (string, func(*framework.TestCase)) { +func genericExternalSecretTemplate(f *framework.Framework) (string, func(*framework.TestCase)) { return "[template] should execute template v1", func(tc *framework.TestCase) { tc.ExpectedSecret = &v1.Secret{ Type: v1.SecretTypeOpaque, @@ -101,3 +117,108 @@ func genericTemplate(f *framework.Framework) (string, func(*framework.TestCase)) } } } + +// This case uses template engine v1. +func genericPushSecretTemplate(f *framework.Framework) (string, func(*framework.TestCase)) { + return "[template] should execute template v1", func(tc *framework.TestCase) { + secretKey1 := fmt.Sprintf("%s-%s", f.Namespace.Name, "one") + tc.PushSecretSource = &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: secretKey1, + Namespace: f.Namespace.Name, + }, + Data: map[string][]byte{ + "singlefoo": []byte("bar"), + }, + Type: v1.SecretTypeOpaque, + } + tc.PushSecret.Spec.Selector = esv1alpha1.PushSecretSelector{ + Secret: esv1alpha1.PushSecretSecret{ + Name: secretKey1, + }, + } + tc.PushSecret.Spec.Data = []esv1alpha1.PushSecretData{ + { + Match: esv1alpha1.PushSecretMatch{ + SecretKey: "singlefoo", + RemoteRef: esv1alpha1.PushSecretRemoteRef{ + RemoteKey: "key", + Property: "singlefoo", + }, + }, + }, + } + tc.VerifyPushSecretOutcome = func(sourcePs *esv1alpha1.PushSecret, pushClient esv1beta1.SecretsClient) { + gomega.Eventually(func() bool { + s := &esv1alpha1.PushSecret{} + err := tc.Framework.CRClient.Get(context.Background(), types.NamespacedName{Name: tc.PushSecret.Name, Namespace: tc.PushSecret.Namespace}, s) + gomega.Expect(err).ToNot(gomega.HaveOccurred()) + for i := range s.Status.Conditions { + c := s.Status.Conditions[i] + if c.Type == esv1alpha1.PushSecretReady && c.Status == v1.ConditionTrue { + return true + } + } + + return false + }, time.Minute*1, time.Second*5).Should(gomega.BeTrue()) + + // create an external secret that fetches the created remote secret + // and check the value + exampleOutput := "example-output" + es := &esv1beta1.ExternalSecret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "e2e-es", + Namespace: f.Namespace.Name, + }, + Spec: esv1beta1.ExternalSecretSpec{ + RefreshInterval: &metav1.Duration{Duration: time.Second * 5}, + SecretStoreRef: esv1beta1.SecretStoreRef{ + Name: f.Namespace.Name, + }, + Target: esv1beta1.ExternalSecretTarget{ + Name: exampleOutput, + }, + Data: []esv1beta1.ExternalSecretData{ + { + SecretKey: exampleOutput, + RemoteRef: esv1beta1.ExternalSecretDataRemoteRef{ + Key: "key", + }, + }, + }, + }, + } + + err := tc.Framework.CRClient.Create(context.Background(), es) + gomega.Expect(err).ToNot(gomega.HaveOccurred()) + + outputSecret := &v1.Secret{} + err = wait.PollImmediate(time.Second*5, time.Second*15, func() (bool, error) { + err := f.CRClient.Get(context.Background(), types.NamespacedName{ + Namespace: f.Namespace.Name, + Name: exampleOutput, + }, outputSecret) + if apierrors.IsNotFound(err) { + return false, nil + } + return true, nil + }) + gomega.Expect(err).ToNot(gomega.HaveOccurred()) + + v, ok := outputSecret.Data[exampleOutput] + gomega.Expect(ok).To(gomega.BeTrue()) + gomega.Expect(string(v)).To(gomega.Equal("executed: BAR")) + } + } +} + +// useTemplateWithPushSecret specifies a test case which uses the template engine v1. +func useTemplateWithPushSecret(tc *framework.TestCase) { + tc.PushSecret.Spec.Template = &esv1beta1.ExternalSecretTemplate{ + EngineVersion: esv1beta1.TemplateEngineV2, + Data: map[string]string{ + "singlefoo": "executed: {{ .singlefoo | upper }}", + }, + } +} diff --git a/e2e/suites/provider/cases/vault/provider.go b/e2e/suites/provider/cases/vault/provider.go index 66f173743..5006e24d8 100644 --- a/e2e/suites/provider/cases/vault/provider.go +++ b/e2e/suites/provider/cases/vault/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 vault import ( diff --git a/e2e/suites/provider/cases/vault/vault.go b/e2e/suites/provider/cases/vault/vault.go index 22f2e97bb..453167e7e 100644 --- a/e2e/suites/provider/cases/vault/vault.go +++ b/e2e/suites/provider/cases/vault/vault.go @@ -15,10 +15,11 @@ package vault import ( "context" "fmt" + "time" + apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" - "time" // nolint . "github.com/onsi/ginkgo/v2" @@ -48,7 +49,7 @@ var _ = Describe("[vault]", Label("vault"), func() { prov := newVaultProvider(f) DescribeTable("sync secrets", - framework.TableFunc(f, prov), + framework.TableFuncWithExternalSecret(f, prov), // uses token auth framework.Compose(withTokenAuth, f, common.FindByName, useTokenAuth), framework.Compose(withTokenAuth, f, common.FindByNameAndRewrite, useTokenAuth), @@ -127,7 +128,7 @@ var _ = Describe("[vault] with mTLS", Label("vault", "vault-mtls"), func() { prov := newVaultProvider(f) DescribeTable("sync secrets", - framework.TableFunc(f, prov), + framework.TableFuncWithExternalSecret(f, prov), // uses token auth framework.Compose(withTokenAuthAndMTLS, f, common.FindByName, useMTLSAndTokenAuth), // use referent auth diff --git a/e2e/suites/provider/suite_test.go b/e2e/suites/provider/suite_test.go index 1368f013a..55c677c90 100644 --- a/e2e/suites/provider/suite_test.go +++ b/e2e/suites/provider/suite_test.go @@ -11,6 +11,7 @@ WITHOUT 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/main.go b/main.go index 57b57ebed..cf110eece 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,7 @@ WITHOUT 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 "github.com/external-secrets/external-secrets/cmd" diff --git a/pkg/cache/cache_test.go b/pkg/cache/cache_test.go index 7215020e8..bdebf1014 100644 --- a/pkg/cache/cache_test.go +++ b/pkg/cache/cache_test.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/constants/constants.go b/pkg/constants/constants.go index 028b77c2f..56b50d4a9 100644 --- a/pkg/constants/constants.go +++ b/pkg/constants/constants.go @@ -11,6 +11,7 @@ WITHOUT 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 constants const ( diff --git a/pkg/controllers/crds/common_test.go b/pkg/controllers/crds/common_test.go index 3ee137d96..7e893cac4 100644 --- a/pkg/controllers/crds/common_test.go +++ b/pkg/controllers/crds/common_test.go @@ -11,6 +11,7 @@ WITHOUT 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 crds import ( diff --git a/pkg/controllers/externalsecret/externalsecret_controller.go b/pkg/controllers/externalsecret/externalsecret_controller.go index b066b2f00..ba2641382 100644 --- a/pkg/controllers/externalsecret/externalsecret_controller.go +++ b/pkg/controllers/externalsecret/externalsecret_controller.go @@ -58,12 +58,7 @@ const ( errInvalidKeys = "secret keys from spec.dataFrom.%v[%d] can only have alphanumeric,'-', '_' or '.' characters. Convert them using rewrite (https://external-secrets.io/latest/guides-datafrom-rewrite)" errUpdateSecret = "could not update Secret" errPatchStatus = "unable to patch status" - errStoreRef = "could not get store reference" - errStoreUsability = "could not use store reference" - errStoreProvider = "could not get store provider" - errStoreClient = "could not get provider client" errGetExistingSecret = "could not get existing secret: %w" - errCloseStoreClient = "could not close provider client" errSetCtrlReference = "could not set ExternalSecret controller reference: %w" errFetchTplFrom = "error fetching templateFrom data: %w" errGetSecretData = "could not get secret data from provider" @@ -75,8 +70,6 @@ const ( errPolicyMergeGetSecret = "unable to get secret %s: %w" errPolicyMergeMutate = "unable to mutate secret %s: %w" errPolicyMergePatch = "unable to patch secret %s: %w" - errTplCMMissingKey = "error in configmap %s: missing key %s" - errTplSecMissingKey = "error in secret %s: missing key %s" ) // Reconciler reconciles a ExternalSecret object. diff --git a/pkg/controllers/externalsecret/externalsecret_controller_test.go b/pkg/controllers/externalsecret/externalsecret_controller_test.go index 5854eff37..04e034c17 100644 --- a/pkg/controllers/externalsecret/externalsecret_controller_test.go +++ b/pkg/controllers/externalsecret/externalsecret_controller_test.go @@ -11,6 +11,7 @@ WITHOUT 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 externalsecret import ( diff --git a/pkg/controllers/externalsecret/util.go b/pkg/controllers/externalsecret/util.go index 3e91a262b..eaa800d12 100644 --- a/pkg/controllers/externalsecret/util.go +++ b/pkg/controllers/externalsecret/util.go @@ -11,6 +11,7 @@ WITHOUT 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 externalsecret import ( @@ -18,7 +19,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1" - esmetrics "github.com/external-secrets/external-secrets/pkg/controllers/externalsecret/esmetrics" + "github.com/external-secrets/external-secrets/pkg/controllers/externalsecret/esmetrics" ) // NewExternalSecretCondition a set of default options for creating an External Secret Condition. diff --git a/pkg/controllers/externalsecret/util_test.go b/pkg/controllers/externalsecret/util_test.go index 27c58a953..4e0355fee 100644 --- a/pkg/controllers/externalsecret/util_test.go +++ b/pkg/controllers/externalsecret/util_test.go @@ -11,6 +11,7 @@ WITHOUT 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 externalsecret import ( diff --git a/pkg/controllers/secretstore/common.go b/pkg/controllers/secretstore/common.go index 58436a4ce..53f74c739 100644 --- a/pkg/controllers/secretstore/common.go +++ b/pkg/controllers/secretstore/common.go @@ -11,6 +11,7 @@ WITHOUT 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 secretstore import ( diff --git a/pkg/controllers/secretstore/common_test.go b/pkg/controllers/secretstore/common_test.go index 75bd79c17..7f3260b72 100644 --- a/pkg/controllers/secretstore/common_test.go +++ b/pkg/controllers/secretstore/common_test.go @@ -11,6 +11,7 @@ WITHOUT 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 secretstore import ( diff --git a/pkg/controllers/webhookconfig/webhookconfig_test.go b/pkg/controllers/webhookconfig/webhookconfig_test.go index d2ce8be3f..b01810c5e 100644 --- a/pkg/controllers/webhookconfig/webhookconfig_test.go +++ b/pkg/controllers/webhookconfig/webhookconfig_test.go @@ -11,6 +11,7 @@ WITHOUT 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 webhookconfig import ( diff --git a/pkg/feature/feature.go b/pkg/feature/feature.go index f3938cd3a..a8c2e5d91 100644 --- a/pkg/feature/feature.go +++ b/pkg/feature/feature.go @@ -11,6 +11,7 @@ WITHOUT 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 feature import ( diff --git a/pkg/provider/akeyless/akeyless_test.go b/pkg/provider/akeyless/akeyless_test.go index f55d27a8c..8ad4c3f0c 100644 --- a/pkg/provider/akeyless/akeyless_test.go +++ b/pkg/provider/akeyless/akeyless_test.go @@ -11,6 +11,7 @@ WITHOUT 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 akeyless import ( diff --git a/pkg/provider/akeyless/fake/fake.go b/pkg/provider/akeyless/fake/fake.go index 20b59d03c..ba491a3ec 100644 --- a/pkg/provider/akeyless/fake/fake.go +++ b/pkg/provider/akeyless/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/akeyless/utils.go b/pkg/provider/akeyless/utils.go index af6789987..26f82ae0d 100644 --- a/pkg/provider/akeyless/utils.go +++ b/pkg/provider/akeyless/utils.go @@ -11,6 +11,7 @@ WITHOUT 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 akeyless import ( diff --git a/pkg/provider/aws/auth/fake/assumeroler.go b/pkg/provider/aws/auth/fake/assumeroler.go index d805657aa..e3f63f930 100644 --- a/pkg/provider/aws/auth/fake/assumeroler.go +++ b/pkg/provider/aws/auth/fake/assumeroler.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/aws/auth/resolver.go b/pkg/provider/aws/auth/resolver.go index 4d9bd753b..9577ed419 100644 --- a/pkg/provider/aws/auth/resolver.go +++ b/pkg/provider/aws/auth/resolver.go @@ -11,6 +11,7 @@ WITHOUT 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 auth import ( diff --git a/pkg/provider/aws/auth/resolver_test.go b/pkg/provider/aws/auth/resolver_test.go index 61c5be061..15d345cfa 100644 --- a/pkg/provider/aws/auth/resolver_test.go +++ b/pkg/provider/aws/auth/resolver_test.go @@ -11,6 +11,7 @@ WITHOUT 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 auth import ( diff --git a/pkg/provider/aws/auth/token_fetcher.go b/pkg/provider/aws/auth/token_fetcher.go index 22d8acdd9..6cf6958bf 100644 --- a/pkg/provider/aws/auth/token_fetcher.go +++ b/pkg/provider/aws/auth/token_fetcher.go @@ -11,6 +11,7 @@ WITHOUT 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 auth import ( diff --git a/pkg/provider/aws/auth/token_fetcher_test.go b/pkg/provider/aws/auth/token_fetcher_test.go index 4122547aa..0ed0c84da 100644 --- a/pkg/provider/aws/auth/token_fetcher_test.go +++ b/pkg/provider/aws/auth/token_fetcher_test.go @@ -11,6 +11,7 @@ WITHOUT 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 auth import ( diff --git a/pkg/provider/aws/parameterstore/fake/fake.go b/pkg/provider/aws/parameterstore/fake/fake.go index 447b38f5c..cea9cafb8 100644 --- a/pkg/provider/aws/parameterstore/fake/fake.go +++ b/pkg/provider/aws/parameterstore/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/aws/parameterstore/parameterstore.go b/pkg/provider/aws/parameterstore/parameterstore.go index 1fe359fe6..73f21f1a7 100644 --- a/pkg/provider/aws/parameterstore/parameterstore.go +++ b/pkg/provider/aws/parameterstore/parameterstore.go @@ -11,6 +11,7 @@ WITHOUT 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 parameterstore import ( diff --git a/pkg/provider/aws/parameterstore/parameterstore_test.go b/pkg/provider/aws/parameterstore/parameterstore_test.go index 9a9af6552..2dc81bcaa 100644 --- a/pkg/provider/aws/parameterstore/parameterstore_test.go +++ b/pkg/provider/aws/parameterstore/parameterstore_test.go @@ -11,6 +11,7 @@ WITHOUT 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 parameterstore import ( diff --git a/pkg/provider/aws/util/errors_test.go b/pkg/provider/aws/util/errors_test.go index a62b5cc96..15eb12a06 100644 --- a/pkg/provider/aws/util/errors_test.go +++ b/pkg/provider/aws/util/errors_test.go @@ -11,6 +11,7 @@ WITHOUT 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 util import ( diff --git a/pkg/provider/aws/util/provider.go b/pkg/provider/aws/util/provider.go index a378715e6..8dcba3ef5 100644 --- a/pkg/provider/aws/util/provider.go +++ b/pkg/provider/aws/util/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 util import ( diff --git a/pkg/provider/aws/util/validation.go b/pkg/provider/aws/util/validation.go index 413c741df..fd06989d8 100644 --- a/pkg/provider/aws/util/validation.go +++ b/pkg/provider/aws/util/validation.go @@ -11,6 +11,7 @@ WITHOUT 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 util import ( diff --git a/pkg/provider/azure/keyvault/fake/fake.go b/pkg/provider/azure/keyvault/fake/fake.go index e58cb471a..c88bb323f 100644 --- a/pkg/provider/azure/keyvault/fake/fake.go +++ b/pkg/provider/azure/keyvault/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/conjur/auth_jwt.go b/pkg/provider/conjur/auth_jwt.go index 545bfc805..e66d3f236 100644 --- a/pkg/provider/conjur/auth_jwt.go +++ b/pkg/provider/conjur/auth_jwt.go @@ -11,6 +11,7 @@ WITHOUT 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 conjur import ( diff --git a/pkg/provider/conjur/conjur_api.go b/pkg/provider/conjur/conjur_api.go index eb437e8be..057fc4cd9 100644 --- a/pkg/provider/conjur/conjur_api.go +++ b/pkg/provider/conjur/conjur_api.go @@ -11,6 +11,7 @@ WITHOUT 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 conjur import ( diff --git a/pkg/provider/conjur/provider.go b/pkg/provider/conjur/provider.go index e4829e72b..a0b6e879f 100644 --- a/pkg/provider/conjur/provider.go +++ b/pkg/provider/conjur/provider.go @@ -1,4 +1,3 @@ -// Package conjur provides a Conjur provider for External Secrets. /* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12,6 +11,8 @@ WITHOUT 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 conjur provides a Conjur provider for External Secrets. package conjur import ( diff --git a/pkg/provider/conjur/util/provider.go b/pkg/provider/conjur/util/provider.go index 8a2d27f50..374e856c5 100644 --- a/pkg/provider/conjur/util/provider.go +++ b/pkg/provider/conjur/util/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 util import ( diff --git a/pkg/provider/delinea/client.go b/pkg/provider/delinea/client.go index 492faaca7..3c5fab6de 100644 --- a/pkg/provider/delinea/client.go +++ b/pkg/provider/delinea/client.go @@ -11,6 +11,7 @@ WITHOUT 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 delinea import ( diff --git a/pkg/provider/delinea/client_test.go b/pkg/provider/delinea/client_test.go index 281e0e7d4..6e32ecb59 100644 --- a/pkg/provider/delinea/client_test.go +++ b/pkg/provider/delinea/client_test.go @@ -11,6 +11,7 @@ WITHOUT 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 delinea import ( diff --git a/pkg/provider/delinea/provider_test.go b/pkg/provider/delinea/provider_test.go index 5c22d2b64..fe0ced093 100644 --- a/pkg/provider/delinea/provider_test.go +++ b/pkg/provider/delinea/provider_test.go @@ -11,6 +11,7 @@ WITHOUT 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 delinea import ( diff --git a/pkg/provider/delinea/secret_api.go b/pkg/provider/delinea/secret_api.go index 52a0eba0d..217f04b5e 100644 --- a/pkg/provider/delinea/secret_api.go +++ b/pkg/provider/delinea/secret_api.go @@ -11,6 +11,7 @@ WITHOUT 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 delinea import ( diff --git a/pkg/provider/doppler/fake/fake.go b/pkg/provider/doppler/fake/fake.go index ff7092eec..fc9867eb1 100644 --- a/pkg/provider/doppler/fake/fake.go +++ b/pkg/provider/doppler/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/fake/fake.go b/pkg/provider/fake/fake.go index e7f5b3808..5f5199afd 100644 --- a/pkg/provider/fake/fake.go +++ b/pkg/provider/fake/fake.go @@ -122,10 +122,12 @@ func (p *Provider) PushSecret(_ context.Context, secret *corev1.Secret, data esv } return nil } + if currentData.Origin != FakeSetSecret { return fmt.Errorf("key already exists") } currentData.Value = string(value) + return nil } diff --git a/pkg/provider/fake/fake_test.go b/pkg/provider/fake/fake_test.go index 9cb8d9bc0..3968aa64a 100644 --- a/pkg/provider/fake/fake_test.go +++ b/pkg/provider/fake/fake_test.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/gcp/secretmanager/auth.go b/pkg/provider/gcp/secretmanager/auth.go index d7da8ec1b..5fd89f6a2 100644 --- a/pkg/provider/gcp/secretmanager/auth.go +++ b/pkg/provider/gcp/secretmanager/auth.go @@ -11,6 +11,7 @@ WITHOUT 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 secretmanager import ( diff --git a/pkg/provider/gcp/secretmanager/client.go b/pkg/provider/gcp/secretmanager/client.go index 6d49776bf..595475410 100644 --- a/pkg/provider/gcp/secretmanager/client.go +++ b/pkg/provider/gcp/secretmanager/client.go @@ -11,6 +11,7 @@ WITHOUT 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 secretmanager import ( diff --git a/pkg/provider/gcp/secretmanager/client_test.go b/pkg/provider/gcp/secretmanager/client_test.go index 1d26cb51c..e5b59bb6d 100644 --- a/pkg/provider/gcp/secretmanager/client_test.go +++ b/pkg/provider/gcp/secretmanager/client_test.go @@ -11,6 +11,7 @@ WITHOUT 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 secretmanager import ( diff --git a/pkg/provider/gcp/secretmanager/fake/fake.go b/pkg/provider/gcp/secretmanager/fake/fake.go index da55b10aa..0d58a3eba 100644 --- a/pkg/provider/gcp/secretmanager/fake/fake.go +++ b/pkg/provider/gcp/secretmanager/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/gcp/secretmanager/provider.go b/pkg/provider/gcp/secretmanager/provider.go index 04577c75c..5996d87c9 100644 --- a/pkg/provider/gcp/secretmanager/provider.go +++ b/pkg/provider/gcp/secretmanager/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 secretmanager import ( diff --git a/pkg/provider/gcp/secretmanager/push_secret.go b/pkg/provider/gcp/secretmanager/push_secret.go index 0d232b3da..6c116e9cb 100644 --- a/pkg/provider/gcp/secretmanager/push_secret.go +++ b/pkg/provider/gcp/secretmanager/push_secret.go @@ -11,6 +11,7 @@ WITHOUT 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 secretmanager import ( diff --git a/pkg/provider/gcp/secretmanager/workload_identity.go b/pkg/provider/gcp/secretmanager/workload_identity.go index a7f894b18..cb9012f6b 100644 --- a/pkg/provider/gcp/secretmanager/workload_identity.go +++ b/pkg/provider/gcp/secretmanager/workload_identity.go @@ -11,6 +11,7 @@ WITHOUT 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 secretmanager import ( diff --git a/pkg/provider/gcp/secretmanager/workload_identity_test.go b/pkg/provider/gcp/secretmanager/workload_identity_test.go index 52125cd89..f56355343 100644 --- a/pkg/provider/gcp/secretmanager/workload_identity_test.go +++ b/pkg/provider/gcp/secretmanager/workload_identity_test.go @@ -11,6 +11,7 @@ WITHOUT 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 secretmanager import ( diff --git a/pkg/provider/gitlab/fake/fake.go b/pkg/provider/gitlab/fake/fake.go index 50397bf5d..befd7eec5 100644 --- a/pkg/provider/gitlab/fake/fake.go +++ b/pkg/provider/gitlab/fake/fake.go @@ -11,12 +11,13 @@ WITHOUT 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 fake import ( "net/http" - gitlab "github.com/xanzy/go-gitlab" + "github.com/xanzy/go-gitlab" ) type APIResponse[O any] struct { diff --git a/pkg/provider/gitlab/gitlab.go b/pkg/provider/gitlab/gitlab.go index 987f65884..32be1d693 100644 --- a/pkg/provider/gitlab/gitlab.go +++ b/pkg/provider/gitlab/gitlab.go @@ -11,6 +11,7 @@ WITHOUT 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 gitlab import ( diff --git a/pkg/provider/gitlab/gitlab_test.go b/pkg/provider/gitlab/gitlab_test.go index 4ef4f8723..6cbd67ffa 100644 --- a/pkg/provider/gitlab/gitlab_test.go +++ b/pkg/provider/gitlab/gitlab_test.go @@ -11,6 +11,7 @@ WITHOUT 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 gitlab import ( diff --git a/pkg/provider/gitlab/provider.go b/pkg/provider/gitlab/provider.go index b103a63ad..1922d3a53 100644 --- a/pkg/provider/gitlab/provider.go +++ b/pkg/provider/gitlab/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 gitlab import ( diff --git a/pkg/provider/ibm/fake/fake.go b/pkg/provider/ibm/fake/fake.go index 78d8c66d2..b98df3b88 100644 --- a/pkg/provider/ibm/fake/fake.go +++ b/pkg/provider/ibm/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/ibm/provider.go b/pkg/provider/ibm/provider.go index ef13013ce..19d324b04 100644 --- a/pkg/provider/ibm/provider.go +++ b/pkg/provider/ibm/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 ibm import ( diff --git a/pkg/provider/ibm/provider_test.go b/pkg/provider/ibm/provider_test.go index 5120c5d69..d4d16aef6 100644 --- a/pkg/provider/ibm/provider_test.go +++ b/pkg/provider/ibm/provider_test.go @@ -11,6 +11,7 @@ WITHOUT 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 ibm import ( diff --git a/pkg/provider/keepersecurity/client.go b/pkg/provider/keepersecurity/client.go index f9c680bd3..2b1e01388 100644 --- a/pkg/provider/keepersecurity/client.go +++ b/pkg/provider/keepersecurity/client.go @@ -11,6 +11,7 @@ WITHOUT 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 keepersecurity import ( diff --git a/pkg/provider/keepersecurity/client_test.go b/pkg/provider/keepersecurity/client_test.go index 2a89ec2d7..223af15c7 100644 --- a/pkg/provider/keepersecurity/client_test.go +++ b/pkg/provider/keepersecurity/client_test.go @@ -11,6 +11,7 @@ WITHOUT 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 keepersecurity import ( diff --git a/pkg/provider/keepersecurity/fake/fake.go b/pkg/provider/keepersecurity/fake/fake.go index 91a0b1004..76654005b 100644 --- a/pkg/provider/keepersecurity/fake/fake.go +++ b/pkg/provider/keepersecurity/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ksm "github.com/keeper-security/secrets-manager-go/core" diff --git a/pkg/provider/keepersecurity/provider.go b/pkg/provider/keepersecurity/provider.go index cbdeba44b..4b4140de3 100644 --- a/pkg/provider/keepersecurity/provider.go +++ b/pkg/provider/keepersecurity/provider.go @@ -11,6 +11,7 @@ WITHOUT 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 keepersecurity import ( diff --git a/pkg/provider/kubernetes/auth_test.go b/pkg/provider/kubernetes/auth_test.go index b8976ace9..9784c1372 100644 --- a/pkg/provider/kubernetes/auth_test.go +++ b/pkg/provider/kubernetes/auth_test.go @@ -11,6 +11,7 @@ WITHOUT 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 kubernetes import ( diff --git a/pkg/provider/kubernetes/client_test.go b/pkg/provider/kubernetes/client_test.go index 962532af3..744ef9686 100644 --- a/pkg/provider/kubernetes/client_test.go +++ b/pkg/provider/kubernetes/client_test.go @@ -11,6 +11,7 @@ WITHOUT 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 kubernetes import ( diff --git a/pkg/provider/kubernetes/provider_test.go b/pkg/provider/kubernetes/provider_test.go index 09a0b803b..26e3b0837 100644 --- a/pkg/provider/kubernetes/provider_test.go +++ b/pkg/provider/kubernetes/provider_test.go @@ -11,6 +11,7 @@ WITHOUT 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 kubernetes import ( diff --git a/pkg/provider/kubernetes/validate.go b/pkg/provider/kubernetes/validate.go index 61e2b1c33..8f264d0cc 100644 --- a/pkg/provider/kubernetes/validate.go +++ b/pkg/provider/kubernetes/validate.go @@ -11,6 +11,7 @@ WITHOUT 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 kubernetes import ( diff --git a/pkg/provider/kubernetes/validate_test.go b/pkg/provider/kubernetes/validate_test.go index cdf4011a3..ba7834017 100644 --- a/pkg/provider/kubernetes/validate_test.go +++ b/pkg/provider/kubernetes/validate_test.go @@ -11,6 +11,7 @@ WITHOUT 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 kubernetes import ( diff --git a/pkg/provider/onepassword/fake/fake.go b/pkg/provider/onepassword/fake/fake.go index fa7317e65..8505dea04 100644 --- a/pkg/provider/onepassword/fake/fake.go +++ b/pkg/provider/onepassword/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/onepassword/onepassword.go b/pkg/provider/onepassword/onepassword.go index b98c46b03..fdf8e4e90 100644 --- a/pkg/provider/onepassword/onepassword.go +++ b/pkg/provider/onepassword/onepassword.go @@ -11,6 +11,7 @@ WITHOUT 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 onepassword import ( diff --git a/pkg/provider/onepassword/onepassword_test.go b/pkg/provider/onepassword/onepassword_test.go index 75ed547ad..082730c5a 100644 --- a/pkg/provider/onepassword/onepassword_test.go +++ b/pkg/provider/onepassword/onepassword_test.go @@ -11,6 +11,7 @@ WITHOUT 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 onepassword import ( @@ -28,7 +29,7 @@ import ( esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1" esmeta "github.com/external-secrets/external-secrets/apis/meta/v1" - fake "github.com/external-secrets/external-secrets/pkg/provider/onepassword/fake" + "github.com/external-secrets/external-secrets/pkg/provider/onepassword/fake" ) const ( diff --git a/pkg/provider/oracle/fake/fake.go b/pkg/provider/oracle/fake/fake.go index 3a3ce3559..c16a94c9c 100644 --- a/pkg/provider/oracle/fake/fake.go +++ b/pkg/provider/oracle/fake/fake.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/oracle/oracle.go b/pkg/provider/oracle/oracle.go index e979fbe61..5ffced85c 100644 --- a/pkg/provider/oracle/oracle.go +++ b/pkg/provider/oracle/oracle.go @@ -11,6 +11,7 @@ WITHOUT 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 oracle import ( diff --git a/pkg/provider/oracle/oracle_test.go b/pkg/provider/oracle/oracle_test.go index 8a6abc579..a472bb17a 100644 --- a/pkg/provider/oracle/oracle_test.go +++ b/pkg/provider/oracle/oracle_test.go @@ -11,6 +11,7 @@ WITHOUT 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 oracle import ( diff --git a/pkg/provider/oracle/serviceaccount.go b/pkg/provider/oracle/serviceaccount.go index 38a4207c9..7d4b68778 100644 --- a/pkg/provider/oracle/serviceaccount.go +++ b/pkg/provider/oracle/serviceaccount.go @@ -11,6 +11,7 @@ WITHOUT 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 oracle import ( diff --git a/pkg/provider/scaleway/cache.go b/pkg/provider/scaleway/cache.go index a82ebb34b..eda387d89 100644 --- a/pkg/provider/scaleway/cache.go +++ b/pkg/provider/scaleway/cache.go @@ -11,6 +11,7 @@ WITHOUT 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 scaleway import ( diff --git a/pkg/provider/scaleway/cache_test.go b/pkg/provider/scaleway/cache_test.go index 6e5bc5488..a204e499d 100644 --- a/pkg/provider/scaleway/cache_test.go +++ b/pkg/provider/scaleway/cache_test.go @@ -11,6 +11,7 @@ WITHOUT 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 scaleway import ( diff --git a/pkg/provider/scaleway/client.go b/pkg/provider/scaleway/client.go index 3324d00dc..b1d88ef0c 100644 --- a/pkg/provider/scaleway/client.go +++ b/pkg/provider/scaleway/client.go @@ -11,6 +11,7 @@ WITHOUT 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 scaleway import ( diff --git a/pkg/provider/scaleway/client_test.go b/pkg/provider/scaleway/client_test.go index e441b2249..61c034c96 100644 --- a/pkg/provider/scaleway/client_test.go +++ b/pkg/provider/scaleway/client_test.go @@ -11,6 +11,7 @@ WITHOUT 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 scaleway import ( diff --git a/pkg/provider/scaleway/fake_secret_api_test.go b/pkg/provider/scaleway/fake_secret_api_test.go index dd601b53d..3b4304df6 100644 --- a/pkg/provider/scaleway/fake_secret_api_test.go +++ b/pkg/provider/scaleway/fake_secret_api_test.go @@ -11,6 +11,7 @@ WITHOUT 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 scaleway import ( diff --git a/pkg/provider/scaleway/secret_api.go b/pkg/provider/scaleway/secret_api.go index a614f8640..cf75e715a 100644 --- a/pkg/provider/scaleway/secret_api.go +++ b/pkg/provider/scaleway/secret_api.go @@ -11,6 +11,7 @@ WITHOUT 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 scaleway import ( diff --git a/pkg/provider/testing/fake/fake.go b/pkg/provider/testing/fake/fake.go index 130fad29d..268a5b7cd 100644 --- a/pkg/provider/testing/fake/fake.go +++ b/pkg/provider/testing/fake/fake.go @@ -80,7 +80,6 @@ func (v *Client) GetAllSecrets(ctx context.Context, ref esv1beta1.ExternalSecret return v.GetAllSecretsFn(ctx, ref) } -// Not Implemented PushSecret. func (v *Client) PushSecret(_ context.Context, secret *corev1.Secret, data esv1beta1.PushSecretData) error { v.SetSecretArgs[data.GetRemoteKey()] = SetSecretCallArgs{ Value: secret.Data[data.GetSecretKey()], diff --git a/pkg/provider/util/fake/token_fetcher.go b/pkg/provider/util/fake/token_fetcher.go index 388d356f6..d3588e1ed 100644 --- a/pkg/provider/util/fake/token_fetcher.go +++ b/pkg/provider/util/fake/token_fetcher.go @@ -11,6 +11,7 @@ WITHOUT 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 fake import ( diff --git a/pkg/provider/util/locks/secret_locks.go b/pkg/provider/util/locks/secret_locks.go index 448b955b5..143b642be 100644 --- a/pkg/provider/util/locks/secret_locks.go +++ b/pkg/provider/util/locks/secret_locks.go @@ -11,6 +11,7 @@ WITHOUT 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 locks import ( diff --git a/pkg/provider/util/locks/secret_locks_test.go b/pkg/provider/util/locks/secret_locks_test.go index 93a1a30e8..369d31558 100644 --- a/pkg/provider/util/locks/secret_locks_test.go +++ b/pkg/provider/util/locks/secret_locks_test.go @@ -11,6 +11,7 @@ WITHOUT 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 locks import ( diff --git a/pkg/provider/vault/iamauth/iamauth_test.go b/pkg/provider/vault/iamauth/iamauth_test.go index ecc488614..1dcde2470 100644 --- a/pkg/provider/vault/iamauth/iamauth_test.go +++ b/pkg/provider/vault/iamauth/iamauth_test.go @@ -11,6 +11,7 @@ WITHOUT 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 iamauth import ( diff --git a/pkg/provider/webhook/webhook_test.go b/pkg/provider/webhook/webhook_test.go index 75ede40eb..d6a5cd678 100644 --- a/pkg/provider/webhook/webhook_test.go +++ b/pkg/provider/webhook/webhook_test.go @@ -11,6 +11,7 @@ WITHOUT 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 webhook import ( diff --git a/pkg/provider/yandex/certificatemanager/certificatemanager.go b/pkg/provider/yandex/certificatemanager/certificatemanager.go index ae6bf2c5e..bd9856a48 100644 --- a/pkg/provider/yandex/certificatemanager/certificatemanager.go +++ b/pkg/provider/yandex/certificatemanager/certificatemanager.go @@ -11,6 +11,7 @@ WITHOUT 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 certificatemanager import ( diff --git a/pkg/provider/yandex/certificatemanager/certificatemanager_test.go b/pkg/provider/yandex/certificatemanager/certificatemanager_test.go index 2c263a99b..7c5d2ac69 100644 --- a/pkg/provider/yandex/certificatemanager/certificatemanager_test.go +++ b/pkg/provider/yandex/certificatemanager/certificatemanager_test.go @@ -11,6 +11,7 @@ WITHOUT 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 certificatemanager import ( diff --git a/pkg/provider/yandex/certificatemanager/certificatemanagersecretgetter.go b/pkg/provider/yandex/certificatemanager/certificatemanagersecretgetter.go index 2a0526235..e47ed6f2a 100644 --- a/pkg/provider/yandex/certificatemanager/certificatemanagersecretgetter.go +++ b/pkg/provider/yandex/certificatemanager/certificatemanagersecretgetter.go @@ -11,6 +11,7 @@ WITHOUT 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 certificatemanager import ( diff --git a/pkg/provider/yandex/certificatemanager/client/client.go b/pkg/provider/yandex/certificatemanager/client/client.go index 385e3710c..b8c85f7a4 100644 --- a/pkg/provider/yandex/certificatemanager/client/client.go +++ b/pkg/provider/yandex/certificatemanager/client/client.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/certificatemanager/client/fakeclient.go b/pkg/provider/yandex/certificatemanager/client/fakeclient.go index 3c397c4fb..c73fb6139 100644 --- a/pkg/provider/yandex/certificatemanager/client/fakeclient.go +++ b/pkg/provider/yandex/certificatemanager/client/fakeclient.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/certificatemanager/client/grpcclient.go b/pkg/provider/yandex/certificatemanager/client/grpcclient.go index da70c3022..1f14e5a36 100644 --- a/pkg/provider/yandex/certificatemanager/client/grpcclient.go +++ b/pkg/provider/yandex/certificatemanager/client/grpcclient.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/common/clock/clock.go b/pkg/provider/yandex/common/clock/clock.go index 76d8e28ea..263fa6ad3 100644 --- a/pkg/provider/yandex/common/clock/clock.go +++ b/pkg/provider/yandex/common/clock/clock.go @@ -11,6 +11,7 @@ WITHOUT 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 clock import ( diff --git a/pkg/provider/yandex/common/clock/fakeclock.go b/pkg/provider/yandex/common/clock/fakeclock.go index 9ebac6633..f002b6988 100644 --- a/pkg/provider/yandex/common/clock/fakeclock.go +++ b/pkg/provider/yandex/common/clock/fakeclock.go @@ -11,6 +11,7 @@ WITHOUT 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 clock import "time" diff --git a/pkg/provider/yandex/common/clock/realclock.go b/pkg/provider/yandex/common/clock/realclock.go index 78f807994..2d655f13f 100644 --- a/pkg/provider/yandex/common/clock/realclock.go +++ b/pkg/provider/yandex/common/clock/realclock.go @@ -11,6 +11,7 @@ WITHOUT 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 clock import "time" diff --git a/pkg/provider/yandex/common/provider.go b/pkg/provider/yandex/common/provider.go index b635f3e4d..945ecc98e 100644 --- a/pkg/provider/yandex/common/provider.go +++ b/pkg/provider/yandex/common/provider.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/common/sdk.go b/pkg/provider/yandex/common/sdk.go index dec831758..3a6f08367 100644 --- a/pkg/provider/yandex/common/sdk.go +++ b/pkg/provider/yandex/common/sdk.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/common/secretgetter.go b/pkg/provider/yandex/common/secretgetter.go index 51c147af6..80fa470de 100644 --- a/pkg/provider/yandex/common/secretgetter.go +++ b/pkg/provider/yandex/common/secretgetter.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/common/secretsclient.go b/pkg/provider/yandex/common/secretsclient.go index 606aca4aa..2906d90f2 100644 --- a/pkg/provider/yandex/common/secretsclient.go +++ b/pkg/provider/yandex/common/secretsclient.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/common/secretsetter.go b/pkg/provider/yandex/common/secretsetter.go index e5250c2c4..5a7f95b25 100644 --- a/pkg/provider/yandex/common/secretsetter.go +++ b/pkg/provider/yandex/common/secretsetter.go @@ -11,6 +11,7 @@ WITHOUT 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 type SecretSetter interface { diff --git a/pkg/provider/yandex/lockbox/client/client.go b/pkg/provider/yandex/lockbox/client/client.go index b17f06a82..1705027a6 100644 --- a/pkg/provider/yandex/lockbox/client/client.go +++ b/pkg/provider/yandex/lockbox/client/client.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/lockbox/client/fakeclient.go b/pkg/provider/yandex/lockbox/client/fakeclient.go index d7305e2cc..37e21ca77 100644 --- a/pkg/provider/yandex/lockbox/client/fakeclient.go +++ b/pkg/provider/yandex/lockbox/client/fakeclient.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/lockbox/client/grpcclient.go b/pkg/provider/yandex/lockbox/client/grpcclient.go index 1d231cbfd..da72e8cd6 100644 --- a/pkg/provider/yandex/lockbox/client/grpcclient.go +++ b/pkg/provider/yandex/lockbox/client/grpcclient.go @@ -11,6 +11,7 @@ WITHOUT 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/pkg/provider/yandex/lockbox/lockbox.go b/pkg/provider/yandex/lockbox/lockbox.go index fa72ff4b3..b5ad2f71e 100644 --- a/pkg/provider/yandex/lockbox/lockbox.go +++ b/pkg/provider/yandex/lockbox/lockbox.go @@ -11,6 +11,7 @@ WITHOUT 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 lockbox import ( diff --git a/pkg/provider/yandex/lockbox/lockbox_test.go b/pkg/provider/yandex/lockbox/lockbox_test.go index fa8f70cd1..fec36afbc 100644 --- a/pkg/provider/yandex/lockbox/lockbox_test.go +++ b/pkg/provider/yandex/lockbox/lockbox_test.go @@ -11,6 +11,7 @@ WITHOUT 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 lockbox import ( diff --git a/pkg/provider/yandex/lockbox/lockboxsecretgetter.go b/pkg/provider/yandex/lockbox/lockboxsecretgetter.go index 6b446d5ed..bb14a1685 100644 --- a/pkg/provider/yandex/lockbox/lockboxsecretgetter.go +++ b/pkg/provider/yandex/lockbox/lockboxsecretgetter.go @@ -11,6 +11,7 @@ WITHOUT 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 lockbox import ( diff --git a/pkg/template/engine.go b/pkg/template/engine.go index 07457ede5..b406a962b 100644 --- a/pkg/template/engine.go +++ b/pkg/template/engine.go @@ -10,6 +10,7 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. limitations under the License. */ + package template import ( diff --git a/pkg/template/v1/template.go b/pkg/template/v1/template.go index d9b0123b1..f0ba5d0ad 100644 --- a/pkg/template/v1/template.go +++ b/pkg/template/v1/template.go @@ -11,6 +11,7 @@ WITHOUT 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 template import ( diff --git a/pkg/template/v1/template_test.go b/pkg/template/v1/template_test.go index 3c6502088..2d5c645c8 100644 --- a/pkg/template/v1/template_test.go +++ b/pkg/template/v1/template_test.go @@ -11,6 +11,7 @@ WITHOUT 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 template import ( diff --git a/pkg/template/v2/jwk.go b/pkg/template/v2/jwk.go index 35619f526..510a5fbcd 100644 --- a/pkg/template/v2/jwk.go +++ b/pkg/template/v2/jwk.go @@ -11,6 +11,7 @@ WITHOUT 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 template import ( diff --git a/pkg/template/v2/pem.go b/pkg/template/v2/pem.go index 5111ea3a7..0490bc169 100644 --- a/pkg/template/v2/pem.go +++ b/pkg/template/v2/pem.go @@ -11,6 +11,7 @@ WITHOUT 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 template import ( diff --git a/pkg/template/v2/pem_chain.go b/pkg/template/v2/pem_chain.go index d29e7529c..b831c7367 100644 --- a/pkg/template/v2/pem_chain.go +++ b/pkg/template/v2/pem_chain.go @@ -24,6 +24,7 @@ SOFTWARE Original Author: Anish Ramasekar https://github.com/aramase In: https://github.com/Azure/secrets-store-csi-driver-provider-azure/pull/332 */ + package template import ( diff --git a/pkg/template/v2/pem_test.go b/pkg/template/v2/pem_test.go index 94859d3b7..396339542 100644 --- a/pkg/template/v2/pem_test.go +++ b/pkg/template/v2/pem_test.go @@ -11,6 +11,7 @@ WITHOUT 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 template import "testing" diff --git a/pkg/template/v2/pkcs12.go b/pkg/template/v2/pkcs12.go index d81407c11..8dd9b5d8f 100644 --- a/pkg/template/v2/pkcs12.go +++ b/pkg/template/v2/pkcs12.go @@ -11,6 +11,7 @@ WITHOUT 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 template import ( diff --git a/pkg/template/v2/template.go b/pkg/template/v2/template.go index caa86bfea..8afd5f961 100644 --- a/pkg/template/v2/template.go +++ b/pkg/template/v2/template.go @@ -11,6 +11,7 @@ WITHOUT 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 template import ( diff --git a/pkg/template/v2/template_test.go b/pkg/template/v2/template_test.go index 67ed72ce7..ac9fadd62 100644 --- a/pkg/template/v2/template_test.go +++ b/pkg/template/v2/template_test.go @@ -11,6 +11,7 @@ WITHOUT 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 template import ( diff --git a/pkg/template/v2/yaml.go b/pkg/template/v2/yaml.go index e63901cc5..5c531cc28 100644 --- a/pkg/template/v2/yaml.go +++ b/pkg/template/v2/yaml.go @@ -11,6 +11,7 @@ WITHOUT 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 template import (