Skip to content

Commit 532134a

Browse files
author
Mateus Oliveira
authored
🐛 fix make build-installer command to remove CRD duplication (#3814)
fix: Remove make build-installer duplication Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
1 parent f266458 commit 532134a

File tree

12 files changed

+9
-520
lines changed

12 files changed

+9
-520
lines changed

docs/book/src/component-config-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,8 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
118118
.PHONY: build-installer
119119
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
120120
mkdir -p dist
121-
echo "---" > dist/install.yaml # Clean previous content
122-
@if [ -d "config/crd" ]; then \
123-
$(KUSTOMIZE) build config/crd > dist/install.yaml; \
124-
echo "---" >> dist/install.yaml; \
125-
fi
126121
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
127-
$(KUSTOMIZE) build config/default >> dist/install.yaml
122+
$(KUSTOMIZE) build config/default > dist/install.yaml
128123

129124
##@ Deployment
130125

docs/book/src/cronjob-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,8 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
118118
.PHONY: build-installer
119119
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
120120
mkdir -p dist
121-
echo "---" > dist/install.yaml # Clean previous content
122-
@if [ -d "config/crd" ]; then \
123-
$(KUSTOMIZE) build config/crd > dist/install.yaml; \
124-
echo "---" >> dist/install.yaml; \
125-
fi
126121
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
127-
$(KUSTOMIZE) build config/default >> dist/install.yaml
122+
$(KUSTOMIZE) build config/default > dist/install.yaml
128123

129124
##@ Deployment
130125

docs/book/src/getting-started/testdata/project/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,8 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
118118
.PHONY: build-installer
119119
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
120120
mkdir -p dist
121-
echo "---" > dist/install.yaml # Clean previous content
122-
@if [ -d "config/crd" ]; then \
123-
$(KUSTOMIZE) build config/crd > dist/install.yaml; \
124-
echo "---" >> dist/install.yaml; \
125-
fi
126121
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
127-
$(KUSTOMIZE) build config/default >> dist/install.yaml
122+
$(KUSTOMIZE) build config/default > dist/install.yaml
128123

129124
##@ Deployment
130125

pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,8 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
196196
.PHONY: build-installer
197197
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
198198
mkdir -p dist
199-
echo "---" > dist/install.yaml # Clean previous content
200-
@if [ -d "config/crd" ]; then \
201-
$(KUSTOMIZE) build config/crd > dist/install.yaml; \
202-
echo "---" >> dist/install.yaml; \
203-
fi
204199
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
205-
$(KUSTOMIZE) build config/default >> dist/install.yaml
200+
$(KUSTOMIZE) build config/default > dist/install.yaml
206201
207202
##@ Deployment
208203

testdata/project-v4-multigroup-with-deploy-image/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,8 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
118118
.PHONY: build-installer
119119
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
120120
mkdir -p dist
121-
echo "---" > dist/install.yaml # Clean previous content
122-
@if [ -d "config/crd" ]; then \
123-
$(KUSTOMIZE) build config/crd > dist/install.yaml; \
124-
echo "---" >> dist/install.yaml; \
125-
fi
126121
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
127-
$(KUSTOMIZE) build config/default >> dist/install.yaml
122+
$(KUSTOMIZE) build config/default > dist/install.yaml
128123

129124
##@ Deployment
130125

testdata/project-v4-multigroup/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,8 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
118118
.PHONY: build-installer
119119
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
120120
mkdir -p dist
121-
echo "---" > dist/install.yaml # Clean previous content
122-
@if [ -d "config/crd" ]; then \
123-
$(KUSTOMIZE) build config/crd > dist/install.yaml; \
124-
echo "---" >> dist/install.yaml; \
125-
fi
126121
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
127-
$(KUSTOMIZE) build config/default >> dist/install.yaml
122+
$(KUSTOMIZE) build config/default > dist/install.yaml
128123

129124
##@ Deployment
130125

testdata/project-v4-with-deploy-image/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,8 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
118118
.PHONY: build-installer
119119
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
120120
mkdir -p dist
121-
echo "---" > dist/install.yaml # Clean previous content
122-
@if [ -d "config/crd" ]; then \
123-
$(KUSTOMIZE) build config/crd > dist/install.yaml; \
124-
echo "---" >> dist/install.yaml; \
125-
fi
126121
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
127-
$(KUSTOMIZE) build config/default >> dist/install.yaml
122+
$(KUSTOMIZE) build config/default > dist/install.yaml
128123

129124
##@ Deployment
130125

testdata/project-v4-with-deploy-image/dist/install.yaml

Lines changed: 0 additions & 273 deletions
Original file line numberDiff line numberDiff line change
@@ -1,276 +1,3 @@
1-
apiVersion: apiextensions.k8s.io/v1
2-
kind: CustomResourceDefinition
3-
metadata:
4-
annotations:
5-
controller-gen.kubebuilder.io/version: v0.14.0
6-
name: busyboxes.example.com.testproject.org
7-
spec:
8-
group: example.com.testproject.org
9-
names:
10-
kind: Busybox
11-
listKind: BusyboxList
12-
plural: busyboxes
13-
singular: busybox
14-
scope: Namespaced
15-
versions:
16-
- name: v1alpha1
17-
schema:
18-
openAPIV3Schema:
19-
description: Busybox is the Schema for the busyboxes API
20-
properties:
21-
apiVersion:
22-
description: |-
23-
APIVersion defines the versioned schema of this representation of an object.
24-
Servers should convert recognized schemas to the latest internal value, and
25-
may reject unrecognized values.
26-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
27-
type: string
28-
kind:
29-
description: |-
30-
Kind is a string value representing the REST resource this object represents.
31-
Servers may infer this from the endpoint the client submits requests to.
32-
Cannot be updated.
33-
In CamelCase.
34-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
35-
type: string
36-
metadata:
37-
type: object
38-
spec:
39-
description: BusyboxSpec defines the desired state of Busybox
40-
properties:
41-
size:
42-
description: |-
43-
Size defines the number of Busybox instances
44-
The following markers will use OpenAPI v3 schema to validate the value
45-
More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
46-
format: int32
47-
maximum: 3
48-
minimum: 1
49-
type: integer
50-
type: object
51-
status:
52-
description: BusyboxStatus defines the observed state of Busybox
53-
properties:
54-
conditions:
55-
items:
56-
description: "Condition contains details for one aspect of the current
57-
state of this API Resource.\n---\nThis struct is intended for
58-
direct use as an array at the field path .status.conditions. For
59-
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
60-
observations of a foo's current state.\n\t // Known .status.conditions.type
61-
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
62-
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
63-
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
64-
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
65-
\ // other fields\n\t}"
66-
properties:
67-
lastTransitionTime:
68-
description: |-
69-
lastTransitionTime is the last time the condition transitioned from one status to another.
70-
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
71-
format: date-time
72-
type: string
73-
message:
74-
description: |-
75-
message is a human readable message indicating details about the transition.
76-
This may be an empty string.
77-
maxLength: 32768
78-
type: string
79-
observedGeneration:
80-
description: |-
81-
observedGeneration represents the .metadata.generation that the condition was set based upon.
82-
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
83-
with respect to the current state of the instance.
84-
format: int64
85-
minimum: 0
86-
type: integer
87-
reason:
88-
description: |-
89-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
90-
Producers of specific condition types may define expected values and meanings for this field,
91-
and whether the values are considered a guaranteed API.
92-
The value should be a CamelCase string.
93-
This field may not be empty.
94-
maxLength: 1024
95-
minLength: 1
96-
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
97-
type: string
98-
status:
99-
description: status of the condition, one of True, False, Unknown.
100-
enum:
101-
- "True"
102-
- "False"
103-
- Unknown
104-
type: string
105-
type:
106-
description: |-
107-
type of condition in CamelCase or in foo.example.com/CamelCase.
108-
---
109-
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
110-
useful (see .node.status.conditions), the ability to deconflict is important.
111-
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
112-
maxLength: 316
113-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
114-
type: string
115-
required:
116-
- lastTransitionTime
117-
- message
118-
- reason
119-
- status
120-
- type
121-
type: object
122-
type: array
123-
type: object
124-
type: object
125-
served: true
126-
storage: true
127-
subresources:
128-
status: {}
129-
---
130-
apiVersion: apiextensions.k8s.io/v1
131-
kind: CustomResourceDefinition
132-
metadata:
133-
annotations:
134-
controller-gen.kubebuilder.io/version: v0.14.0
135-
name: memcacheds.example.com.testproject.org
136-
spec:
137-
conversion:
138-
strategy: Webhook
139-
webhook:
140-
clientConfig:
141-
service:
142-
name: webhook-service
143-
namespace: system
144-
path: /convert
145-
conversionReviewVersions:
146-
- v1
147-
group: example.com.testproject.org
148-
names:
149-
kind: Memcached
150-
listKind: MemcachedList
151-
plural: memcacheds
152-
singular: memcached
153-
scope: Namespaced
154-
versions:
155-
- name: v1alpha1
156-
schema:
157-
openAPIV3Schema:
158-
description: Memcached is the Schema for the memcacheds API
159-
properties:
160-
apiVersion:
161-
description: |-
162-
APIVersion defines the versioned schema of this representation of an object.
163-
Servers should convert recognized schemas to the latest internal value, and
164-
may reject unrecognized values.
165-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
166-
type: string
167-
kind:
168-
description: |-
169-
Kind is a string value representing the REST resource this object represents.
170-
Servers may infer this from the endpoint the client submits requests to.
171-
Cannot be updated.
172-
In CamelCase.
173-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
174-
type: string
175-
metadata:
176-
type: object
177-
spec:
178-
description: MemcachedSpec defines the desired state of Memcached
179-
properties:
180-
containerPort:
181-
description: Port defines the port that will be used to init the container
182-
with the image
183-
format: int32
184-
type: integer
185-
size:
186-
description: |-
187-
Size defines the number of Memcached instances
188-
The following markers will use OpenAPI v3 schema to validate the value
189-
More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
190-
format: int32
191-
maximum: 3
192-
minimum: 1
193-
type: integer
194-
type: object
195-
status:
196-
description: MemcachedStatus defines the observed state of Memcached
197-
properties:
198-
conditions:
199-
items:
200-
description: "Condition contains details for one aspect of the current
201-
state of this API Resource.\n---\nThis struct is intended for
202-
direct use as an array at the field path .status.conditions. For
203-
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
204-
observations of a foo's current state.\n\t // Known .status.conditions.type
205-
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
206-
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
207-
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
208-
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
209-
\ // other fields\n\t}"
210-
properties:
211-
lastTransitionTime:
212-
description: |-
213-
lastTransitionTime is the last time the condition transitioned from one status to another.
214-
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
215-
format: date-time
216-
type: string
217-
message:
218-
description: |-
219-
message is a human readable message indicating details about the transition.
220-
This may be an empty string.
221-
maxLength: 32768
222-
type: string
223-
observedGeneration:
224-
description: |-
225-
observedGeneration represents the .metadata.generation that the condition was set based upon.
226-
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
227-
with respect to the current state of the instance.
228-
format: int64
229-
minimum: 0
230-
type: integer
231-
reason:
232-
description: |-
233-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
234-
Producers of specific condition types may define expected values and meanings for this field,
235-
and whether the values are considered a guaranteed API.
236-
The value should be a CamelCase string.
237-
This field may not be empty.
238-
maxLength: 1024
239-
minLength: 1
240-
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
241-
type: string
242-
status:
243-
description: status of the condition, one of True, False, Unknown.
244-
enum:
245-
- "True"
246-
- "False"
247-
- Unknown
248-
type: string
249-
type:
250-
description: |-
251-
type of condition in CamelCase or in foo.example.com/CamelCase.
252-
---
253-
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
254-
useful (see .node.status.conditions), the ability to deconflict is important.
255-
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
256-
maxLength: 316
257-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
258-
type: string
259-
required:
260-
- lastTransitionTime
261-
- message
262-
- reason
263-
- status
264-
- type
265-
type: object
266-
type: array
267-
type: object
268-
type: object
269-
served: true
270-
storage: true
271-
subresources:
272-
status: {}
273-
---
2741
apiVersion: v1
2752
kind: Namespace
2763
metadata:

testdata/project-v4-with-grafana/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,8 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
118118
.PHONY: build-installer
119119
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
120120
mkdir -p dist
121-
echo "---" > dist/install.yaml # Clean previous content
122-
@if [ -d "config/crd" ]; then \
123-
$(KUSTOMIZE) build config/crd > dist/install.yaml; \
124-
echo "---" >> dist/install.yaml; \
125-
fi
126121
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
127-
$(KUSTOMIZE) build config/default >> dist/install.yaml
122+
$(KUSTOMIZE) build config/default > dist/install.yaml
128123

129124
##@ Deployment
130125

0 commit comments

Comments
 (0)