Skip to content

Commit d9ce8d2

Browse files
committed
Template componnets charts
1 parent aadc70f commit d9ce8d2

File tree

27 files changed

+73
-67
lines changed

27 files changed

+73
-67
lines changed

.gitignore

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
*.build
2+
*.egg-info/
3+
*.python-version
4+
*.venv*
5+
.DS_Store
6+
.coverage
17
.idea
28
.idea/*
3-
.coverage
4-
*.venv*
5-
common_libs/
6-
reports/
79
__pycache__/
8-
*.egg-info/
910
build/
10-
.DS_Store
11-
*.python-version
11+
common_libs/
12+
reports/

Makefile.shared

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ BASE_OTE_V2_IMAGE_TAG ?= 12.8.1.1.30
2727
###
2828
# component
2929
###
30-
CHART_DIR := ./chart
30+
CHART_DIR_TEMPLATE := ./chart
31+
CHART_YAML_TEMPLATE := ${CHART_DIR_TEMPLATE}/Chart.yaml.template
32+
CHART_DIR := ${CHART_DIR_TEMPLATE}/.build
3133
CHART_YAML := ${CHART_DIR}/Chart.yaml
32-
COMPONENT_NAME := $(shell grep '^name:' ${CHART_YAML} | sed 's/^name: //')
34+
COMPONENT_NAME := $(shell grep '^name:' ${CHART_YAML_TEMPLATE} | sed 's/^name: //')
3335
###
3436
# docker configuration
3537
###
@@ -80,14 +82,25 @@ push-image:
8082
# helm charts
8183
###
8284
lint-chart-default:
85+
mkdir -p ${CHART_DIR}
86+
cp ${CHART_YAML_TEMPLATE} ${CHART_YAML}
87+
yq e '.version = "${TAG}"' -i ${CHART_YAML}
88+
yq e '.appVersion = "${TAG}"' -i ${CHART_YAML}
8389
@echo "Running chart linter for component: ${COMPONENT_NAME}"
8490
helm lint --with-subcharts $(dir ${CHART_YAML})
8591

8692
publish-chart:
93+
mkdir -p ${CHART_DIR}
94+
cp ${CHART_YAML_TEMPLATE} ${CHART_YAML}
95+
yq e '.version = "${TAG}"' -i ${CHART_YAML}
96+
yq e '.appVersion = "${TAG}"' -i ${CHART_YAML}
8797
@echo "Publishing chart for component: ${COMPONENT_NAME}"
8898
helm package $(dir ${CHART_YAML}) --version ${TAG}
8999
helm push ${COMPONENT_NAME}-${TAG}.tgz oci://${CHARTS_REGISTRY}
90100

101+
clean-chart:
102+
rm -rf ${CHART_DIR}
103+
91104
# To suppress warnings when overriding Makefile targets, declare the abstract targets as <name>-default
92105
%: %-default
93106
@ true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
22
name: migration-job
33
description: Chart that will deploy script to migrate data
4-
version: 0.0.1
5-
appVersion: v0.0.1
4+
version: '{{VERSION}}'
5+
appVersion: '{{VERSION}}'

interactive_ai/services/auto_train/chart/Chart.yaml renamed to interactive_ai/services/auto_train/chart/Chart.yaml.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: auto-train-controller
3-
version: 0.0.2
3+
version: '{{VERSION}}'
44
apiVersion: v1
55
description: Periodic service that schedules auto-train jobs for the ready tasks
6-
appVersion: v0.0.1
6+
appVersion: '{{VERSION}}'

interactive_ai/services/dataset_ie/chart/Chart.yaml renamed to interactive_ai/services/dataset_ie/chart/Chart.yaml.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: dataset-ie
3-
version: 0.0.11
3+
version: '{{VERSION}}'
44
apiVersion: v2
55
description: dataset import and export
6-
appVersion: v0.0.1
6+
appVersion: '{{VERSION}}'

interactive_ai/services/director/chart/Chart.yaml renamed to interactive_ai/services/director/chart/Chart.yaml.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: director
3-
version: 0.0.8
3+
version: '{{VERSION}}'
44
apiVersion: v2
55
description: director
6-
appVersion: v0.0.1
6+
appVersion: '{{VERSION}}'

interactive_ai/services/inference_gateway/chart/Chart.yaml renamed to interactive_ai/services/inference_gateway/chart/Chart.yaml.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: inference-gateway
3-
version: 0.0.1
3+
version: '{{VERSION}}'
44
apiVersion: v2
55
description: Inference gateway
6-
appVersion: v0.0.1
6+
appVersion: '{{VERSION}}'

interactive_ai/services/jobs/chart/Chart.yaml renamed to interactive_ai/services/jobs/chart/Chart.yaml.template

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ description: platform chart
44
# This is the chart version. This version number should be incremented each time you make changes
55
# to the chart and its templates, including the app version.
66
# Versions are expected to follow Semantic Versioning (https://semver.org/)
7-
version: 0.0.1
8-
7+
version: '{{VERSION}}'
98
# This is the version number of the application being deployed. This version number should be
109
# incremented each time you make changes to the application. Versions are not expected to
1110
# follow Semantic Versioning. They should reflect the version the application is using.
1211
# It is recommended to use it with quotes.
13-
appVersion: v0.0.1
14-
12+
appVersion: '{{VERSION}}'
1513
dependencies:
1614
- name: jobs-ms
1715
version: 0.0.8

interactive_ai/services/jobs/chart/charts/jobs-ms/Chart.yaml renamed to interactive_ai/services/jobs/chart/charts/jobs-ms/Chart.yaml.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: jobs-ms
3-
version: 0.0.8
3+
version: '{{VERSION}}'
44
apiVersion: v2
55
description: jobs microservice
6-
appVersion: v0.0.1
6+
appVersion: '{{VERSION}}'

interactive_ai/services/jobs/chart/charts/jobs-scheduler/Chart.yaml renamed to interactive_ai/services/jobs/chart/charts/jobs-scheduler/Chart.yaml.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: jobs-scheduler
3-
version: 0.0.10
3+
version: '{{VERSION}}'
44
apiVersion: v2
55
description: jobs-scheduler
6-
appVersion: v0.0.1
6+
appVersion: '{{VERSION}}'

0 commit comments

Comments
 (0)