Skip to content

Commit

Permalink
chore(makefile): simplify kustomize CRD updates (#1545)
Browse files Browse the repository at this point in the history
* chore(makefile): simplify kustomize
* chore(workflows): remove make kustomize-crd step
  • Loading branch information
weisdd authored May 22, 2024
1 parent b773228 commit 24f7a08
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5,092 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,9 @@ jobs:
with:
go-version-file: "go.mod"

- name: Run kustomize-crd
- name: Install kustomize
run: |
make kustomize-crd
- name: Check if working tree is dirty
run: |
if [[ $(git status --porcelain) ]]; then
git diff
echo '::error::run make kustomize-crd or make all and commit changes'
exit 1
fi
make kustomize
- name: Check if overlays can be successfully built
run: |
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec

.PHONY: all
all: manifests test kustomize-crd api-docs
all: manifests test api-docs

##@ General

Expand Down Expand Up @@ -104,10 +104,6 @@ manifests: yq controller-gen ## Generate WebhookConfiguration, ClusterRole and C
cat config/rbac/role.yaml | yq -r 'del(.rules[] | select (.apiGroups | contains(["route.openshift.io"])))' > deploy/helm/grafana-operator/files/rbac.yaml
cat config/rbac/role.yaml | yq -r 'del(.rules[] | select (.apiGroups | contains(["route.openshift.io"]) | not))' > deploy/helm/grafana-operator/files/rbac-openshift.yaml

.PHONY: kustomize-crd
kustomize-crd: kustomize manifests
$(KUSTOMIZE) build config/crd -o deploy/kustomize/base/crds.yaml

# Generate API reference documentation
api-docs: gen-crd-api-reference-docs kustomize
@{ \
Expand Down
Loading

0 comments on commit 24f7a08

Please sign in to comment.