openshift / compliance-operator

Operator providing OpenShift cluster compliance checks
Apache License 2.0
110 stars 110 forks source link

Add a Helm chart for deploying the compliance-operator #773

Closed rhmdnd closed 2 years ago

rhmdnd commented 2 years ago

As we integrate support for deploying the compliance operator on other distributions (like EKS), we can't guarantee users will install using the OLM or OperatorHub. At the same time, we can try to provide something better than installing from source.

This commit introduces a helm chart that deploys the compliance-operator.

rhmdnd commented 2 years ago

There is still a lot of things to clean up here, but this is a rough draft of where I got today.

Vincent056 commented 2 years ago

Thanks for the PR, I think this PR looks much cleaner than the last one, so we would only need to maintain deploy/compliance-operator-chart/templates/deployment.yaml, deploy/compliance-operator-chart/templates/scansettingbinding.yaml, and those default values?

I was trying out this PR, saw

[vincent@fedora-ws compliance-operator-chart]$ helm install --namespace openshift-compliance --generate-name .
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/vincent/.ocp-clusters/cluster-deploy-wenshen-51//auth/kubeconfig
Error: template: compliance-operator-chart/templates/deployment.yaml:4:11: executing "compliance-operator-chart/templates/deployment.yaml" at <include "compliance-operator-chart.fullname" .>: error calling include: template: no template "compliance-operator-chart.fullname" associated with template "gotpl"

Do you think I missed something?

rhmdnd commented 2 years ago

Nope - you're right. I forgot to include the _helpers.tpl. I updated the PR, it should be there if you try it again.

rhmdnd commented 2 years ago

Correct. The CRDs are symlink'd to the existing location in deploy/crds/. The majority of what we will have to maintain is in the templates directory and the default values.

mrogers950 commented 2 years ago

@rhmdnd LGTM, if you can squash the commits, I'm OK with merging it.

rhmdnd commented 2 years ago

Done - thanks for the reviews.

openshift-ci[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd, 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: - ~~[OWNERS](https://github.com/openshift/compliance-operator/blob/master/OWNERS)~~ [Vincent056] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
rhmdnd commented 2 years ago

/retest

rhmdnd commented 2 years ago

/retest

openshift-ci[bot] commented 2 years ago

@rhmdnd: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
mrogers950 commented 2 years ago

/lgtm