Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have optional result server #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Have optional result server #590

wants to merge 1 commit into from

Conversation

Vincent056
Copy link

@Vincent056 Vincent056 commented Aug 14, 2024

Adding a Disabled filed in ScanSetting.Spec.RawResultStorage.Disabled, defaulting to false, if setting to true we will not create a result server to store the arf report.

[vincent@node compliance-operator]$ oc get scansetting default -o yaml
apiVersion: compliance.openshift.io/v1alpha1
kind: ScanSetting
maxRetryOnTimeout: 3
metadata:
  creationTimestamp: "2024-08-15T03:38:11Z"
  generation: 2
  name: default
  namespace: openshift-compliance
  resourceVersion: "5259950"
  uid: 7f066043-772e-4c8b-a681-104ffec96a0c
rawResultStorage:
  disabled: true
  nodeSelector:
    node-role.kubernetes.io/master: ""
  pvAccessModes:
  - ReadWriteOnce
  rotation: 3
  size: 1Gi
  tolerations:
  - effect: NoSchedule
    key: node-role.kubernetes.io/master
    operator: Exists
  - effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  - effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
  - effect: NoSchedule
    key: node.kubernetes.io/memory-pressure
    operator: Exists
roles:
- master
- worker
scanTolerations:
- operator: Exists
schedule: 0 1 * * *
showNotApplicable: false
strictNodeScan: true
suspend: false
timeout: 30m

Copy link

openshift-ci bot commented Aug 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Vincent056

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

The pull request process is described here

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

@Vincent056 Vincent056 force-pushed the disable_result branch 3 times, most recently from 6b9593b to c015320 Compare August 15, 2024 00:28
Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:590

Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:590

3 similar comments
Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:590

Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:590

Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:590

Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:590

Adding a Disabled filed in ScanSetting.Spec.RawResultStorage.Disabled, defaulting to false, if setting to true we will not create result server to store arf report.
Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:590-d08ef9452b3a5e348ab0393dfaa1959590074d7c

@Vincent056 Vincent056 requested a review from rhmdnd August 15, 2024 08:03
@xiaojiey
Copy link
Collaborator

verification pass with CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:590-d08ef9452b3a5e348ab0393dfaa1959590074d7c:

% oc get ss disable-rawresultstorage  -o=jsonpath={.rawResultStorage.disabled}
true%                                                                                                                                                                                    
% cat ssb_test_raw_result_storage.yaml 
apiVersion: compliance.openshift.io/v1alpha1
kind: ScanSettingBinding
metadata:
  name: stig-compliance
  namespace: openshift-compliance
profiles:
  - name: ocp4-stig-node
    kind: Profile
    apiGroup: compliance.openshift.io/v1alpha1
  - name: ocp4-stig
    kind: Profile
    apiGroup: compliance.openshift.io/v1alpha1
  - name: rhcos4-stig
    kind: Profile
    apiGroup: compliance.openshift.io/v1alpha1
settingsRef:
  name: disable-rawresultstorage
  kind: ScanSetting
  apiGroup: compliance.openshift.io/v1alpha1
% oc apply -f ssb_test_raw_result_storage.yaml 
scansettingbinding.compliance.openshift.io/stig-compliance created
% oc get suite -w
NAME              PHASE     RESULT
stig-compliance   RUNNING   NOT-AVAILABLE
stig-compliance   RUNNING   NOT-AVAILABLE
stig-compliance   RUNNING   NOT-AVAILABLE
stig-compliance   RUNNING   NOT-AVAILABLE
stig-compliance   RUNNING   NOT-AVAILABLE
stig-compliance   RUNNING   NOT-AVAILABLE
stig-compliance   RUNNING   NOT-AVAILABLE
stig-compliance   AGGREGATING   NOT-AVAILABLE
stig-compliance   AGGREGATING   NOT-AVAILABLE
stig-compliance   DONE          NON-COMPLIANT
stig-compliance   DONE          NON-COMPLIANT
^C%                                                                                                                                                                                      
% oc get pv
No resources found
% oc get pvc
No resources found in openshift-compliance namespace.
% oc get pv
No resources found

@rhmdnd rhmdnd added this to the 1.7.0 milestone Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants