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

chore(manifests): improve manifest generation #105

Merged
merged 9 commits into from
May 2, 2023
22 changes: 19 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,30 @@ jobs:
go-version: "1.19"
- name: Run tests
run: make test


check-codegen:
corrieriluca marked this conversation as resolved.
Show resolved Hide resolved
name: Check Codegen
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Generate manifests
run: make manifests
- name: Check nothing has changed
run: |
git diff --exit-code ./manifests

build-and-push:
name: Build & Push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -40,7 +56,7 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get Build timestamp and branch name
run: |
echo "BUILD_TIMESTAMP=$(date +'%s')" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
echo "BUILD_TIMESTAMP=$(date +'%s')" >> $GITHUB_ENV
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
echo "COMMIT_HASH=${{ github.sha }}" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ help: ## Display this help.
##@ Development

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
manifests: controller-gen kustomize ## Generate CustomResourceDefinition objects and plain manifest for installing Burrito. For generating Webhook and ClusterRole, add `rbac:roleName=manager-role crd` to the controller-gen command.
$(CONTROLLER_GEN) crd paths="./..." output:crd:dir=manifests/crds
echo "# This is an auto-generated file. DO NOT EDIT" > manifests/install.yaml
$(KUSTOMIZE) build manifests/cluster-install >> manifests/install.yaml

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down
24 changes: 0 additions & 24 deletions config/crd/kustomization.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions config/crd/kustomizeconfig.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions config/crd/patches/cainjection_in_terraformlayers.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions config/crd/patches/cainjection_in_terraformrepositories.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions config/crd/patches/webhook_in_terraformlayers.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions config/crd/patches/webhook_in_terraformrepositories.yaml

This file was deleted.

72 changes: 0 additions & 72 deletions config/default/kustomization.yaml

This file was deleted.

55 changes: 0 additions & 55 deletions config/default/manager_auth_proxy_patch.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions config/default/manager_config_patch.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions config/manager/kustomization.yaml

This file was deleted.

Loading