-
Notifications
You must be signed in to change notification settings - Fork 8
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
14 changed files
with
648 additions
and
49 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
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 |
---|---|---|
@@ -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/ |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v2 | ||
name: otel | ||
type: application | ||
description: A Helm chart for Kubernetes | ||
|
||
version: 0.1.0 | ||
appVersion: "0.33.0" | ||
|
||
home: https://wandb.ai | ||
icon: https://wandb.ai/logo.svg | ||
|
||
maintainers: | ||
- name: wandb | ||
email: [email protected] | ||
url: https://wandb.com |
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 |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Local | ||
|
||
- [Local](#local) | ||
- [Requirements](#requirements) | ||
- [Configuration](#configuration) | ||
- [Globals](#globals) | ||
- [Options](#options) | ||
- [Chart configuration examples](#chart-configuration-examples) | ||
- [extraEnv](#extraenv) | ||
- [extraEnvFrom](#extraenvfrom) | ||
- [extraEnvFrom](#extraenvfrom-1) | ||
|
||
## Requirements | ||
|
||
This chart depends on Redis, Bucket and MySQL services, either as part of the | ||
complete W&B Server chart or provided as external services reachable from the | ||
Kubernetes cluster this chart is deployed onto. | ||
|
||
## Configuration | ||
|
||
### Globals | ||
|
||
### Options | ||
|
||
| Parameter | Default | Description | | ||
| ------------------- | ------------- | -------------------------------------------------------------------------------------------------- | | ||
| `enabled` | `true` | Server enable flag | | ||
| `priorityClassName` | `""` | Allow configuring pods priorityClassName, this is used to control pod priority in case of eviction | | ||
| `common.labels` | | Supplemental labels that are applied to all objects created by this chart. | | ||
| `podLabels` | | Supplemental Pod labels. Will not be used for selectors. | | ||
| `extraEnv` | | List of extra environment variables to expose | | ||
| `extraEnvFrom` | | List of extra environment variables from other data sources to expose | | ||
| `image.pullPolicy` | `Always` | Server image pull policy | | ||
| `image.pullSecrets` | | Secrets for the image repository | | ||
| `image.repository` | `wandb/local` | Server image repository | | ||
| `image.tag` | | Server image tag | | ||
| `tolerations` | `[]` | Toleration labels for pod assignment | | ||
|
||
### Chart configuration examples | ||
|
||
#### extraEnv | ||
|
||
#### extraEnvFrom | ||
|
||
`extraEnv` allows you to expose additional environment variables in all | ||
containers in the pods. | ||
|
||
```yaml | ||
extraEnv: | ||
SOME_KEY: some_value | ||
SOME_OTHER_KEY: some_other_value | ||
``` | ||
When the container is started, you can confirm that the environment variables | ||
are exposed: | ||
Below is an example use of extraEnv: | ||
```bash | ||
env | grep SOME | ||
SOME_KEY=some_value | ||
SOME_OTHER_KEY=some_other_value | ||
``` | ||
|
||
#### extraEnvFrom | ||
|
||
`extraEnvFrom` allows you to expose additional environment variables from other | ||
data sources in all containers in the pods. Subsequent variables can be | ||
overridden per deployment. | ||
|
||
Below is an example use of `extraEnvFrom`: | ||
|
||
```yaml | ||
extraEnvFrom: | ||
MY_NODE_NAME: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
MY_CPU_REQUEST: | ||
resourceFieldRef: | ||
containerName: test-container | ||
resource: requests.cpu | ||
SECRET_THING: | ||
secretKeyRef: | ||
name: special-secret | ||
key: special_token | ||
# optional: boolean | ||
``` |
102 changes: 102 additions & 0 deletions
102
charts/operator-wandb/charts/otel/templates/_helpers.tpl
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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "otel.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 "otel.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 "otel.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "otel.labels" -}} | ||
helm.sh/chart: {{ include "otel.chart" . }} | ||
{{ include "otel.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
wandb.com/app-name: {{ include "otel.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "otel.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "otel.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "otel.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "otel.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Returns the extraEnv keys and values to inject into containers. | ||
Global values will override any chart-specific values. | ||
*/}} | ||
{{- define "otel.extraEnv" -}} | ||
{{- $allExtraEnv := merge (default (dict) .local.extraEnv) .global.extraEnv -}} | ||
{{- range $key, $value := $allExtraEnv }} | ||
- name: {{ $key }} | ||
value: {{ $value | quote }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Returns a list of _common_ labels to be shared across all | ||
app deployments and other shared objects. | ||
*/}} | ||
{{- define "otel.commonLabels" -}} | ||
{{- $commonLabels := default (dict) .Values.common.labels -}} | ||
{{- if $commonLabels }} | ||
{{- range $key, $value := $commonLabels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Returns a list of _pod_ labels to be shared across all | ||
app deployments. | ||
*/}} | ||
{{- define "otel.podLabels" -}} | ||
{{- range $key, $value := .Values.pod.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end -}} | ||
|
Oops, something went wrong.