Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all charts into templates directory #29

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and

.PHONY: hmc-chart-generate
hmc-chart-generate: kustomize helmify ## Generate hmc helm chart
rm -rf charts/hmc/values.yaml charts/hmc/templates/*.yaml
$(KUSTOMIZE) build config/default | $(HELMIFY) charts/hmc
rm -rf templates/hmc/values.yaml templates/hmc/templates/*.yaml
$(KUSTOMIZE) build config/default | $(HELMIFY) templates/hmc

.PHONY: generate-all
generate-all: generate manifests hmc-chart-generate
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/template_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const (
TemplateTypeDeployment TemplateType = "deployment"
// TemplateTypeProvider is the type used for adding CAPI providers in the HMC Management object.
TemplateTypeProvider TemplateType = "provider"
// TemplateTypeManagement is the type used for HMC management components
TemplateTypeManagement TemplateType = "management"
// TemplateTypeCore is the type used for HMC and CAPI core components
TemplateTypeCore TemplateType = "core"
)

// TemplateSpec defines the desired state of Template
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/template_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (r *TemplateReconciler) parseChartMetadata(template *hmc.Template, chart *c
}
templateType := chart.Metadata.Annotations[hmc.ChartAnnotationType]
switch hmc.TemplateType(templateType) {
case hmc.TemplateTypeDeployment, hmc.TemplateTypeProvider, hmc.TemplateTypeManagement:
case hmc.TemplateTypeDeployment, hmc.TemplateTypeProvider, hmc.TemplateTypeCore:
default:
return errNoProviderType
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ version: 0.1.0
# It is recommended to use it with quotes.
appVersion: "0.1.0"
annotations:
hmc.mirantis.com/type: management
hmc.mirantis.com/type: core
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion charts/hmc/Chart.yaml → templates/hmc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ version: 0.1.0
# It is recommended to use it with quotes.
appVersion: "0.1.0"
annotations:
hmc.mirantis.com/type: management
hmc.mirantis.com/type: core
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading