Skip to content

Commit

Permalink
fix: fixed helm chart generation to include crds directly in the temp…
Browse files Browse the repository at this point in the history
…late (#801)

Signed-off-by: realanna <anna.reale@dynatrace.com>
  • Loading branch information
RealAnna committed Feb 9, 2023
1 parent d19b533 commit f46e603
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ clean-helm-yaml:
build-release-manifests:
$(MAKE) -C operator generate
$(MAKE) -C klt-cert-manager generate
$(MAKE) -C operator release-helm-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH)
$(MAKE) -C operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH)
$(MAKE) -C scheduler release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH)
$(MAKE) -C klt-cert-manager release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH)

Expand Down
1 change: 1 addition & 0 deletions helm/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.tgz
chart/templates/rendered.yaml
chart/templates/crds.yaml
chart/crds/*.yaml
Empty file removed helm/chart/crds/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion helm/overlay/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# import the default deployment as the base
bases:
- ../../operator/config/default/base
- ../../operator/config/default
- ../../klt-cert-manager/config/default
- ../../scheduler/manifests/install
# replace the default namespace with {{ include "chart.namespace" . }}
Expand Down
11 changes: 0 additions & 11 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ help: ## Display this help.
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

.PHONY: gen-crds
gen-crds: manifests #create CustomResourceDefinition objects for helm.
kustomize build config/crd > ../helm/chart/crds/crds.yaml


.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
Expand Down Expand Up @@ -141,12 +136,6 @@ release-manifests: manifests
echo "building default overlay"
kustomize build config/default > config/rendered/release.yaml

.PHONY: release-helm-manifests
release-helm-manifests: manifests gen-crds
echo "building helm overlay"
cd config/manager && kustomize edit set image controller=$(RELEASE_REGISTRY)/$(RELEASE_IMAGE)
kustomize build config/default/base > config/rendered/release.yaml

.PHONY: deploy
deploy: manifests ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && kustomize edit set image controller=${IMG}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnapps.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnappversions.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnevaluationdefinitions.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnevaluationproviders.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnevaluations.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptntaskdefinitions.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptntasks.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnworkloadinstances.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnworkloads.lifecycle.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnmetrics.metrics.keptn.sh
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: keptnconfigs.options.keptn.sh
spec:
Expand Down
29 changes: 0 additions & 29 deletions operator/config/default/base/kustomization.yaml

This file was deleted.

11 changes: 10 additions & 1 deletion operator/config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Adds namespace to all resources.
namespace: keptn-lifecycle-toolkit-system

namePrefix: klc-

bases:
- ../crd
- ./base
- ../rbac
- ../manager
- ../webhook
- ../metrics

patchesStrategicMerge:
- manager_auth_proxy_patch.yaml
- webhooknamespaces_patch.yaml

0 comments on commit f46e603

Please sign in to comment.