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

KIND: Fix output path for api conversation generation + Fix webhook ca bundle injection for flow-collector CRD #284

Merged
merged 2 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ CONVERSION_GEN_BIN := conversion-gen
CONVERSION_GEN := $(BIN_DIR)/$(CONVERSION_GEN_BIN)
CONVERSION_GEN_PKG := k8s.io/code-generator/cmd/conversion-gen
# Set --output-base for conversion-gen if we are not within GOPATH
ifneq ($(abspath $(ROOT_DIR)),$(shell go env GOPATH)/src/network-observability-operator)
ifneq ($(findstring $(shell go env GOPATH), $(ROOT_DIR)), $(shell go env GOPATH))
CONVERSION_GEN_OUTPUT_BASE := --output-base=$(ROOT_DIR)
else
export GOPATH := $(shell go env GOPATH)
Expand Down Expand Up @@ -217,7 +217,8 @@ generate-go-conversions: $(CONVERSION_GEN) ## Run all generate-go-conversions
$(CONVERSION_GEN) \
--input-dirs=./api/v1alpha1 \
--build-tag=ignore_autogenerated_core \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE)\
astoycos marked this conversation as resolved.
Show resolved Hide resolved
--output-file-base=zz_generated.conversion \
$(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt

generate: gencode manifests doc generate-go-conversions ## Run all code/file generators
Expand Down
7 changes: 7 additions & 0 deletions config/kubernetes/cainjection_in_flowcollectors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The following patch adds a directive for certmanager to inject CA into the CRD
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: flowcollectors.flows.netobserv.io
1 change: 1 addition & 0 deletions config/kubernetes/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bases:
patchesStrategicMerge:
- manager_webhook_patch.yaml
- webhookcainjection_patch.yaml
- cainjection_in_flowcollectors.yaml

# the following config is for teaching kustomize how to do var substitution
vars:
Expand Down