Skip to content

Commit

Permalink
✨ refactor helm template
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <[email protected]>
  • Loading branch information
vankichi committed May 22, 2023
1 parent c70f07f commit 0607e0b
Show file tree
Hide file tree
Showing 20 changed files with 800 additions and 2,429 deletions.
12 changes: 6 additions & 6 deletions Makefile.d/helm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,23 @@ helm/schema/crd/vald-helm-operator: \
## generate OpenAPI v3 schema for ValdBenchmarkJobRelease
helm/schema/crd/vald-benchmark-job: \
yq/install
mv charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml $(TEMP_DIR)/valdbenchmarkjobrelease.yaml
mv charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml $(TEMP_DIR)/valdbenchmarkjob.yaml
GOPRIVATE=$(GOPRIVATE) \
go run -mod=readonly hack/helm/schema/crd/main.go \
charts/vald-benchmark-operator/schemas/job-values.yaml > $(TEMP_DIR)/valdbenchmarkjobrelease-spec.yaml
charts/vald-benchmark-operator/schemas/job-values.yaml > $(TEMP_DIR)/valdbenchmarkjob-spec.yaml
$(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \
$(TEMP_DIR)/valdbenchmarkjobrelease.yaml $(TEMP_DIR)/valdbenchmarkjobrelease-spec.yaml > charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml
$(TEMP_DIR)/valdbenchmarkjob.yaml $(TEMP_DIR)/valdbenchmarkjob-spec.yaml > charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml

.PHONY: helm/schema/crd/vald-benchmark-scenario
## generate OpenAPI v3 schema for ValdBenchmarkScenarioRelease
helm/schema/crd/vald-benchmark-scenario: \
yq/install
mv charts/vald-benchmark-operator/crds/valdbenchmarkscenariorelease.yaml $(TEMP_DIR)/valdbenchmarkscenariorelease.yaml
mv charts/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml $(TEMP_DIR)/valdbenchmarkscenario.yaml
GOPRIVATE=$(GOPRIVATE) \
go run -mod=readonly hack/helm/schema/crd/main.go \
charts/vald-benchmark-operator/schemas/scenario-values.yaml > $(TEMP_DIR)/valdbenchmarkscenariorelease-spec.yaml
charts/vald-benchmark-operator/schemas/scenario-values.yaml > $(TEMP_DIR)/valdbenchmarkscenario-spec.yaml
$(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \
$(TEMP_DIR)/valdbenchmarkscenariorelease.yaml $(TEMP_DIR)/valdbenchmarkscenariorelease-spec.yaml > charts/vald-benchmark-operator/crds/valdbenchmarkscenariorelease.yaml
$(TEMP_DIR)/valdbenchmarkscenario.yaml $(TEMP_DIR)/valdbenchmarkscenario-spec.yaml > charts/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml

.PHONY: helm/schema/crd/vald-benchmark-operator
## generate OpenAPI v3 schema for ValdBenchmarkOperatorRelease
Expand Down
1 change: 1 addition & 0 deletions Makefile.d/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ k8s/vald-benchmark-operator/deploy:
--include-crds \
charts/vald-benchmark-operator
kubectl create -f $(TEMP_DIR)/vald-benchmark-operator/crds/valdbenchmarkjob.yaml
kubectl create -f $(TEMP_DIR)/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml
kubectl create -f $(TEMP_DIR)/vald-benchmark-operator/crds/valdbenchmarkoperatorrelease.yaml
kubectl apply -f $(TEMP_DIR)/vald-benchmark-operator/templates
sleep 2
Expand Down
322 changes: 148 additions & 174 deletions charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml

Large diffs are not rendered by default.

351 changes: 0 additions & 351 deletions charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml

This file was deleted.

Loading

0 comments on commit 0607e0b

Please sign in to comment.