Skip to content

Add ScheduledComplianceScan API#36

Merged
gardener-prow[bot] merged 5 commits intogardener:mainfrom
AleksandarSavchev:add-scheduledcompliancescan-api
Apr 14, 2026
Merged

Add ScheduledComplianceScan API#36
gardener-prow[bot] merged 5 commits intogardener:mainfrom
AleksandarSavchev:add-scheduledcompliancescan-api

Conversation

@AleksandarSavchev
Copy link
Copy Markdown
Member

@AleksandarSavchev AleksandarSavchev commented Mar 31, 2026

How to categorize this PR?

/area compliance
/kind enhancement

What this PR does / why we need it:
This PR add the ScheduledComplianceRun API:

apiVersion: diki.gardener.cloud/v1alpha1
kind: ScheduledComplianceScan
metadata:
  name: example-scheduledcompliancescan
spec:
  schedule: "0 0 * * *" # cron format
  successfulScansHistoryLimit: 3 # number of completed scans to keep
  failedScansHistoryLimit: 1 # number of failed scans to keep
  scanTemplate:
    spec:
      rulesets:
        - id: security-hardened-k8s
          version: v0.1.0
          options:
            rules:
              configMapRef:
                name: diki-options
                namespace: kube-system
status:
  active: <obj ref> # active ComplianceScan (object reference)
  lastScheduleTime: "2025-12-31T23:59:59Z"
  lastCompletionTime: "2025-12-31T23:59:59Z"

Which issue(s) this PR fixes:
Part of #3

Special notes for your reviewer:

Release note:

Add the `ScheduledComplianceScan` API, used to schedule `ComplianceScan` resources.

@gardener-prow gardener-prow bot added area/compliance Compliance related kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 31, 2026
@AleksandarSavchev AleksandarSavchev force-pushed the add-scheduledcompliancescan-api branch from ce34c2c to afb5040 Compare April 1, 2026 11:41
@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@georgibaltiev georgibaltiev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
I have only one nit, and a few questions that I would like to discuss, possibly for future enhancements.

Comment thread pkg/apis/diki/types_scheduledcompliancescan.go
Comment thread pkg/apis/diki/v1alpha1/types_scheduledcompliancescan.go
Comment thread charts/diki/crds/diki.gardener.cloud_scheduledcompliancescans.yaml
Comment thread pkg/apis/diki/v1alpha1/types_scheduledcompliancescan.go
@georgibaltiev
Copy link
Copy Markdown
Contributor

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2026
@gardener-prow
Copy link
Copy Markdown

gardener-prow bot commented Apr 14, 2026

LGTM label has been added.

DetailsGit tree hash: 1a2c3257b4bce95e113ce0fea3f0d86166530eeb

Copy link
Copy Markdown
Member

@dimityrmirchev dimityrmirchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@gardener-prow
Copy link
Copy Markdown

gardener-prow bot commented Apr 14, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dimityrmirchev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 14, 2026
@gardener-prow gardener-prow bot merged commit 8e21743 into gardener:main Apr 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/compliance Compliance related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants