-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathMakefile.reconcilermanager
More file actions
41 lines (38 loc) · 2.23 KB
/
Makefile.reconcilermanager
File metadata and controls
41 lines (38 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
CONTROLLER_GEN_PATHS := \
paths="./pkg/api/configsync/v1alpha1" \
paths="./pkg/api/configsync/v1beta1" \
paths="./pkg/api/configmanagement/v1" \
paths="./pkg/api/kpt.dev/v1alpha1"
.PHONY: generate
# Generate DeepCopy and runtime.Object implementation methods.
generate: "$(CONTROLLER_GEN)"
"$(CONTROLLER_GEN)" \
object:headerFile="hack/boilerplate.txt" \
$(CONTROLLER_GEN_PATHS)
.PHONY: configsync-crds
# Generate configsync CRDs and then patch them with kustomize
configsync-crds: "$(CONTROLLER_GEN)" "$(KUSTOMIZE)" "$(ADDLICENSE)"
"$(CONTROLLER_GEN)" crd \
$(CONTROLLER_GEN_PATHS) \
output:artifacts:config=./manifests \
&& mv ./manifests/configsync.gke.io_reposyncs.yaml ./manifests/patch/reposync-crd.yaml \
&& mv ./manifests/configsync.gke.io_rootsyncs.yaml ./manifests/patch/rootsync-crd.yaml \
&& mv ./manifests/configmanagement.gke.io_clusterselectors.yaml ./manifests/patch/cluster-selector-crd.yaml \
&& mv ./manifests/configmanagement.gke.io_hierarchyconfigs.yaml ./manifests/patch/hierarchyconfig-crd.yaml \
&& mv ./manifests/configmanagement.gke.io_namespaceselectors.yaml ./manifests/patch/namespace-selector-crd.yaml \
&& mv ./manifests/kpt.dev_resourcegroups.yaml ./manifests/patch/resourcegroup-crd.yaml \
&& "$(KUSTOMIZE)" build ./manifests/patch -o ./manifests \
&& mv ./manifests/*customresourcedefinition_rootsyncs* ./manifests/rootsync-crd.yaml \
&& mv ./manifests/*customresourcedefinition_reposyncs* ./manifests/reposync-crd.yaml \
&& mv ./manifests/*customresourcedefinition_clusterselectors* ./manifests/cluster-selector-crd.yaml \
&& mv ./manifests/*customresourcedefinition_hierarchyconfigs* ./manifests/hierarchyconfig-crd.yaml \
&& mv ./manifests/*customresourcedefinition_namespaceselectors* ./manifests/namespace-selector-crd.yaml \
&& mv ./manifests/*customresourcedefinition_resourcegroups* ./manifests/resourcegroup-crd.yaml \
&& rm ./manifests/patch/reposync-crd.yaml \
&& rm ./manifests/patch/rootsync-crd.yaml \
&& rm ./manifests/patch/cluster-selector-crd.yaml \
&& rm ./manifests/patch/hierarchyconfig-crd.yaml \
&& rm ./manifests/patch/namespace-selector-crd.yaml \
&& rm ./manifests/patch/resourcegroup-crd.yaml \
&& rm ./manifests/configmanagement.gke.io_repoes.yaml \
&& "$(ADDLICENSE)" ./manifests