diff --git a/charts/cdl-dataset/.helmignore b/charts/cdl-dataset/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/cdl-dataset/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/cdl-dataset/.schema.yaml b/charts/cdl-dataset/.schema.yaml new file mode 100644 index 0000000..e997273 --- /dev/null +++ b/charts/cdl-dataset/.schema.yaml @@ -0,0 +1,13 @@ +--- +input: + - values.yaml + +draft: 2020 +indent: 2 +output: values.schema.json + +schemaRoot: + id: https://smartx-team.github.io/mobilex-api/charts/nvidia-isaac-sim + title: NVIDIA Issac-Sim Schema + description: Schema for NVIDIA Issac-Sim Helm Chart + additionalProperties: true diff --git a/charts/cdl-dataset/Chart.yaml b/charts/cdl-dataset/Chart.yaml new file mode 100644 index 0000000..487bbf5 --- /dev/null +++ b/charts/cdl-dataset/Chart.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: v2 +name: cdl-dataset +description: Convenient Connected Data Lake Dataset instance deployment tool + +# 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 +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# 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 + +# 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: "latest-devel" diff --git a/charts/cdl-dataset/README.md b/charts/cdl-dataset/README.md new file mode 100644 index 0000000..785dc7c --- /dev/null +++ b/charts/cdl-dataset/README.md @@ -0,0 +1,30 @@ +# Connected Data Lake Dataset instance Helm Chart + +## Usage + +```bash +# Register the MobileX API repository +helm repo add mobilex "https://smartx-team.github.io/mobilex-api" + +# Deploy a Connected Data Lake Dataset instance +NAME="my-dataset-hoya-123" # TODO: Change it to your unique app name +helm install $NAME "mobilex/cdl-dataset" \ + --namespace "name-twin" +``` + +## Uninstall + +```bash +NAME="my-dataset-hoya-123" # TODO: Change it to your app name +helm uninstall $NAME --namespace "name-twin" +``` + +## Validating + +```bash +# Install json schema generator +helm plugin install "https://github.com/losisin/helm-values-schema-json.git" + +# Create a json schema +helm schema +``` diff --git a/charts/cdl-dataset/templates/NOTES.txt b/charts/cdl-dataset/templates/NOTES.txt new file mode 100644 index 0000000..22d0448 --- /dev/null +++ b/charts/cdl-dataset/templates/NOTES.txt @@ -0,0 +1 @@ +Installed! diff --git a/charts/cdl-dataset/templates/_helpers.tpl b/charts/cdl-dataset/templates/_helpers.tpl new file mode 100644 index 0000000..3d47122 --- /dev/null +++ b/charts/cdl-dataset/templates/_helpers.tpl @@ -0,0 +1,51 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "cdl-dataset.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "cdl-dataset.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cdl-dataset.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "cdl-dataset.labels" -}} +helm.sh/chart: {{ include "cdl-dataset.chart" . }} +{{ include "cdl-dataset.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "cdl-dataset.selectorLabels" -}} +app.kubernetes.io/name: {{ include "cdl-dataset.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} diff --git a/charts/cdl-dataset/templates/model.yaml.j2 b/charts/cdl-dataset/templates/model.yaml.j2 new file mode 100644 index 0000000..412fdb4 --- /dev/null +++ b/charts/cdl-dataset/templates/model.yaml.j2 @@ -0,0 +1,11 @@ +{{- if eq .Values.claim.enabled false }} +--- +apiVersion: dash.ulagbulag.io/v1alpha1 +kind: Model +metadata: + name: {{ .Release.Name }} + labels: + {{- include "cdl-dataset.labels" . | nindent 4 }} +spec: + dynamic: {} +{{- end }} diff --git a/charts/cdl-dataset/templates/model_claim.yaml.j2 b/charts/cdl-dataset/templates/model_claim.yaml.j2 new file mode 100644 index 0000000..aa7bef9 --- /dev/null +++ b/charts/cdl-dataset/templates/model_claim.yaml.j2 @@ -0,0 +1,23 @@ +{{- if eq .Values.claim.enabled true }} +--- +apiVersion: dash.ulagbulag.io/v1alpha1 +kind: ModelClaim +metadata: + name: {{ .Release.Name }} + labels: + {{- include "cdl-dataset.labels" . | nindent 4 }} +spec: + affinity: + {{- toYaml .Values.claim.affinity | nindent 4 }} + allowReplacement: + {{- toYaml .Values.claim.allowReplacement | nindent 4 }} + bindingPolicy: + {{- toYaml .Values.claim.bindingPolicy | nindent 4 }} + deletionPolicy: + {{- toYaml .Values.deletionPolicy | nindent 4 }} + resources: + {{- toYaml .Values.claim.resources | nindent 4 }} + storage: ObjectStorage + storageName: + {{- toYaml .Values.static.targetStorageName | nindent 4 }} +{{- end }} diff --git a/charts/cdl-dataset/templates/model_storage_binding.yaml.j2 b/charts/cdl-dataset/templates/model_storage_binding.yaml.j2 new file mode 100644 index 0000000..d9a7423 --- /dev/null +++ b/charts/cdl-dataset/templates/model_storage_binding.yaml.j2 @@ -0,0 +1,36 @@ +{{- if eq .Values.claim.enabled false }} +--- +apiVersion: dash.ulagbulag.io/v1alpha1 +kind: ModelStorageBinding +metadata: + name: {{ .Release.Name }} + labels: + {{- include "cdl-dataset.labels" . | nindent 4 }} +spec: + deletionPolicy: + {{- toYaml .Values.deletionPolicy | nindent 4 }} + model: {{ .Release.Name }} + resources: + {{- toYaml .Values.claim.resources | nindent 4 }} + storage: + {{- if .Values.static.sourceStorageName }} + cloned: + {{- else }} + owned: + {{- end }} + {{- if .Values.static.sourceStorageName }} + source: + {{- toYaml .Values.static.sourceStorageName | nindent 8 }} + sourceBindingName: + {{- toYaml .Values.static.sourceBindingName | nindent 8 }} + {{- end }} + target: + {{- toYaml .Values.static.targetStorageName | nindent 8 }} + {{- if .Values.static.sourceStorageName }} + syncPolicy: + pull: + {{- toYaml .Values.static.syncPolicy.pull | nindent 10 }} + push: + {{- toYaml .Values.static.syncPolicy.push | nindent 10 }} + {{- end }} +{{- end }} diff --git a/charts/cdl-dataset/values.yaml b/charts/cdl-dataset/values.yaml new file mode 100644 index 0000000..3a0a538 --- /dev/null +++ b/charts/cdl-dataset/values.yaml @@ -0,0 +1,47 @@ +--- +# Default values for cdl-dataset. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +clusterName: ops.openark +nameOverride: "" +fullnameOverride: "" + +claim: + # whether to enable connected data lake's auto-select feature + enabled: true + + affinity: + placementAffinity: + preferred: [] + required: [] + replacementAffinity: + preferred: [] + required: [] + + allowReplacement: true + + # binding policy presets + # options: ["Balanced", "LowestCopy", "LowestLatency"] + bindingPolicy: LowestCopy + +# options: ["Retain", "Delete"] +deletionPolicy: Delete + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + requests: + storage: 1Ti + +static: + sourceBindingName: null + sourceStorageName: null + targetStorageName: null + syncPolicy: + # options: ["Always", "OnCreate", "Never"] + pull: Never + # options: ["Always", "OnDelete", "Never"] + push: Never diff --git a/charts/data-pond/.helmignore b/charts/data-pond/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/data-pond/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/data-pond/.schema.yaml b/charts/data-pond/.schema.yaml new file mode 100644 index 0000000..e997273 --- /dev/null +++ b/charts/data-pond/.schema.yaml @@ -0,0 +1,13 @@ +--- +input: + - values.yaml + +draft: 2020 +indent: 2 +output: values.schema.json + +schemaRoot: + id: https://smartx-team.github.io/mobilex-api/charts/nvidia-isaac-sim + title: NVIDIA Issac-Sim Schema + description: Schema for NVIDIA Issac-Sim Helm Chart + additionalProperties: true diff --git a/charts/data-pond/Chart.yaml b/charts/data-pond/Chart.yaml new file mode 100644 index 0000000..fd04ba4 --- /dev/null +++ b/charts/data-pond/Chart.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: v2 +name: data-pond +description: Convenient Data Pond instance deployment tool + +# 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 +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# 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 + +# 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: "latest-devel" diff --git a/charts/data-pond/README.md b/charts/data-pond/README.md new file mode 100644 index 0000000..00f5010 --- /dev/null +++ b/charts/data-pond/README.md @@ -0,0 +1,30 @@ +# Data Pond instance Helm Chart + +## Usage + +```bash +# Register the MobileX API repository +helm repo add mobilex "https://smartx-team.github.io/mobilex-api" + +# Deploy a Data Pond storage instance +NAME="my-storage-hoya-123" # TODO: Change it to your unique app name +helm install $NAME "mobilex/data-pond" \ + --namespace "name-twin" +``` + +## Uninstall + +```bash +NAME="my-storage-hoya-123" # TODO: Change it to your app name +helm uninstall $NAME --namespace "name-twin" +``` + +## Validating + +```bash +# Install json schema generator +helm plugin install "https://github.com/losisin/helm-values-schema-json.git" + +# Create a json schema +helm schema +``` diff --git a/charts/data-pond/templates/NOTES.txt b/charts/data-pond/templates/NOTES.txt new file mode 100644 index 0000000..22d0448 --- /dev/null +++ b/charts/data-pond/templates/NOTES.txt @@ -0,0 +1 @@ +Installed! diff --git a/charts/data-pond/templates/_helpers.tpl b/charts/data-pond/templates/_helpers.tpl new file mode 100644 index 0000000..3d9d5a6 --- /dev/null +++ b/charts/data-pond/templates/_helpers.tpl @@ -0,0 +1,58 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "data-pond.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "data-pond.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "data-pond.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "data-pond.labels" -}} +helm.sh/chart: {{ include "data-pond.chart" . }} +{{ include "data-pond.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "data-pond.selectorLabels" -}} +app.kubernetes.io/name: {{ include "data-pond.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Expand the name of the secret. +*/}} +{{- define "data-pond.secretName" -}} +{{- default .Release.Name .Values.secret.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} diff --git a/charts/data-pond/templates/secret.yaml.j2 b/charts/data-pond/templates/secret.yaml.j2 new file mode 100644 index 0000000..da10436 --- /dev/null +++ b/charts/data-pond/templates/secret.yaml.j2 @@ -0,0 +1,14 @@ +{{- if eq .Values.secret.value.enabled true }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "data-pond.secretName" . }} + labels: + {{- include "data-pond.labels" . | nindent 4 }} +stringData: + "{{ .Values.secret.ref.mapAccessKey }}": + {{- toYaml .Values.secret.value.accessKey | nindent 4 }} + "{{ .Values.secret.ref.mapSecretKey }}": + {{- toYaml .Values.secret.value.secretKey | nindent 4 }} +{{- end }} diff --git a/charts/data-pond/templates/storage.yaml.j2 b/charts/data-pond/templates/storage.yaml.j2 new file mode 100644 index 0000000..5ec831b --- /dev/null +++ b/charts/data-pond/templates/storage.yaml.j2 @@ -0,0 +1,44 @@ +--- +apiVersion: dash.ulagbulag.io/v1alpha1 +kind: ModelStorage +metadata: + name: {{ .Release.Name }} + labels: + {{- include "data-pond.labels" . | nindent 4 }} +spec: + objectStorage: + {{- if contains "Owned" .Values.storageType }} + owned: + {{- else if contains "Remote" .Values.storageType }} + borrowed: + {{- else if contains "Shared" .Values.storageType }} + shared: + {{- else }} + {{- fail "value for .Values.storageType is not as expected" }} + {{- end }} + {{- if or (contains "Owned" .Values.storageType) (contains "Shared" .Values.storageType) }} + minioConsoleExternalService: + {{- toYaml .Values.minio.console | nindent 10 }} + minioExternalService: + {{- toYaml .Values.minio.endpoint | nindent 10 }} + resources: + {{- toYaml .Values.resources | nindent 8 }} + runtimeClassName: + {{- toYaml .Values.runtimeClassName | nindent 8 }} + storageClassName: + {{- toYaml .Values.storageClassName | nindent 8 }} + totalNodes: + {{- toYaml .Values.totalNodes | nindent 8 }} + totalVolumesPerNode: + {{- toYaml .Values.totalVolumesPerNode | nindent 8 }} + {{- end }} + {{- if or (contains "Remote" .Values.storageType) (contains "Shared" .Values.storageType) }} + endpoint: + {{- toYaml .Values.remote.endpoint | nindent 8 }} + secretRef: + mapAccessKey: + {{- toYaml .Values.secret.ref.mapAccessKey | nindent 10 }} + mapSecretKey: + {{- toYaml .Values.secret.ref.mapSecretKey | nindent 10 }} + name: {{ include "data-pond.secretName" . }} + {{- end }} diff --git a/charts/data-pond/values.yaml b/charts/data-pond/values.yaml new file mode 100644 index 0000000..064f623 --- /dev/null +++ b/charts/data-pond/values.yaml @@ -0,0 +1,46 @@ +--- +# Default values for data-pond. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +clusterName: ops.openark +nameOverride: "" +fullnameOverride: "" + +minio: + console: + addressPool: null + ip: null + endpoint: + addressPool: null + ip: null + +remote: + endpoint: https://s3.amazonaws.com + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + requests: + storage: 10Ti + +runtimeClassName: "" +storageClassName: ceph-block + +secret: + ref: + mapAccessKey: CONSOLE_ACCESS_KEY + mapSecretKey: CONSOLE_SECRET_KEY + nameOverride: "" + value: + enabled: false + accessKey: "" + secretKey: "" + +# options: ["Owned", "Remote", "Shared"] +storageType: Owned + +totalNodes: 1 +totalVolumesPerNode: 4 diff --git a/charts/mobilex-ssh/values.yaml b/charts/mobilex-ssh/values.yaml index 7bd1998..f396da1 100644 --- a/charts/mobilex-ssh/values.yaml +++ b/charts/mobilex-ssh/values.yaml @@ -1,5 +1,5 @@ --- -# Default values for nvidia-isaac-sim. +# Default values for mobilex-ssh. # This is a YAML-formatted file. # Declare variables to be passed into your templates. diff --git a/charts/mobilex-vstation/values.yaml b/charts/mobilex-vstation/values.yaml index c939f3e..22c0069 100644 --- a/charts/mobilex-vstation/values.yaml +++ b/charts/mobilex-vstation/values.yaml @@ -1,5 +1,5 @@ --- -# Default values for nvidia-isaac-sim. +# Default values for mobilex-vstation. # This is a YAML-formatted file. # Declare variables to be passed into your templates. diff --git a/charts/oidc-login/values.yaml b/charts/oidc-login/values.yaml index bafc2e7..66f24f3 100644 --- a/charts/oidc-login/values.yaml +++ b/charts/oidc-login/values.yaml @@ -1,4 +1,8 @@ --- +# Default values for oidc-login. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + account: clusterRoleName: twin-admin roleName: twin-admin