@@ -8,11 +8,12 @@ SHELL = /usr/bin/env bash -o pipefail
88
99VERSION ?= $(shell cat version.txt | tr -d " \t\n\r")
1010FB_VERSION? =$(shell grep -v '^#' cmd/fluent-watcher/fluentbit/VERSION | tr -d " \t\n\r")
11+ FD_VERSION? =$(shell grep -v '^#' cmd/fluent-watcher/fluentd/VERSION | tr -d " \t\n\r")
1112# Image URL to use all building/pushing image targets
1213FB_IMG ?= ghcr.io/fluent/fluent-operator/fluent-bit:v${FB_VERSION}
1314FB_IMG_DEBUG ?= ghcr.io/fluent/fluent-operator/fluent-bit:v${FB_VERSION}-debug
14- FD_IMG ?= ghcr.io/fluent/fluent-operator/fluentd:v1.19.2
15- FO_IMG ?= kubesphere /fluent-operator:$(VERSION )
15+ FD_IMG ?= ghcr.io/fluent/fluent-operator/fluentd:v${FD_VERSION}
16+ FO_IMG ?= ghcr.io/fluent/fluent-operator /fluent-operator:$(VERSION )
1617
1718ARCH ?= arm64
1819
@@ -51,16 +52,20 @@ help: ## Display this help.
5152shellcheck :
5253 @find . -type f -name * .sh -exec docker run --rm -v $(shell pwd) :/mnt koalaman/shellcheck:stable {} +
5354
55+ MANIFEST_PATHS := ./apis/fluentbit/...;./apis/fluentd/...;./controllers/...
56+
5457.PHONY : manifests
5558manifests : controller-gen # # Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
56- $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./apis/fluentbit/..." output:crd:artifacts:config=config/crd/bases
57- $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./apis/fluentd/..." output:crd:artifacts:config=config/crd/bases
58- $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./apis/fluentbit/..." output:crd:artifacts:config=charts/fluent-operator/crds
59- $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./apis/fluentd/..." output:crd:artifacts:config=charts/fluent-operator/crds
60- $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./apis/fluentbit/..." output:crd:artifacts:config=charts/fluent-operator-fluent-bit-crds/templates
61- $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./apis/fluentd/..." output:crd:artifacts:config=charts/fluent-operator-fluentd-crds/templates
62- kubectl kustomize config/crd/bases/ | sed -e ' /creationTimestamp/d' > manifests/setup/fluent-operator-crd.yaml
63- kubectl kustomize manifests/setup/ | sed -e ' /creationTimestamp/d' > manifests/setup/setup.yaml
59+ $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=fluent-operator webhook \
60+ paths=" $( MANIFEST_PATHS) " \
61+ output:crd:artifacts:config=config/crd/bases
62+ $(CONTROLLER_GEN ) $(CRD_OPTIONS ) paths=" $( MANIFEST_PATHS) " \
63+ output:crd:artifacts:config=charts/fluent-operator/crds
64+ $(CONTROLLER_GEN ) $(CRD_OPTIONS ) paths=" ./apis/fluentbit/...;./controllers/..." \
65+ output:crd:artifacts:config=charts/fluent-operator-fluent-bit-crds/templates
66+ $(CONTROLLER_GEN ) $(CRD_OPTIONS ) paths=" ./apis/fluentd/...;./controllers/..." \
67+ output:crd:artifacts:config=charts/fluent-operator-fluentd-crds/templates
68+ kubectl kustomize config/default/ | sed -e ' /creationTimestamp/d' > manifests/setup/setup.yaml
6469 hack/mutate-crds.sh
6570
6671.PHONY : generate
@@ -135,7 +140,7 @@ build: generate fmt vet ## Build manager binary.
135140 go build -o bin/fd-watcher ./cmd/fluent-watcher/fluentd
136141
137142run : manifests generate fmt vet # # Run a controller from your host.
138- go run cmd/fluent-manager/main.go
143+ go run ./ cmd/fluent-manager/
139144
140145# Build amd64/arm64 Fluent Operator container image
141146.PHONY : build-op
@@ -200,10 +205,10 @@ push-amd64:
200205# #@ Deployment
201206
202207install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config.
203- $(KUSTOMIZE ) build config/crd/bases/ | kubectl create -f -
208+ $(KUSTOMIZE ) build config/crd/ | kubectl create -f -
204209
205210uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
206- $(KUSTOMIZE ) build config/crd/bases/ | kubectl delete -f -
211+ $(KUSTOMIZE ) build config/crd/ | kubectl delete -f -
207212
208213deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
209214 kubectl create -f manifests/setup/setup.yaml
0 commit comments