Skip to content

Commit

Permalink
Merge pull request #29 from Kshatrix/templates
Browse files Browse the repository at this point in the history
Move all charts into templates directory
  • Loading branch information
Kshatrix authored Jun 14, 2024
2 parents 780675c + 6461042 commit a126ada
Show file tree
Hide file tree
Showing 105 changed files with 7 additions and 7 deletions.
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.
File renamed without changes.
File renamed without changes.
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a126ada

Please sign in to comment.