Skip to content

Commit

Permalink
fix: Empty array in LogPipeline CRD (#1620)
Browse files Browse the repository at this point in the history
  • Loading branch information
skhalash authored Nov 21, 2024
1 parent 2b4e96e commit 1b19a1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ manifests: $(CONTROLLER_GEN) $(YQ) $(YAMLFMT) ## Generate WebhookConfiguration,
$(CONTROLLER_GEN) crd paths="./apis/telemetry/v1alpha1" output:crd:artifacts:config=config/crd/bases
$(YQ) eval 'del(.. | select(has("otlp")).otlp)' -i ./config/crd/bases/telemetry.kyma-project.io_logpipelines.yaml
$(YQ) eval 'del(.. | select(has("x-kubernetes-validations"))."x-kubernetes-validations"[] | select(.rule|contains("otlp")) )' -i ./config/crd/bases/telemetry.kyma-project.io_logpipelines.yaml

## Remove empty x-kubernetes-validations arrays from logpipeline crd that can be caused by previous yq manipulations
$(YQ) eval 'del(.. | select(select(has("x-kubernetes-validations"))."x-kubernetes-validations" | length == 0)."x-kubernetes-validations")' -i ./config/crd/bases/telemetry.kyma-project.io_logpipelines.yaml

.PHONY: manifests-dev
manifests-dev: $(CONTROLLER_GEN) ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition for v1alpha1 and v1beta1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ spec:
type: object
type: array
type: object
x-kubernetes-validations: []
status:
description: Shows the observed state of the LogPipeline
properties:
Expand Down

0 comments on commit 1b19a1e

Please sign in to comment.