Skip to content

Commit 913cfdb

Browse files
committed
Remove helmify / kustomize, switch to helm-chart only.
This PR removes the helmify step and removes kustomize as an option to render the manager/rbacs/crd. Helmify took a lot of work creating a helm-chart based on the boilerplate generated by kubebuilder. But ultimatively, it imposes too many constraints to the outcome of the helm-chart and makes it hard to implement custom renditions (like using .AppVersion as a image tag). Thus this PR is removing the kustomize files, leaving only the generated CRDs in the config directory (which don't need any templating) and symlinks it to the helm chart.
1 parent 9223a83 commit 913cfdb

36 files changed

Lines changed: 7 additions & 1515 deletions

.github/workflows/container-registry-ghcr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
username: ${{ github.actor }}
3131
- name: Extract metadata (tags, labels) for Docker
3232
id: meta
33-
uses: docker/metadata-action@v5
33+
uses: docker/metadata-action@v6
3434
with:
3535
images: ghcr.io/${{ github.repository }}
3636
tags: |
@@ -45,7 +45,7 @@ jobs:
4545
# https://github.com/docker/metadata-action#typesha
4646
type=sha,format=long
4747
- name: Set up QEMU
48-
uses: docker/setup-qemu-action@v3
48+
uses: docker/setup-qemu-action@v4
4949
- name: Set up Docker Buildx
5050
uses: docker/setup-buildx-action@v4
5151
- name: Build and push Docker image

.pre-commit-config.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,3 @@ repos:
3131
entry: sh -c "gmake check || make check"
3232
language: system
3333
pass_filenames: false
34-
- id: helmify
35-
name: helmify
36-
entry: sh -c "gmake helmify || make helmify"
37-
language: system
38-
pass_filenames: false
39-
- id: go-build
40-
name: go build
41-
entry: sh -c "gmake build-all || make build-all"
42-
language: system
43-
pass_filenames: false

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ check: FORCE static-check build/cover.html build-all
125125

126126
generate: install-controller-gen
127127
@printf "\e[1;36m>> controller-gen\e[0m\n"
128-
@controller-gen crd rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
128+
@controller-gen crd rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=charts/kvm-node-agent/crds
129129
@controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
130130
@controller-gen applyconfiguration paths="./..."
131131

Makefile.maker.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ binaries:
77

88
controllerGen:
99
enabled: true
10-
crdOutputPath: config/crd/bases
10+
crdOutputPath: charts/kvm-node-agent/crds
1111
objectHeaderFile: hack/boilerplate.go.txt
1212
rbacRoleName: manager-role
1313

@@ -81,8 +81,4 @@ verbatim: |
8181
8282
.PHONY: install-crds
8383
install-crds: generate ## Install CRDs into the K8s cluster specified in ~/.kube/config.
84-
kubectl kustomize config/crd | kubectl apply -f -
85-
86-
.PHONY: helmify
87-
helmify:
88-
kubectl kustomize config/default | helmify -crd-dir charts/kvm-node-agent
84+
kubectl apply -f config/crd/*.yaml
File renamed without changes.

charts/kvm-node-agent/crds/migration-crd.yaml

Lines changed: 0 additions & 156 deletions
This file was deleted.

charts/kvm-node-agent/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ controllerManager:
2020
pkiPath: /pki
2121
image:
2222
repository: ghcr.io/cobaltcore-dev/kvm-node-agent
23-
tag: latest
2423
resources:
2524
limits:
2625
cpu: 500m

0 commit comments

Comments
 (0)