-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
677 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,48 @@ | ||
name: 'pgrx initialization' | ||
description: 'Initialize PGRX if it is a dependency, otherwise do nothing.' | ||
name: "pgrx initialization" | ||
description: "Initialize PGRX if it is a dependency, otherwise do nothing." | ||
inputs: | ||
working-directory: | ||
description: 'The directory in which there is a pgrx extension project' | ||
description: "The directory in which there is a pgrx extension project" | ||
required: true | ||
outputs: {} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install TOML parser | ||
shell: bash | ||
run: | | ||
set -xe | ||
wget https://github.com/freshautomations/stoml/releases/download/v0.7.1/stoml_linux_amd64 &> /dev/null | ||
mv stoml_linux_amd64 stoml | ||
chmod +x stoml | ||
sudo mv stoml /usr/local/bin/ | ||
- name: setup pgrx | ||
shell: bash | ||
id: pgrx_install | ||
working-directory: ${{ inputs.working-directory }} | ||
run: | | ||
pgrx_version=$(stoml Cargo.toml dependencies.pgrx) | ||
if [ -z "${pgrx_version}" ]; then | ||
echo "pgrx is not a dependency: skipping" | ||
echo "skip=true" >> $GITHUB_OUTPUT | ||
else | ||
cargo install --version ${pgrx_version} cargo-pgrx | ||
echo "skip=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: pgrx init | ||
shell: bash | ||
if: steps.pgrx_install.outputs.skip == 'false' | ||
working-directory: ${{ inputs.working-directory }} | ||
run: | | ||
set -x | ||
pg_version=$(stoml Cargo.toml features.default) | ||
# pgrx init can take a long time, and it re-compiles postgres even when there | ||
# is a cached version. So, we can just check for the directory and | ||
cat /home/runner/.pgrx/config.toml || true | ||
if find /home/runner/.pgrx | grep $(awk -F "=" '/${pg_version}/ {print $2}' /home/runner/.pgrx/config.toml | tr -d '"'); then | ||
echo "Already found pgrx is initialized. Skipping 'cargo pgrx init' command." | ||
else | ||
cargo pgrx init --${pg_version} download || true | ||
fi | ||
- name: Install TOML parser | ||
shell: bash | ||
run: | | ||
set -xe | ||
sudo apt-get update | ||
sudo apt-get install -y wget | ||
wget https://github.com/freshautomations/stoml/releases/download/v0.7.1/stoml_linux_amd64 &> /dev/null | ||
mv stoml_linux_amd64 stoml | ||
chmod +x stoml | ||
sudo mv stoml /usr/local/bin/ | ||
- name: setup pgrx | ||
shell: bash | ||
id: pgrx_install | ||
working-directory: ${{ inputs.working-directory }} | ||
run: | | ||
pgrx_version=$(stoml Cargo.toml dependencies.pgrx) | ||
if [ -z "${pgrx_version}" ]; then | ||
echo "pgrx is not a dependency: skipping" | ||
echo "skip=true" >> $GITHUB_OUTPUT | ||
else | ||
cargo install --version ${pgrx_version} cargo-pgrx | ||
echo "skip=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: pgrx init | ||
shell: bash | ||
if: steps.pgrx_install.outputs.skip == 'false' | ||
working-directory: ${{ inputs.working-directory }} | ||
run: | | ||
set -x | ||
pg_version=$(stoml Cargo.toml features.default) | ||
# pgrx init can take a long time, and it re-compiles postgres even when there | ||
# is a cached version. So, we can just check for the directory and | ||
cat /home/runner/.pgrx/config.toml || true | ||
if find /home/runner/.pgrx | grep $(awk -F "=" '/${pg_version}/ {print $2}' /home/runner/.pgrx/config.toml | tr -d '"'); then | ||
echo "Already found pgrx is initialized. Skipping 'cargo pgrx init' command." | ||
else | ||
cargo pgrx init --${pg_version} download || true | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ on: | |
jobs: | ||
tests: | ||
name: Run tests | ||
|
||
runs-on: | ||
- self-hosted | ||
- dind | ||
|
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
.github/** @nhudson @ianstanton @shahadarsh | ||
.github/** @nhudson @ianstanton @shahadarsh @vrmiguel | ||
charts/** @nhudson @ianstanton @shahadarsh | ||
tembo-operator/** @nhudson @ianstanton @ChuckHend | ||
conductor/** @nhudson @ianstanton @ChuckHend | ||
dataplane-webserver/** @nhudson @ianstanton @vrmiguel | ||
tembo-operator/** @nhudson @ianstanton @ChuckHend @vrmiguel | ||
conductor/** @nhudson @ianstanton @ChuckHend @vrmiguel | ||
tembo-pod-init/** @nhudson @ianstanton | ||
tembo-cli/** @shahadarsh @vrmiguel @DarrenBaldwin07 @joshuajerin | ||
tembo-py/** @chuckhend | ||
tembo-stacks/** @chuckhend @jasonmp85 | ||
inference-gateway/** @chuckhend @jasonmp85 | ||
inference-gateway/** @chuckhend @jasonmp85 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 17 additions & 9 deletions
26
charts/tembo-ai/templates/inference-service/external-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
{{- if .Values.inferenceService.externalSecrets.secretName -}} | ||
{{- if .Values.inferenceService.services }} | ||
{{- $defaults := .Values.inferenceService.defaults }} | ||
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }} | ||
{{- $mergedConfig := fromYaml (include "tembo-ai.inferenceService.deepMerge" (list $defaults $serviceConfig)) }} | ||
{{- if and (default false $mergedConfig.enabled) $mergedConfig.externalSecrets.secretName }} | ||
--- | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: {{ include "tembo-ai.fullname" . }}-service | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ include "tembo-ai.fullname" $ }}-{{ $serviceName }} | ||
namespace: {{ include "tembo-ai.namespace" $ }} | ||
labels: | ||
{{- include "tembo-ai.inferenceService.labels" . | nindent 4 }} | ||
{{- include "tembo-ai.inferenceService.labels" $ | nindent 4 }} | ||
app.kubernetes.io/component: {{ $serviceName }} | ||
spec: | ||
refreshInterval: {{ .Values.inferenceService.externalSecrets.refreshInterval }} | ||
refreshInterval: {{ $mergedConfig.externalSecrets.refreshInterval }} | ||
secretStoreRef: | ||
name: {{ .Values.inferenceService.externalSecrets.parameterStore.name }} | ||
kind: {{ .Values.inferenceService.externalSecrets.parameterStore.kind }} | ||
name: {{ $mergedConfig.externalSecrets.parameterStore.name }} | ||
kind: {{ $mergedConfig.externalSecrets.parameterStore.kind }} | ||
target: | ||
creationPolicy: 'Owner' | ||
name: {{ .Values.inferenceService.externalSecrets.secretName }} | ||
name: {{ $mergedConfig.externalSecrets.secretName }} | ||
dataFrom: | ||
- find: | ||
name: | ||
regexp: {{ .Values.inferenceService.externalSecrets.secretRegex }} | ||
regexp: {{ $mergedConfig.externalSecrets.secretRegex }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
31 changes: 23 additions & 8 deletions
31
charts/tembo-ai/templates/inference-service/pod-monitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
{{- if .Values.inferenceService.podMonitor.enabled -}} | ||
{{- if .Values.inferenceService.services }} | ||
{{- $defaults := .Values.inferenceService.defaults }} | ||
{{- $releaseName := default "release-name" .Release.Name }} | ||
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }} | ||
{{- $mergedConfig := fromYaml (include "tembo-ai.inferenceService.deepMerge" (list $defaults $serviceConfig)) }} | ||
{{- if and (default false $mergedConfig.enabled) (default false $mergedConfig.podMonitor.enabled) }} | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: {{ include "tembo-ai.fullname" . }}-service | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ include "tembo-ai.fullname" $ }}-{{ $serviceName }} | ||
namespace: {{ include "tembo-ai.namespace" $ }} | ||
labels: | ||
{{- include "tembo-ai.inferenceService.labels" . | nindent 4 }} | ||
{{- include "tembo-ai.inferenceService.labels" $ | nindent 4 }} | ||
app.kubernetes.io/component: {{ $serviceName }} | ||
spec: | ||
podMetricsEndpoints: | ||
- path: {{ .Values.inferenceService.podMonitor.path }} | ||
port: {{ .Values.inferenceService.podMonitor.portName }} | ||
- port: {{ $mergedConfig.podMonitor.portName }} | ||
path: {{ $mergedConfig.podMonitor.path }} | ||
{{- with $mergedConfig.podMonitor.interval }} | ||
interval: {{ . }} | ||
{{- end }} | ||
{{- with $mergedConfig.podMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ . }} | ||
{{- end }} | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
- {{ include "tembo-ai.namespace" $ }} | ||
selector: | ||
matchLabels: | ||
{{- include "tembo-ai.inferenceService.selectorLabels" . | nindent 6 }} | ||
{{- include "tembo-ai.inferenceService.selectorLabels" $ | nindent 6 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.