From dfc331312c1c7f08cd7ed99dd4840004a0190f56 Mon Sep 17 00:00:00 2001 From: Luke Ogg Date: Tue, 9 Apr 2024 18:59:25 -0600 Subject: [PATCH] feat: Cert Manager tests (#2073) * feat: Tests for install and upgrade of cert-manager * fix: Update .gitignore * fix: Remove extra toolchain (issue with lint) --- .gitignore | 3 + apptests/appscenarios/appscenarios.go | 48 +++ apptests/appscenarios/certmanager.go | 170 ++++++++ apptests/appscenarios/certmanager_test.go | 375 ++++++++++++++++++ apptests/appscenarios/contants.go | 13 + apptests/appscenarios/reloader.go | 10 +- apptests/appscenarios/suite_test.go | 14 +- apptests/environment/environment.go | 77 ++++ apptests/kind/kind.go | 2 +- .../testdata/cert-manager/certificate.yaml | 16 + magefiles/go.mod | 2 +- 11 files changed, 716 insertions(+), 14 deletions(-) create mode 100644 apptests/appscenarios/certmanager.go create mode 100644 apptests/appscenarios/certmanager_test.go create mode 100644 apptests/appscenarios/contants.go create mode 100644 apptests/testdata/cert-manager/certificate.yaml diff --git a/.gitignore b/.gitignore index b8f1c8f52..3fc180be1 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ # for updating image licenses bloodhound images.txt + +# apptest working directory +apptests/.work/ diff --git a/apptests/appscenarios/appscenarios.go b/apptests/appscenarios/appscenarios.go index 903555844..91b208473 100644 --- a/apptests/appscenarios/appscenarios.go +++ b/apptests/appscenarios/appscenarios.go @@ -90,3 +90,51 @@ func absolutePathTo(application string) (string, error) { var scenariosList = List{ "reloader": reloader{}, } + +// getTestDataDir gets the directory path for test data +func getTestDataDir() (string, error) { + wd, err := os.Getwd() + if err != nil { + return "", err + } + + _, err = os.Stat(filepath.Join(wd, "../testdata")) + if err != nil { + return "", fmt.Errorf("testdata directory not found: %w", err) + } + + return filepath.Abs(filepath.Join(wd, "../testdata")) +} + +func getkAppsUpgradePath(application string) (string, error) { + wd, err := os.Getwd() + if err != nil { + return "", err + } + + // Check that the app repo has been cloned + _, err = os.Stat(filepath.Join(wd, "../", upgradeKAppsRepoPath)) + if err != nil { + return "", fmt.Errorf("kommander-applications upgrade directory not found: %w", err) + } + + // Get the absolute path to the application directory + dir, err := filepath.Abs(filepath.Join(wd, "../", upgradeKAppsRepoPath, "services", application)) + if err != nil { + return "", err + } + + // filepath.Glob returns a sorted slice of matching paths + matches, err := filepath.Glob(filepath.Join(dir, "*")) + if err != nil { + return "", err + } + + if len(matches) == 0 { + return "", fmt.Errorf( + "no application directory found for %s in the given path:%s", + application, dir) + } + + return matches[0], nil +} diff --git a/apptests/appscenarios/certmanager.go b/apptests/appscenarios/certmanager.go new file mode 100644 index 000000000..6c67781bf --- /dev/null +++ b/apptests/appscenarios/certmanager.go @@ -0,0 +1,170 @@ +package appscenarios + +import ( + "context" + "github.com/mesosphere/kommander-applications/apptests/environment" + "path/filepath" +) + +type certManager struct{} + +func (r certManager) Name() string { + return "cert-manager" +} + +var _ AppScenario = (*reloader)(nil) + +func (r certManager) Install(ctx context.Context, env *environment.Env) error { + appPath, err := absolutePathTo(r.Name()) + if err != nil { + return err + } + + err = r.install(ctx, env, appPath) + if err != nil { + return err + } + + return err +} + +func (r certManager) InstallPreviousVersion(ctx context.Context, env *environment.Env) error { + appPath, err := getkAppsUpgradePath(r.Name()) + if err != nil { + return err + } + + err = r.install(ctx, env, appPath) + if err != nil { + return err + } + + return nil +} + +func (r certManager) Upgrade(ctx context.Context, env *environment.Env) error { + appPath, err := absolutePathTo(r.Name()) + if err != nil { + return err + } + + err = r.install(ctx, env, appPath) + if err != nil { + return err + } + + return err +} + +func (r certManager) install(ctx context.Context, env *environment.Env, appPath string) error { + // apply defaults config maps first + defaultKustomization := filepath.Join(appPath, "/defaults") + err := env.ApplyKustomizations(ctx, defaultKustomization, map[string]string{ + "releaseNamespace": kommanderNamespace, + }) + if err != nil { + return err + } + + // apply the yaml for the namespace + namespacePath := filepath.Join(appPath, "/cert-manager-namespace") + err = env.ApplyYAML(ctx, namespacePath, map[string]string{ + "releaseNamespace": kommanderNamespace, + }) + if err != nil { + return err + } + + // create the priority class and resource quota + priorityClassResourceQuotaPath := filepath.Join(appPath, "/priorityclass-resource-quota") + err = env.ApplyYAML(ctx, priorityClassResourceQuotaPath, map[string]string{ + "releaseNamespace": kommanderNamespace, + }) + if err != nil { + return err + } + + // apply the kustomization for the release + releasePath := filepath.Join(appPath, "/release") + err = env.ApplyKustomizations(ctx, releasePath, map[string]string{ + "releaseNamespace": kommanderNamespace, + }) + if err != nil { + return err + } + + return err +} + +func (r certManager) UpgradeRootCA(ctx context.Context, env *environment.Env) error { + appPath, err := absolutePathTo(r.Name()) + if err != nil { + return err + } + + err = r.installRootCA(ctx, env, appPath) + if err != nil { + return err + } + + return nil +} + +func (r certManager) InstallPreviousVersionRootCA(ctx context.Context, env *environment.Env) error { + appPath, err := getkAppsUpgradePath(r.Name()) + if err != nil { + return err + } + + err = r.installRootCA(ctx, env, appPath) + if err != nil { + return err + } + + return nil +} + +func (r certManager) InstallRootCA(ctx context.Context, env *environment.Env) error { + appPath, err := absolutePathTo(r.Name()) + if err != nil { + return err + } + + err = r.installRootCA(ctx, env, appPath) + if err != nil { + return err + } + + return nil +} + +func (r certManager) installRootCA(ctx context.Context, env *environment.Env, appPath string) error { + // apply the yaml for the namespace + rootCAPath := filepath.Join(appPath, "/root-ca") + err := env.ApplyYAML(ctx, rootCAPath, map[string]string{ + "releaseNamespace": kommanderNamespace, + }) + if err != nil { + return err + } + + return err +} + +func (r certManager) InstallTestCertificate(ctx context.Context, env *environment.Env) error { + testDataPath, err := getTestDataDir() + if err != nil { + return err + } + + // apply the yaml for the namespace + certificatePath := filepath.Join(testDataPath, "/cert-manager") + err = env.ApplyYAML(ctx, certificatePath, map[string]string{ + "releaseNamespace": kommanderNamespace, + }) + if err != nil { + return err + } + + return nil +} diff --git a/apptests/appscenarios/certmanager_test.go b/apptests/appscenarios/certmanager_test.go new file mode 100644 index 000000000..787b99309 --- /dev/null +++ b/apptests/appscenarios/certmanager_test.go @@ -0,0 +1,375 @@ +package appscenarios + +import ( + "fmt" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "time" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + fluxhelmv2beta2 "github.com/fluxcd/helm-controller/api/v2beta2" + apimeta "github.com/fluxcd/pkg/apis/meta" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + ctrlClient "sigs.k8s.io/controller-runtime/pkg/client" +) + +var _ = Describe("Installing Cert Manager", Ordered, Label("cert-manager", "install"), func() { + + var ( + cm certManager + hr, hrCrds *fluxhelmv2beta2.HelmRelease + ns *corev1.Namespace + rq *corev1.ResourceQuota + deploymentList *appsv1.DeploymentList + ) + + It("should install successfully with default config", func() { + cm = certManager{} + err := cm.Install(ctx, env) + Expect(err).To(BeNil()) + + hr = &fluxhelmv2beta2.HelmRelease{ + TypeMeta: metav1.TypeMeta{ + Kind: fluxhelmv2beta2.HelmReleaseKind, + APIVersion: fluxhelmv2beta2.GroupVersion.Version, + }, + ObjectMeta: metav1.ObjectMeta{ + Name: cm.Name(), + Namespace: kommanderNamespace, + }, + } + + // Check the status of the HelmReleases + Eventually(func() error { + err = k8sClient.Get(ctx, ctrlClient.ObjectKeyFromObject(hr), hr) + if err != nil { + return err + } + + for _, cond := range hr.Status.Conditions { + if cond.Status == metav1.ConditionTrue && + cond.Type == apimeta.ReadyCondition { + return nil + } + } + return fmt.Errorf("helm release not ready yet") + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should install crds successfully", func() { + hrCrds = &fluxhelmv2beta2.HelmRelease{ + TypeMeta: metav1.TypeMeta{ + Kind: fluxhelmv2beta2.HelmReleaseKind, + APIVersion: fluxhelmv2beta2.GroupVersion.Version, + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "cert-manager-crds", + Namespace: kommanderNamespace, + }, + } + + Eventually(func() error { + err := k8sClient.Get(ctx, ctrlClient.ObjectKeyFromObject(hrCrds), hrCrds) + if err != nil { + return err + } + + for _, cond := range hrCrds.Status.Conditions { + if cond.Status == metav1.ConditionTrue && + cond.Type == apimeta.ReadyCondition { + return nil + } + } + return fmt.Errorf("helm release not ready yet") + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should create the cert-manager namespace", func() { + ns = &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: cm.Name(), + }, + } + + Eventually(func() error { + err := k8sClient.Get(ctx, ctrlClient.ObjectKeyFromObject(ns), ns) + if err != nil { + return err + } + return nil + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should create a ResourceQuota", func() { + rq = &corev1.ResourceQuota{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cert-manager-critical-pods", + Namespace: cm.Name(), + }, + } + + Eventually(func() error { + err := k8sClient.Get(ctx, ctrlClient.ObjectKeyFromObject(rq), rq) + if err != nil { + return err + } + + Expect(rq.Spec.Hard).To(HaveKey(corev1.ResourcePods)) + return nil + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should have a PriorityClass configured", func() { + selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{ + MatchLabels: map[string]string{ + "helm.toolkit.fluxcd.io/name": cm.Name(), + }, + }) + Expect(err).To(BeNil()) + listOptions := &ctrlClient.ListOptions{ + LabelSelector: selector, + } + deploymentList = &appsv1.DeploymentList{} + err = k8sClient.List(ctx, deploymentList, listOptions) + Expect(err).To(BeNil()) + Expect(deploymentList.Items).To(HaveLen(3)) + Expect(err).To(BeNil()) + + Expect(deploymentList.Items[0].Spec.Template.Spec.PriorityClassName).To(Equal("system-cluster-critical")) + }) + + It("should create the root CA successfully", func() { + err := cm.InstallRootCA(ctx, env) + Expect(err).To(BeNil()) + + rootCA := &unstructured.Unstructured{} + rootCA.SetGroupVersionKind(schema.GroupVersionKind{ + Group: "cert-manager.io", + Kind: "ClusterIssuer", + Version: "v1", + }) + + Eventually(func() error { + err := k8sClient.Get(ctx, + ctrlClient.ObjectKey{ + Name: "kommander-ca", + }, rootCA) + if err != nil { + return err + } + conditions, _, _ := unstructured.NestedSlice(rootCA.Object, "status", "conditions") + + for _, c := range conditions { + condition := c.(map[string]interface{}) + if condition["type"] == "Ready" && condition["status"] == "True" { + return nil + } + } + return nil + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should issue a certificate successfully", func() { + err := cm.InstallTestCertificate(ctx, env) + Expect(err).To(BeNil()) + + cert := &unstructured.Unstructured{} + cert.SetGroupVersionKind(schema.GroupVersionKind{ + Group: "cert-manager.io", + Kind: "Certificate", + Version: "v1", + }) + + Eventually(func() error { + err := k8sClient.Get(ctx, + ctrlClient.ObjectKey{ + Namespace: cm.Name(), + Name: "test-certificate", + }, cert) + if err != nil { + return err + } + + conditions, _, _ := unstructured.NestedSlice(cert.Object, "status", "conditions") + for _, c := range conditions { + condition := c.(map[string]interface{}) + if condition["type"] == "Ready" && condition["status"] == "True" { + return nil + } + } + return fmt.Errorf("certificate not ready yet") + + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) +}) + +var _ = Describe("Upgrading Cert Manager Test", Ordered, Label("cert-manager", "upgrade"), func() { + var ( + cm certManager + hr *fluxhelmv2beta2.HelmRelease + ) + + It("should install the previous version successfully", func() { + cm = certManager{} + err := cm.InstallPreviousVersion(ctx, env) + Expect(err).To(BeNil()) + + hr = &fluxhelmv2beta2.HelmRelease{ + TypeMeta: metav1.TypeMeta{ + Kind: fluxhelmv2beta2.HelmReleaseKind, + APIVersion: fluxhelmv2beta2.GroupVersion.Version, + }, + ObjectMeta: metav1.ObjectMeta{ + Name: cm.Name(), + Namespace: kommanderNamespace, + }, + } + + // Check the status of the HelmReleases + Eventually(func() error { + err = k8sClient.Get(ctx, ctrlClient.ObjectKeyFromObject(hr), hr) + if err != nil { + return err + } + + for _, cond := range hr.Status.Conditions { + if cond.Status == metav1.ConditionTrue && + cond.Type == apimeta.ReadyCondition { + return nil + } + } + return fmt.Errorf("helm release not ready yet") + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should create the root CA successfully", func() { + err := cm.InstallPreviousVersionRootCA(ctx, env) + Expect(err).To(BeNil()) + + rootCA := &unstructured.Unstructured{} + rootCA.SetGroupVersionKind(schema.GroupVersionKind{ + Group: "cert-manager.io", + Kind: "ClusterIssuer", + Version: "v1", + }) + + Eventually(func() error { + err := k8sClient.Get(ctx, + ctrlClient.ObjectKey{ + Name: "kommander-ca", + }, rootCA) + if err != nil { + return err + } + conditions, _, _ := unstructured.NestedSlice(rootCA.Object, "status", "conditions") + + for _, c := range conditions { + condition := c.(map[string]interface{}) + if condition["type"] == "Ready" && condition["status"] == "True" { + return nil + } + } + return nil + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should upgrade cert-manager successfully", func() { + err := cm.Upgrade(ctx, env) + Expect(err).To(BeNil()) + + hr = &fluxhelmv2beta2.HelmRelease{ + TypeMeta: metav1.TypeMeta{ + Kind: fluxhelmv2beta2.HelmReleaseKind, + APIVersion: fluxhelmv2beta2.GroupVersion.Version, + }, + ObjectMeta: metav1.ObjectMeta{ + Name: cm.Name(), + Namespace: kommanderNamespace, + }, + } + + // Check the status of the HelmReleases + Eventually(func() error { + err = k8sClient.Get(ctx, ctrlClient.ObjectKeyFromObject(hr), hr) + if err != nil { + return err + } + + for _, cond := range hr.Status.Conditions { + if cond.Status == metav1.ConditionTrue && + cond.Type == apimeta.ReadyCondition { + return nil + } + } + return fmt.Errorf("helm release not ready yet") + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should should upgrade the Root CA successfully", func() { + err := cm.UpgradeRootCA(ctx, env) + Expect(err).To(BeNil()) + + rootCA := &unstructured.Unstructured{} + rootCA.SetGroupVersionKind(schema.GroupVersionKind{ + Group: "cert-manager.io", + Kind: "ClusterIssuer", + Version: "v1", + }) + + Eventually(func() error { + err := k8sClient.Get(ctx, + ctrlClient.ObjectKey{ + Name: "kommander-ca", + }, rootCA) + if err != nil { + return err + } + conditions, _, _ := unstructured.NestedSlice(rootCA.Object, "status", "conditions") + + for _, c := range conditions { + condition := c.(map[string]interface{}) + if condition["type"] == "Ready" && condition["status"] == "True" { + return nil + } + } + return nil + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) + + It("should issue a certificate successfully after upgrade", func() { + err := cm.InstallTestCertificate(ctx, env) + Expect(err).To(BeNil()) + + cert := &unstructured.Unstructured{} + cert.SetGroupVersionKind(schema.GroupVersionKind{ + Group: "cert-manager.io", + Kind: "Certificate", + Version: "v1", + }) + + Eventually(func() error { + err := k8sClient.Get(ctx, + ctrlClient.ObjectKey{ + Namespace: cm.Name(), + Name: "test-certificate", + }, cert) + if err != nil { + return err + } + + conditions, _, _ := unstructured.NestedSlice(cert.Object, "status", "conditions") + for _, c := range conditions { + condition := c.(map[string]interface{}) + if condition["type"] == "Ready" && condition["status"] == "True" { + return nil + } + } + return fmt.Errorf("certificate not ready yet") + + }).WithPolling(pollInterval).WithTimeout(5 * time.Minute).Should(Succeed()) + }) +}) diff --git a/apptests/appscenarios/contants.go b/apptests/appscenarios/contants.go new file mode 100644 index 000000000..f699850fc --- /dev/null +++ b/apptests/appscenarios/contants.go @@ -0,0 +1,13 @@ +package appscenarios + +import "time" + +const ( + // General test parameters + pollInterval = 2 * time.Second + kommanderNamespace = "kommander" + kommanderFluxNamespace = "kommander-flux" + + // Default path to upgrade k-apps repository + defaultUpgradeKAppsRepoPath = ".work/upgrade/kommander-applications" +) diff --git a/apptests/appscenarios/reloader.go b/apptests/appscenarios/reloader.go index 7794af0fd..e3d93a3e1 100644 --- a/apptests/appscenarios/reloader.go +++ b/apptests/appscenarios/reloader.go @@ -2,10 +2,8 @@ package appscenarios import ( "context" - "path/filepath" - "time" - "github.com/mesosphere/kommander-applications/apptests/environment" + "path/filepath" ) type reloader struct{} @@ -16,12 +14,6 @@ func (r reloader) Name() string { var _ AppScenario = (*reloader)(nil) -const ( - pollInterval = 2 * time.Second - kommanderNamespace = "kommander" - kommanderFluxNamespace = "kommander-flux" -) - func (r reloader) Install(ctx context.Context, env *environment.Env) error { appPath, err := absolutePathTo(r.Name()) if err != nil { diff --git a/apptests/appscenarios/suite_test.go b/apptests/appscenarios/suite_test.go index ce624d2b7..f9e49da24 100644 --- a/apptests/appscenarios/suite_test.go +++ b/apptests/appscenarios/suite_test.go @@ -2,6 +2,7 @@ package appscenarios import ( "context" + "os" "testing" . "github.com/onsi/ginkgo/v2" @@ -13,9 +14,10 @@ import ( ) var ( - env *environment.Env - ctx context.Context - k8sClient genericClient.Client + env *environment.Env + ctx context.Context + k8sClient genericClient.Client + upgradeKAppsRepoPath string ) var _ = BeforeSuite(func() { @@ -28,6 +30,12 @@ var _ = BeforeSuite(func() { k8sClient, err = genericClient.New(env.K8sClient.Config(), genericClient.Options{Scheme: flux.NewScheme()}) Expect(k8sClient).ToNot(BeNil()) Expect(err).To(BeNil()) + + // Get the path to upgrade k-apps repository from the environment variable + upgradeKAppsRepoPath = os.Getenv("UPGRADE_KAPPS_REPO_PATH") + if upgradeKAppsRepoPath == "" { + upgradeKAppsRepoPath = defaultUpgradeKAppsRepoPath + } }) var _ = AfterSuite(func() { diff --git a/apptests/environment/environment.go b/apptests/environment/environment.go index 8949633ed..2ca159033 100644 --- a/apptests/environment/environment.go +++ b/apptests/environment/environment.go @@ -5,6 +5,7 @@ import ( "bytes" "context" "fmt" + "github.com/drone/envsubst" "io" "os" "path/filepath" @@ -252,3 +253,79 @@ func absolutePathToBase() (string, error) { return filepath.Join(wd, base, "common", "base"), nil } + +// ApplyYAML applies the YAML manifests located in the given directory. +func (e *Env) ApplyYAML(ctx context.Context, path string, substitutions map[string]string) error { + log.SetLogger(klog.NewKlogr()) + + if path == "" { + return fmt.Errorf("requirement argument: path is not specified") + } + + genericClient, err := genericCLient.New(e.K8sClient.Config(), genericCLient.Options{ + Scheme: flux.NewScheme(), + }) + if err != nil { + return fmt.Errorf("could not create the generic client for path: %s :%w", path, err) + } + + // Loop through the files in the specified directory and apply the YAML files to the cluster + err = filepath.Walk(path, func(path string, info os.FileInfo, err error) error { + if info.IsDir() { + return nil + } + + err = applyYAMLFile(ctx, genericClient, path, substitutions) + if err != nil { + return fmt.Errorf("could not apply the YAML file for path: %s :%w", path, err) + } + + return nil + + }) + if err != nil { + return fmt.Errorf("could not walk the path: %s :%w", path, err) + } + + return nil +} + +// applyYAMLFile applies the YAML file located in the given path. +func applyYAMLFile(ctx context.Context, genericClient genericCLient.Client, path string, substitutions map[string]string) error { + // Read and decode the YAML file specified in the path + out, err := os.ReadFile(path) + if err != nil { + return fmt.Errorf("could not read the YAML file for path: %s :%w", path, err) + } + + // Substitute the environment variables in the YAML file + yml, err := envsubst.Eval(string(out), func(s string) string { + return substitutions[s] + }) + if err != nil { + return err + } + + // Decode the YAML file + buf := bytes.NewBuffer([]byte(yml)) + dec := yaml.NewYAMLOrJSONDecoder(buf, 1<<20) // default buffer size is 1MB + + // Loop through the resources in the YAML file and apply them to the cluster + for { + var obj unstructured.Unstructured + err = dec.Decode(&obj) + if err == io.EOF { + break + } + if err != nil { + return fmt.Errorf("could not decode yaml for path: %s :%w", path, err) + } + + err = genericClient.Patch(ctx, &obj, genericCLient.Apply, genericCLient.ForceOwnership, genericCLient.FieldOwner("k-cli")) + if err != nil { + return fmt.Errorf("could not patch the resources for path: %s :%w", path, err) + } + } + + return nil +} diff --git a/apptests/kind/kind.go b/apptests/kind/kind.go index 7e970adec..42281a62e 100644 --- a/apptests/kind/kind.go +++ b/apptests/kind/kind.go @@ -15,7 +15,7 @@ type Cluster struct { name string } -const defaultClusterName = "kind" +const defaultClusterName = "kommanderapptest" // CreateCluster creates a new kind cluster with the given name. func CreateCluster(ctx context.Context, name string) (*Cluster, error) { diff --git a/apptests/testdata/cert-manager/certificate.yaml b/apptests/testdata/cert-manager/certificate.yaml new file mode 100644 index 000000000..6dce573c2 --- /dev/null +++ b/apptests/testdata/cert-manager/certificate.yaml @@ -0,0 +1,16 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: test-certificate + namespace: cert-manager +spec: + isCA: true + commonName: test-certificate + secretName: test-certificate + privateKey: + algorithm: ECDSA + size: 256 + issuerRef: + name: kommander-ca + kind: ClusterIssuer + group: cert-manager.io diff --git a/magefiles/go.mod b/magefiles/go.mod index ac6df0813..f5f46169e 100644 --- a/magefiles/go.mod +++ b/magefiles/go.mod @@ -1,6 +1,6 @@ module github.com/mesosphere/kommander-applications/magefiles -go 1.20 +go 1.21 replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible