Skip to content

Commit b7fcacd

Browse files
committed
Fix unaddressed comments on PR operator-framework#2393
1 parent 08436e0 commit b7fcacd

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ lint: lint-custom $(GOLANGCI_LINT) #HELP Run golangci linter.
125125
lint-helm: $(HELM) $(CONFTEST) #HELP Run helm linter
126126
helm lint helm/olmv1
127127
helm lint helm/prometheus
128-
(helm template olmv1 helm/olmv1; helm template prometheus helm/prometheus) | $(CONFTEST) test --policy hack/conftest/policy/ --combine -n main -n prometheus -
128+
(set -euo pipefail; helm template olmv1 helm/olmv1; helm template prometheus helm/prometheus) | $(CONFTEST) test --policy hack/conftest/policy/ --combine -n main -n prometheus -
129129

130130
.PHONY: lint-deployed-resources
131-
lint-deployed-resources: $(KUBE_SCORE) #HELP Lint deployed resources.
131+
lint-deployed-resources: $(KUBE_SCORE) #EXHELP Lint deployed resources.
132132
(for ns in $$(printf "olmv1-system\n%s\n" "$(CATD_NAMESPACE)" | uniq); do \
133133
for resource in $$(kubectl api-resources --verbs=list --namespaced -o name); do \
134134
kubectl get $$resource -n $$ns -o yaml ; \

hack/conftest/policy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ These policies are automatically run as part of:
4141

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

4646
# Run only OLM policies
4747
helm template olmv1 helm/olmv1 | conftest test --policy hack/conftest/policy/ --combine -n main -

hack/conftest/policy/olm-networkpolicies.rego

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ deny contains msg if {
101101
deny contains msg if {
102102
count(catalogd_policies) == 1
103103
not catalogd_has_egress
104-
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."
104+
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."
105105
}
106106

107107
# Check that a NetworkPolicy exists for operator-controller-controller-manager that:
@@ -156,5 +156,5 @@ deny contains msg if {
156156
deny contains msg if {
157157
count(operator_controller_policies) == 1
158158
not operator_controller_has_egress
159-
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."
159+
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."
160160
}

0 commit comments

Comments
 (0)