Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ lint: lint-custom $(GOLANGCI_LINT) #HELP Run golangci linter.
lint-helm: $(HELM) $(CONFTEST) #HELP Run helm linter
helm lint helm/olmv1
helm lint helm/prometheus
(helm template olmv1 helm/olmv1; helm template prometheus helm/prometheus) | $(CONFTEST) test --policy hack/conftest/policy/ --combine -n main -n prometheus -
(set -euo pipefail; helm template olmv1 helm/olmv1; helm template prometheus helm/prometheus) | $(CONFTEST) test --policy hack/conftest/policy/ --combine -n main -n prometheus -

.PHONY: lint-deployed-resources
lint-deployed-resources: $(KUBE_SCORE) #HELP Lint deployed resources.
lint-deployed-resources: $(KUBE_SCORE) #EXHELP Lint deployed resources.
(for ns in $$(printf "olmv1-system\n%s\n" "$(CATD_NAMESPACE)" | uniq); do \
for resource in $$(kubectl api-resources --verbs=list --namespaced -o name); do \
kubectl get $$resource -n $$ns -o yaml ; \
Expand Down
2 changes: 1 addition & 1 deletion hack/conftest/policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ These policies are automatically run as part of:

```bash
# Run all policies (main + prometheus namespaces)
helm template olmv1 helm/olmv1 | conftest test --policy hack/conftest/policy/ --combine -n main -n prometheus -
(helm template olmv1 helm/olmv1; helm template prometheus helm/prometheus) | conftest test --policy hack/conftest/policy/ --combine -n main -n prometheus -

# Run only OLM policies
helm template olmv1 helm/olmv1 | conftest test --policy hack/conftest/policy/ --combine -n main -
Expand Down
4 changes: 2 additions & 2 deletions hack/conftest/policy/olm-networkpolicies.rego
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ deny contains msg if {
deny contains msg if {
count(catalogd_policies) == 1
not catalogd_has_egress
msg := "Missing egress rules in catalogd-controller-manager NetworkPolicy. General egress is required to enables operator-controller to pull bundle images from arbitrary image registries, connect to catalogd's HTTPS server for metadata, and interact with the Kubernetes API server."
msg := "Missing egress rules in catalogd-controller-manager NetworkPolicy. General egress is required to enable catalogd-controller to pull bundle images from arbitrary image registries, and interact with the Kubernetes API server."
}

# Check that a NetworkPolicy exists for operator-controller-controller-manager that:
Expand Down Expand Up @@ -156,5 +156,5 @@ deny contains msg if {
deny contains msg if {
count(operator_controller_policies) == 1
not operator_controller_has_egress
msg := "Missing egress rules in operator-controller-controller-manager NetworkPolicy. General egress is required to enables operator-controller to pull bundle images from arbitrary image registries, connect to catalogd's HTTPS server for metadata, and interact with the Kubernetes API server."
msg := "Missing egress rules in operator-controller-controller-manager NetworkPolicy. General egress is required to enable operator-controller to pull bundle images from arbitrary image registries, connect to catalogd's HTTPS server for metadata, and interact with the Kubernetes API server."
}
Loading