Skip to content

Template componnets charts #183

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:

- name: Push image
if: steps.build-image.outputs.SKIP_IMAGE != 'true'
run: make -C "${COMPONENT_DIR}" push-image
run: make -C "${COMPONENT_DIR}" publish-image

- name: Lint chart
if: steps.build-image.outputs.SKIP_IMAGE != 'true'
Expand Down
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
*.build
*.egg-info/
*.python-version
*.venv*
.DS_Store
.coverage
.idea
.idea/*
.coverage
*.venv*
common_libs/
reports/
__pycache__/
*.egg-info/
build/
.DS_Store
*.python-version
common_libs/
reports/
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ make tests
- `build`: Create binaries
- `publish`: Publish artifacts to registries
- `build-image`: Build a container image
- `push-image`: Publish a container image
- `build-chart`: Build a helm chart
- `publish-image`: Publish a container image
- `lint-chart`: Lint a helm chart
- `publish-chart`: Publish a helm chart
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `publish-chart`: Publish a helm chart
- `build-chart`: Build a helm chart
- `publish-chart`: Publish a helm chart


Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.PHONY: build clean push static-code-analysis tests test-unit test-integration test-component

PROJECTS = interactive_ai platform web_ui
CHART_TEMPLATES_LIST = $(shell find . -name "Chart.yaml.template" | while read -r filepath; do dirname $$(dirname $$filepath); done)
.DEFAULT_GOAL := build

build:
Expand All @@ -13,6 +14,13 @@ build:
$(MAKE) -C $$dir build-image; \
done

build-chart:
echo "Building all projects..."
@for dir in $(CHART_TEMPLATES_LIST); do \
echo "Running make build-chart in $$dir..."; \
$(MAKE) -C $$dir build-chart; \
done

clean:
echo "Cleaning all projects..."
@for dir in $(PROJECTS); do \
Expand All @@ -23,8 +31,8 @@ clean:
push:
echo "Pushing all projects..."
@for dir in $(PROJECTS); do \
echo "Running make push-image in $$dir..."; \
$(MAKE) -C $$dir push-image; \
echo "Running make publish-image in $$dir..."; \
$(MAKE) -C $$dir publish-image; \
done

static-code-analysis:
Expand Down
16 changes: 8 additions & 8 deletions Makefile.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ build-image-go:
build-image-python:
@$(call run_for_each,$(PY_BUILDABLE_SUBPROJECTS),Building image for Python component,build-image)

.PHONY: push-image
push-image: push-image-go push-image-python
.PHONY: publish-image
publish-image: publish-image-go publish-image-python

.PHONY: push-image-go
push-image-go:
@$(call run_for_each,$(GO_BUILDABLE_SUBPROJECTS),Pushing image for Go component,push-image)
.PHONY: publish-image-go
publish-image-go:
@$(call run_for_each,$(GO_BUILDABLE_SUBPROJECTS),Pushing image for Go component,publish-image)

.PHONY: push-image-python
push-image-python:
@$(call run_for_each,$(PY_BUILDABLE_SUBPROJECTS),Pushing image for Python component,push-image)
.PHONY: publish-image-python
publish-image-python:
@$(call run_for_each,$(PY_BUILDABLE_SUBPROJECTS),Pushing image for Python component,publish-image)

.PHONY: tests
tests: tests-go tests-python
Expand Down
24 changes: 17 additions & 7 deletions Makefile.shared
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

CWD = $(abspath $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))

.PHONY: build-image-default push-image publish-chart lint-chart-default
.PHONY: build-image-default publish-image publish-chart-default lint-chart-default

###
# version
Expand All @@ -27,10 +27,11 @@ BASE_OTE_V2_IMAGE_TAG ?= 12.8.1.1.30
###
# component
###
CHART_DIR := ./chart
CHART_DIR_TEMPLATE := ./chart
CHART_YAML_TEMPLATE := ${CHART_DIR_TEMPLATE}/Chart.yaml.template
CHART_DIR := ${CHART_DIR_TEMPLATE}/.build
CHART_YAML := ${CHART_DIR}/Chart.yaml
COMPONENT_NAME := $(shell grep '^name:' ${CHART_YAML} | sed 's/^name: //')

COMPONENT_NAME := $(shell grep '^name:' ${CHART_YAML_TEMPLATE} | sed 's/^name: //')
###
# docker extra arguments
###
Expand Down Expand Up @@ -68,22 +69,31 @@ build-image-default:
-f ./Dockerfile .


push-image:
publish-image:
@echo "Pushing docker image for component: ${COMPONENT_NAME}"
@docker push ${IMAGES_REGISTRY}/${COMPONENT_NAME}:${TAG}

###
# helm charts
###
lint-chart-default:
build-chart:
mkdir -p ${CHART_DIR}
cp ${CHART_YAML_TEMPLATE} ${CHART_YAML}
yq e '.version = "${TAG}"' -i ${CHART_YAML}
yq e '.appVersion = "${TAG}"' -i ${CHART_YAML}

lint-chart-default: build-chart
@echo "Running chart linter for component: ${COMPONENT_NAME}"
helm lint --with-subcharts $(dir ${CHART_YAML})

publish-chart:
publish-chart-default: build-chart
@echo "Publishing chart for component: ${COMPONENT_NAME}"
helm package $(dir ${CHART_YAML}) --version ${TAG}
helm push ${COMPONENT_NAME}-${TAG}.tgz oci://${CHARTS_REGISTRY}

clean-chart:
rm -rf ${CHART_DIR}

# To suppress warnings when overriding Makefile targets, declare the abstract targets as <name>-default
%: %-default
@ true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
name: migration-job
description: Chart that will deploy script to migrate data
version: 0.0.1
appVersion: v0.0.1
version: '{{VERSION}}'
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: auto-train-controller
version: 0.0.2
version: '{{VERSION}}'
apiVersion: v1
description: Periodic service that schedules auto-train jobs for the ready tasks
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: dataset-ie
version: 0.0.11
version: '{{VERSION}}'
apiVersion: v2
description: dataset import and export
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: director
version: 0.0.8
version: '{{VERSION}}'
apiVersion: v2
description: director
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: inference-gateway
version: 0.0.1
version: '{{VERSION}}'
apiVersion: v2
description: Inference gateway
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ description: jobs microservice / scheduler / policy service
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1

version: '{{VERSION}}'
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: media-ms
version: 0.0.8
version: '{{VERSION}}'
apiVersion: v2
description: media
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: mlflow-geti-store
version: 0.0.1
version: '{{VERSION}}'
apiVersion: v2
description: MLflow geti store
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
apiVersion: v1
name: modelregistration
version: 0.0.3
appVersion: v0.0.1
version: '{{VERSION}}'
appVersion: '{{VERSION}}'
description: A Helm chart for Model Registration Service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: project-ie
version: 0.0.10
version: '{{VERSION}}'
apiVersion: v2
description: project import and export
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: resource
version: 0.0.12
version: '{{VERSION}}'
apiVersion: v2
description: resource
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: visual-prompt
version: 0.0.1
version: '{{VERSION}}'
apiVersion: v2
description: visual prompt service
appVersion: v0.0.1
appVersion: '{{VERSION}}'
4 changes: 2 additions & 2 deletions interactive_ai/workflows/geti_domain/common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include ../../Makefile.shared-workflows
build-image:
@echo "Nothing to do - ${COMPONENT_NAME} does not have an image to build"

push-image:
publish-image:
@echo "Nothing to do - ${COMPONENT_NAME} does not have an image to push"

test-component: venv
Expand All @@ -13,4 +13,4 @@ venv: pre-venv
uv lock --check
# Cuda bindings is a sub-dependency of datumaro and is not needed for Geti.
# The install is therefore skipped here for compatibility with systems that don't support cuda
uv sync --frozen ${PIP_INSTALL_PARAMS} --no-install-package cuda-bindings
uv sync --frozen ${PIP_INSTALL_PARAMS} --no-install-package cuda-bindings
2 changes: 1 addition & 1 deletion interactive_ai/workflows/geti_domain/dataset_ie/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ venv: pre-venv
uv lock --check
# Cuda bindings is a sub-dependency of datumaro and is not needed for Geti.
# The install is therefore skipped here for compatibility with systems that don't support cuda
uv sync --frozen ${PIP_INSTALL_PARAMS} --no-install-package cuda-bindings
uv sync --frozen ${PIP_INSTALL_PARAMS} --no-install-package cuda-bindings
2 changes: 1 addition & 1 deletion interactive_ai/workflows/geti_domain/optimize/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ venv: pre-venv
uv lock --check
# Cuda bindings is a sub-dependency of datumaro and is not needed for Geti.
# The install is therefore skipped here for compatibility with systems that don't support cuda
uv sync --frozen ${PIP_INSTALL_PARAMS} --no-install-package cuda-bindings
uv sync --frozen ${PIP_INSTALL_PARAMS} --no-install-package cuda-bindings
2 changes: 1 addition & 1 deletion interactive_ai/workflows/geti_domain/train/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ venv: pre-venv
uv lock --check
# cuda-bindings is a sub-dependency of datumaro and is not needed for Geti.
# The install is therefore skipped here for compatibility with systems that don't support cuda
uv sync --frozen ${PIP_INSTALL_PARAMS} --no-install-package cuda-bindings
uv sync --frozen ${PIP_INSTALL_PARAMS} --no-install-package cuda-bindings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: account-service
version: 0.0.2
appVersion: v0.0.1
version: '{{VERSION}}'
appVersion: '{{VERSION}}'
apiVersion: v2
description: account service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: auth-proxy
version: 0.1.0
appVersion: v0.0.1
version: '{{VERSION}}'
appVersion: '{{VERSION}}'
apiVersion: v2
description: A Helm chart for Kubernetes
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: v2
name: credit-system
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
Expand All @@ -11,14 +10,12 @@ description: A Helm chart for Kubernetes
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

version: '{{VERSION}}'
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: v2
name: initial-user
description: "Creation of initial user in the account service"

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
Expand All @@ -12,14 +11,12 @@ description: "Creation of initial user in the account service"
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1

version: '{{VERSION}}'
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
apiVersion: v2
name: notifier
version: 0.0.1
appVersion: v0.0.1
version: '{{VERSION}}'
appVersion: '{{VERSION}}'
description: A Helm chart for the notifier
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: observability
version: 0.0.1
version: '{{VERSION}}'
description: observability chart
apiVersion: v2
appVersion: v0.0.1
appVersion: '{{VERSION}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
apiVersion: v2
name: onboarding-service
version: 0.0.1
appVersion: v0.0.1
version: '{{VERSION}}'
appVersion: '{{VERSION}}'
description: A Helm chart for the Onboarding Service
Loading
Loading