Skip to content

Commit ae4bef1

Browse files
authored
chore: add sync-crds target to Makefile (#1417)
- Introduced a new `sync-crds` target in the Makefile to sync CRDs to the chart directory. - Added `charts/redis-operator/crds/crds.yaml` to define the Redis CRD. - Removed outdated CRD YAML files for Redis resources to streamline the codebase. This update enhances the management of CRDs within the Redis operator, ensuring they are properly synced and organized. Signed-off-by: yangw <[email protected]>
1 parent beb30be commit ae4bef1

File tree

7 files changed

+23970
-23964
lines changed

7 files changed

+23970
-23964
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ undeploy:
112112
manifests: controller-gen
113113
$(CONTROLLER_GEN) crd rbac:roleName=manager-role webhook paths="./api/..." output:crd:artifacts:config=config/crd/bases
114114

115+
# Sync CRDs to chart directory
116+
.PHONY: sync-crds
117+
sync-crds: manifests kustomize
118+
@echo "Syncing CRDs to chart directory..."
119+
$(KUSTOMIZE) build config/crd > charts/redis-operator/crds/crds.yaml
120+
@echo "CRDs synced successfully to charts/redis-operator/crds/crds.yaml"
121+
115122
# Run go fmt against code
116123
.PHONY: fmt
117124
fmt:
@@ -162,7 +169,7 @@ bundle-build:
162169

163170
# Rebuild all generated code
164171
.PHONY: codegen
165-
codegen: generate manifests generate-dataAssert generate-metricsdocs
172+
codegen: generate manifests sync-crds generate-dataAssert generate-metricsdocs
166173

167174
# Verify that codegen is up to date.
168175
.PHONY: verify-codegen

charts/redis-operator/crds/crds.yaml

Lines changed: 23957 additions & 0 deletions
Large diffs are not rendered by default.

charts/redis-operator/crds/redis.redis.opstreelabs.in_redis.yaml

Lines changed: 0 additions & 5371 deletions
This file was deleted.

charts/redis-operator/crds/redis.redis.opstreelabs.in_redisclusters.yaml

Lines changed: 0 additions & 7835 deletions
This file was deleted.

charts/redis-operator/crds/redis.redis.opstreelabs.in_redisreplications.yaml

Lines changed: 0 additions & 5572 deletions
This file was deleted.

charts/redis-operator/crds/redis.redis.opstreelabs.in_redissentinels.yaml

Lines changed: 0 additions & 5180 deletions
This file was deleted.

config/crd/kustomization.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ resources:
88
- bases/redis.redis.opstreelabs.in_redissentinels.yaml
99
# +kubebuilder:scaffold:crdkustomizeresource
1010

11-
patchesStrategicMerge:
1211
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
1312
# patches here are for enabling the CA injection for each CRD
14-
- patches/cainjection_in_redis.yaml
15-
- patches/cainjection_in_redisclusters.yaml
16-
- patches/cainjection_in_redisreplications.yaml
17-
- patches/cainjection_in_redissentinels.yaml
13+
#patchesStrategicMerge:
14+
#- patches/cainjection_in_redis.yaml
15+
#- patches/cainjection_in_redisclusters.yaml
16+
#- patches/cainjection_in_redisreplications.yaml
17+
#- patches/cainjection_in_redissentinels.yaml
1818

1919
# the following config is for teaching kustomize how to do kustomization for CRDs.
2020
configurations:

0 commit comments

Comments
 (0)