diff --git a/.github/workflows/kind.yml b/.github/workflows/kind.yml index 44205e7d..d04c8b0a 100644 --- a/.github/workflows/kind.yml +++ b/.github/workflows/kind.yml @@ -86,7 +86,6 @@ jobs: - name: Test Coverage and Report Generation run: | make test-coverage | tee report_unit.json - make coverage-verify make gosec-scan cat gosec.json diff --git a/Makefile b/Makefile index 7859e40e..9236d5eb 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,15 @@ endif export COVERAGE_MIN ?= 65 COVERAGE_E2E_OUT ?= coverage_e2e.out +# Get the branch of the PR target or Push in Github Action +ifeq ($(GITHUB_EVENT_NAME), pull_request) # pull request + BRANCH := $(GITHUB_BASE_REF) +else ifeq ($(GITHUB_EVENT_NAME), push) # push + BRANCH := $(GITHUB_REF_NAME) +else # Default to main + BRANCH := main +endif + # Image URL to use all building/pushing image targets; # Use your own docker registry and image name for dev/test by overridding the IMG and REGISTRY environment variable. IMG ?= $(shell cat COMPONENT_NAME 2> /dev/null) @@ -274,6 +283,7 @@ kind-delete-cluster: install-crds: @echo installing crds kubectl apply -f deploy/crds/policy.open-cluster-management.io_certificatepolicies.yaml + kubectl apply -f https://raw.githubusercontent.com/stolostron/governance-policy-propagator/$(BRANCH)/deploy/crds/policy.open-cluster-management.io_policies.yaml .PHONY: install-resources install-resources: diff --git a/controllers/certificatepolicy_controller.go b/controllers/certificatepolicy_controller.go index c450f7dc..31bea786 100644 --- a/controllers/certificatepolicy_controller.go +++ b/controllers/certificatepolicy_controller.go @@ -779,7 +779,6 @@ func (r *CertificatePolicyReconciler) sendComplianceEvent(ctx context.Context, LastTimestamp: metav1.NewTime(now), Count: 1, Type: "Normal", - EventTime: metav1.NewMicroTime(now), Action: "ComplianceStateUpdate", Related: &corev1.ObjectReference{ Kind: instance.Kind, diff --git a/test/e2e/case2_long_messages_test.go b/test/e2e/case2_long_messages_test.go new file mode 100644 index 00000000..89e258b3 --- /dev/null +++ b/test/e2e/case2_long_messages_test.go @@ -0,0 +1,97 @@ +package e2e + +import ( + "context" + "os" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "gopkg.in/yaml.v3" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "open-cluster-management.io/cert-policy-controller/test/utils" +) + +var _ = Describe("Test certificate policy with long compliance message", Ordered, func() { + const resources = "../resources/case2_long_messages" + kubeconfig := "--kubeconfig=" + kubeconfigManaged + + BeforeAll(func() { + utils.Kubectl("create", "namespace", "case2", kubeconfig) + }) + + AfterAll(func() { + utils.Kubectl( + "delete", "-n", testNamespace, "-f", resources+"/parent_policy.yaml", "--ignore-not-found", kubeconfig, + ) + utils.Kubectl( + "delete", "-n", testNamespace, "-f", resources+"/certificate_policy.yaml", "--ignore-not-found", kubeconfig, + ) + utils.Kubectl("delete", "namespace", "case2", "--ignore-not-found", kubeconfig) + utils.Kubectl("delete", "event", "--field-selector=involvedObject.name=case2", "-n", "managed", kubeconfig) + }) + + It("should become noncompliant even though message is beyond 1024 characters", func(ctx context.Context) { + By("Creating the expiring certificate secrets") + utils.Kubectl("apply", "-f", resources+"/expired_secrets.yaml", "--kubeconfig", kubeconfigManaged) + + By("Creating the Policy and CertificatePolicy") + utils.Kubectl( + "apply", "-f", resources+"/parent_policy.yaml", "-n", testNamespace, "--kubeconfig", kubeconfigManaged, + ) + parentPlc := utils.GetWithTimeout( + clientManagedDynamic, gvrPolicy, "case2", testNamespace, true, defaultTimeoutSeconds, + ) + Expect(parentPlc).NotTo(BeNil()) + + certPolicyYAML, err := os.ReadFile(resources + "/certificate_policy.yaml") + Expect(err).ToNot(HaveOccurred()) + + certPolicy := &unstructured.Unstructured{} + err = yaml.Unmarshal(certPolicyYAML, &certPolicy.Object) + Expect(err).ToNot(HaveOccurred()) + + ownerRefs := []metav1.OwnerReference{{ + APIVersion: "policy.open-cluster-management.io/v1", + Kind: "Policy", + Name: "case2", + UID: parentPlc.GetUID(), + }} + certPolicy.SetOwnerReferences(ownerRefs) + + _, err = clientManagedDynamic.Resource(gvrCertPolicy).Namespace(testNamespace).Create( + ctx, certPolicy, metav1.CreateOptions{}, + ) + Expect(err).ToNot(HaveOccurred()) + + By("Verifying it is NonCompliant and has the long compliance message") + Eventually(func() interface{} { + certPlc := utils.GetWithTimeout( + clientManagedDynamic, gvrCertPolicy, "case2", testNamespace, true, defaultTimeoutSeconds, + ) + + return utils.GetComplianceState(certPlc) + }, defaultTimeoutSeconds, 1).Should(Equal("NonCompliant")) + + events, err := clientManaged.CoreV1().Events(testNamespace).List( + ctx, metav1.ListOptions{FieldSelector: "involvedObject.name=case2,involvedObject.kind=Policy"}, + ) + Expect(err).ToNot(HaveOccurred()) + Expect(events.Items).ToNot(BeEmpty()) + + var matched bool + + for _, event := range events.Items { + // Client side filtering is required for this field since field selectors don't support this field. + if event.Action != "ComplianceStateUpdate" { + continue + } + + Expect(len(event.Message)).To(BeNumerically(">", 1024), "Expected the event message to be greater than 1024") + matched = true + } + + Expect(matched).To(BeTrue(), "Expected a ComplianceStateUpdate event for the case2 Policy to be found") + }) +}) diff --git a/test/resources/case2_long_messages/certificate_policy.yaml b/test/resources/case2_long_messages/certificate_policy.yaml new file mode 100644 index 00000000..6fd88d2d --- /dev/null +++ b/test/resources/case2_long_messages/certificate_policy.yaml @@ -0,0 +1,11 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: CertificatePolicy # cert management expiration +metadata: + name: case2 +spec: + namespaceSelector: + include: + - case2 + remediationAction: inform + severity: low + minimumDuration: 300h diff --git a/test/resources/case2_long_messages/expired_secrets.yaml b/test/resources/case2_long_messages/expired_secrets.yaml new file mode 100644 index 00000000..d381b68d --- /dev/null +++ b/test/resources/case2_long_messages/expired_secrets.yaml @@ -0,0 +1,49 @@ +apiVersion: v1 +kind: Secret +metadata: + name: super-long-secret-that-is-really-impractical-but-is-used-for-this-test-because-this-is-a-simple-way-to-get-the-max-number-of-characters-in-the-new-events-api-to-trigger-but-we-dont-want-that-because-the-core-v1-event-api-sup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MGc3RGdscW5lcGhNL09qMkVoUDh5L2hQYVQ1eTVDWjR4d256MVdLZTU4bWpaMXgrRjQvClFkZ1M3RWxHY3dzYXB4L2g2ekpPZ3VhRmVUWXVaVXFaWDF0TDlXeFFnQU1jTFlFMEtrQ08xcnprU2NxcVVhdUsKSEt6TnFpeThqK2p1QWNBVVA2QjF5K1dCSnJjNVdxVHZDbVdHUytmV0lJNzEzYzEzeTNJQVg5MmpzNDROM2x2RQpzenhLSVVoSEVPMEdWcUpYYTE0MWtaUjBsNjhHbjVwUFNxRU9KL3htU0ViYTZUYlg5SWVtWGFDOEtENlRnSHF1ClBCSjJPRXgrQW9QMG5aUENYRmdvdWJxVHVJK0ZUaWN2b2JaQVFxWUFIT0NFS2hPd3BXQldCMndEcHBNb2JPbXUKQlpaNWtVejdjc3U2bUFGTHdkK1F2eFpZdTZoalFXSEYKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + tls.key: '' +--- +apiVersion: v1 +kind: Secret +metadata: + name: super-long-secret-that-is-really-impractical-but-is-used-for-this-test-because-this-is-a-simple-way-to-get-the-max-number-of-characters-in-the-new-events-api-to-trigger-but-we-dont-want-that-because-the-core-v1-event-api-supports-very-large-messages2 + namespace: case2 +type: kubernetes.io/tls +data: + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURGRENDQWZ3Q0NRQ1RMNHgyQ0hVK3dUQU5CZ2txaGtpRzl3MEJBUXNGQURCTU1Rc3dDUVlEVlFRR0V3SlYKVXpFWE1CVUdBMVVFQ0F3T1RtOXlkR2dnUTJGeWIyeHBibUV4RURBT0JnTlZCQWNNQjFKaGJHVnBaMmd4RWpBUQpCZ05WQkFvTUNWSmxaQ0JUYUdseWREQWVGdzB5TVRBek1qVXdNak15TlRaYUZ3MHlNVEEwTURZd01qTXlOVFphCk1Fd3hDekFKQmdOVkJBWVRBbFZUTVJjd0ZRWURWUVFJREE1T2IzSjBhQ0JEWVhKdmJHbHVZVEV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QlpaNWtVejdjc3U2bUFGTHdkK1F2eFpZdTZoalFXSEYKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + tls.key: '' +--- +apiVersion: v1 +kind: Secret +metadata: + name: super-long-secret-that-is-really-impractical-but-is-used-for-this-test-because-this-is-a-simple-way-to-get-the-max-number-of-characters-in-the-new-events-api-to-trigger-but-we-dont-want-that-because-the-core-v1-event-api-supports-very-large-messages3 + namespace: case2 +type: kubernetes.io/tls +data: + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURGRENDQWZ3Q0NRQ1RMNHgyQ0hVK3dUQU5CZ2txaGtpRzl3MEJBUXNGQURCTU1Rc3dDUVlEVlFRR0V3SlYKVXpFWE1CVUdBMVVFQ0F3T1RtOXlkR2dnUTJGeWIyeHBibUV4RURBT0JnTlZCQWNNQjFKaGJHVnBaMmd4RWpBUQpCZ05WQkFvTUNWSmxaQ0JUYUdseWREQWVGdzB5TVRBek1qVXdNak15TlRaYUZ3MHlNVEEwTURZd01qTXlOVFphCk1Fd3hDekFKQmdOVkJBWVRBbFZUTVJjd0ZRWURWUVFJREE1T2IzSjBhQ0JEWVhKdmJHbHVZVEVRTUE0R0ExVUUKQnd3SFVtRnNaV2xuYURFU01CQUdBMVVFQ2d3SlVtVmtJRk5vYVhKME1JSUJJakFOQmdrcWhraUc5dzBCQVFFRgpBQU9DQVE4QU1JSUJDZ0tDQVFFQXVWc0pnOW5td211WVRPTW91RXdtQlVXUHd3T0hnUzZVK2ZnYWloQzlkb3B6Cnhra0Q5KzF4eGVuK2xSYXB5dnphLzdzN1AvOXVFaHd4ekZNcXhYWDJCQmhVUFlrWEp3dUNnbUN3SGhVT0JnZEEKMFdVbmtzOFZWYWRMR3pUSzg2RGhlV0U3Z20vc2xLL3ZHY2VVTzFlU1RhL3pGVVdMTjkwWS9EUGxrT09XMjZNdApIb1FycjUzN3hJTTgwR045b0pNWEFkUFhlbGQ3R1c3WWRiUFBELzZRS25LMUVMbXUxdytubUZSa2cvTTNtT3pHCm9hcmVKYno0aUkrazk2b1dyaDlmN0ZINWYxL2ZKbldtN0FwSVNJTWVuei9WNzhmMVB6N0k1amdRdFJBOWhDY0oKT1YrMVBUY2ZiWTlDakVSM3JST1I1K2gvNFFhZ3JwMWh4ZGZEN0ExMjN3SURBUUFCTUEwR0NTcUdTSWIzRFFFQgpDd1VBQTRJQkFRQVlJMGc3RGdscW5lcGhNL09qMkVoUDh5L2hQYVQ1eTVDWjR4d256MVdLZTU4bWpaMXgrRjQvClFkZ1M3RWxHY3dzYXB4L2g2ekpPZ3VhRmVUWXVaVXFaWDF0TDlXeFFnQU1jTFlFMEtrQ08xcnprU2NxcVVhdUsKSEt6TnFpeThqK2p1QWNBVVA2QjF5K1dCSnJjNVdxVHZDbVdHUytmV0lJNzEzYzEzeTNJQVg5MmpzNDROM2x2RQpzenhLSVVoSEVPMEdWcUpYYTE0MWtaUjBsNjhHbjVwUFNxRU9KL3htU0ViYTZUYlg5SWVtWGFDOEtENlRnSHF1ClBCSjJPRXgrQW9QMG5aUENYRmdvdWJxVHVJK0ZUaWN2b2JaQVFxWUFIT0NFS2hPd3BXQldCMndEcHBNb2JPbXUKQlpaNWtVejdjc3U2bUFGTHdkK1F2eFpZdTZoalFXSEYKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + tls.key: '' +--- +apiVersion: v1 +kind: Secret +metadata: + name: super-long-secret-that-is-really-impractical-but-is-used-for-this-test-because-this-is-a-simple-way-to-get-the-max-number-of-characters-in-the-new-events-api-to-trigger-but-we-dont-want-that-because-the-core-v1-event-api-supports-very-large-messages4 + namespace: case2 +type: kubernetes.io/tls +data: + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURGRENDQWZ3Q0NRQ1RMNHgyQ0hVK3dUQU5CZ2txaGtpRzl3MEJBUXNGQURCTU1Rc3dDUVlEVlFRR0V3SlYKVXpFWE1CVUdBMVVFQ0F3T1RtO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xVHZDbVdHUytmV0lJNzEzYzEzeTNJQVg5MmpzNDROM2x2RQpzenhLSVVoSEVPMEdWcUpYYTE0MWtaUjBsNjhHbjVwUFNxRU9KL3htU0ViYTZUYlg5SWVtWGFDOEtENlRnSHF1ClBCSjJPRXgrQW9QMG5aUENYRmdvdWJxVHVJK0ZUaWN2b2JaQVFxWUFIT0NFS2hPd3BXQldCMndEcHBNb2JPbXUKQlpaNWtVejdjc3U2bUFGTHdkK1F2eFpZdTZoalFXSEYKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + tls.key: '' +--- +apiVersion: v1 +kind: Secret +metadata: + name: super-long-secret-that-is-really-impractical-but-is-used-for-this-test-because-this-is-a-simple-way-to-get-the-max-number-of-characters-in-the-new-events-api-to-trigger-but-we-dont-want-that-because-the-core-v1-event-api-supports-very-large-messages5 + namespace: case2 +type: kubernetes.io/tls +data: + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURGRENDQWZ3Q0NRQ1RMNHgyQ0hVK3dUQU5CZ2txaGtpRzl3MEJBUXNGQURCTU1Rc3dDUVlEVlFRR0V3SlYKVXpFWE1CVUdBMVVFQ0F3T1RtOXlkR2dnUTJGeWIyeHBibUV4RURBT0JnTlZCQWNNQjFKaGJHVnBaMmd4RWpBUQpCZ05WQkFvTUNWSmxaQ0JUYUdseWREQWVGdzB5TVRBek1qVXdNak15TlRaYUZ3MHlNVEEwTURZd01qTXlOVFphCk1Fd3hDekFKQmdOVkJBWVRBbFZUTVJjd0ZRWURWUVFJREE1T2IzSjBhQ0JEWVhKdmJHbHVZVEVRTUE0R0ExVUUKQnd3SFVtRnNaV2xuYURFU01CQUdBMVVFQ2d3SlVtVmtJRk5vYVhKME1JSUJJakFOQmdrcWhraUc5dzBCQVFFRgpBQU9DQVE4QU1JSUJDZ0tDQVFFQXVWc0pnOW5td211WVRPTW91RXdtQlVXUHd3T0hnUzZVK2ZnYWloQzlkb3B6Cnhra0Q5KzF4eGVuK2xSYXB5dnphLzdzN1AvOXVFaHd4ekZNcXhYWDJCQmhVUFlrWEp3dUNnbUN3SGhVT0JnZEEKMFdVbmtzOFZWYWRMR3pUSzg2RGhlV0U3Z20vc2xLL3ZHY2VVTzFlU1RhL3pGVVdMTjkwWS9EUGxrT09XMjZNdApIb1FycjUzN3hJTTgwR045b0pNWEFkUFhlbGQ3R1c3WWRiUFBELzZRS25LMUVMbXUxdytubUZSa2cvTTNtT3pHCm9hcmVKYno0aUkrazk2b1dyaDlmN0ZINWYxL2ZKbldtN0FwSVNJTWVuei9WNzhmMVB6N0k1amdRdFJBOWhDY0oKT1YrMVBUY2ZiWTlDakVSM3JST1I1K2gvNFFhZ3JwMWh4ZGZEN0ExMjN3SURBUUFCTUEwR0NTcUdTSWIzRFFFQgpDd1VBQTRJQkFRQVlJMGc3RGdscW5lcGhNL09qMkVoUDh5L2hQYVQ1eTVDWjR4d256MVdLZTU4bWpaMXgrRjQvClFkZ1M3RWxHY3dzYXB4L2g2ekpPZ3VhRmVUWXVaVXFaWDF0TDlXeFFnQU1jTFlFMEtrQ08xcnprU2NxcVVhdUsKSEt6TnFpeThqK2p1QWNBVVA2QjF5K1dCSnJjNVdxVHZDbVdHUytmV0lJNzEzYzEzeTNJQVg5MmpzNDROM2x2RQpzenhLSVVoSEVPMEdWcUpYYTE0MWtaUjBsNjhHbjVwUFNxRU9KL3htU0ViYTZUYlg5SWVtWGFDOEtENlRnSHF1ClBCSjJPRXgrQW9QMG5aUENYRmdvdWJxVHVJK0ZUaWN2b2JaQVFxWUFIT0NFS2hPd3BXQldCMndEcHBNb2JPbXUKQlpaNWtVejdjc3U2bUFGTHdkK1F2eFpZdTZoalFXSEYKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + tls.key: '' diff --git a/test/resources/case2_long_messages/parent_policy.yaml b/test/resources/case2_long_messages/parent_policy.yaml new file mode 100644 index 00000000..ec2bc6b6 --- /dev/null +++ b/test/resources/case2_long_messages/parent_policy.yaml @@ -0,0 +1,8 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: Policy +metadata: + name: case2 +spec: + remediationAction: inform + disabled: false + policy-templates: []