-
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.
feat: Added yace support for aws rds and redis metrics (#140)
Co-authored-by: Aditya Choudhari <aditya.choudhari@wandb.com> Co-authored-by: amanpruthi <aman.pruthi@velotio.com>
- Loading branch information
1 parent
94483a7
commit b5c6eb6
Showing
11 changed files
with
399 additions
and
3 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 |
---|---|---|
@@ -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,5 @@ | ||
apiVersion: v2 | ||
name: yace | ||
description: A Helm chart for Kubernetes | ||
version: 0.1.0 | ||
appVersion: "v0.60.0" |
102 changes: 102 additions & 0 deletions
102
charts/operator-wandb/charts/yace/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 "yace.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 "yace.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 "yace.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "yace.labels" -}} | ||
helm.sh/chart: {{ include "yace.chart" . }} | ||
{{ include "yace.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
wandb.com/app-name: {{ include "yace.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "yace.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "yace.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "yace.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "yace.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 "yace.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 "yace.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 "yace.podLabels" -}} | ||
{{- range $key, $value := .Values.pod.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end -}} | ||
|
18 changes: 18 additions & 0 deletions
18
charts/operator-wandb/charts/yace/templates/configmap.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "yace.fullname" . }} | ||
labels: | ||
{{- include "wandb.commonLabels" . | nindent 4 }} | ||
{{- include "yace.commonLabels" . | nindent 4 }} | ||
{{- include "yace.labels" . | nindent 4 }} | ||
{{- if .Values.configMap.labels -}} | ||
{{- toYaml .Values.configMap.labels | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{- if .Values.configMap.annotations -}} | ||
{{- toYaml .Values.configMap.annotations | nindent 4 }} | ||
{{- end }} | ||
data: | ||
config.yml: | | ||
{{- (tpl .Values.config $) | nindent 4 }} |
89 changes: 89 additions & 0 deletions
89
charts/operator-wandb/charts/yace/templates/deployment.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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{{- if .Values.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "yace.fullname" . }} | ||
labels: | ||
{{- include "wandb.commonLabels" . | nindent 4 }} | ||
{{- include "yace.commonLabels" . | nindent 4 }} | ||
{{- include "yace.labels" . | nindent 4 }} | ||
{{- if .Values.deployment.labels -}} | ||
{{- toYaml .Values.deployment.labels | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{- include "wandb.deploymentAnnotations" $ | nindent 4 }} | ||
{{- if .Values.deployment.annotations -}} | ||
{{- toYaml .Values.deployment.annotations | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
{{- include "wandb.selectorLabels" $ | nindent 6 }} | ||
{{- include "yace.labels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "wandb.podLabels" . | nindent 8 }} | ||
{{- include "yace.commonLabels" . | nindent 8 }} | ||
{{- include "yace.podLabels" . | nindent 8 }} | ||
{{- include "yace.labels" . | nindent 8 }} | ||
annotations: | ||
checksum/configmap: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }} | ||
{{- if .Values.pod.annotations -}} | ||
{{- toYaml .Values.pod.annotations | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
serviceAccountName: {{ include "yace.serviceAccountName" . }} | ||
{{- if .tolerations }} | ||
tolerations: | ||
{{- toYaml .tolerations | nindent 8 }} | ||
{{- end }} | ||
{{- include "wandb.nodeSelector" . | nindent 6 }} | ||
{{- include "wandb.priorityClassName" . | nindent 6 }} | ||
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
command: | ||
- yace | ||
- --config.file=/config/config.yml | ||
- --scraping-interval=60 | ||
ports: | ||
- containerPort: 5000 | ||
name: http | ||
protocol: TCP | ||
livenessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /healthz | ||
port: http | ||
scheme: HTTP | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /healthz | ||
port: http | ||
scheme: HTTP | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
volumeMounts: | ||
- mountPath: /config | ||
name: yace-config | ||
volumes: | ||
- name: config | ||
configMap: | ||
defaultMode: 420 | ||
name: {{ include "yace.fullname" . }} | ||
volumes: | ||
- configMap: | ||
defaultMode: 420 | ||
name: {{ include "yace.fullname" . }} | ||
name: yace-config | ||
{{- end }} |
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 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "yace.fullname" . }} | ||
labels: | ||
{{- include "wandb.commonLabels" . | nindent 4 }} | ||
{{- include "yace.labels" . | nindent 4 }} | ||
{{- include "yace.commonLabels" . | nindent 4 }} | ||
{{- if .Values.service.labels -}} | ||
{{- toYaml .Values.service.labels | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{- if .Values.service.annotations -}} | ||
{{- toYaml .Values.service.annotations | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: 5000 | ||
protocol: TCP | ||
name: yace | ||
selector: | ||
{{- include "yace.labels" . | nindent 4 }} |
15 changes: 15 additions & 0 deletions
15
charts/operator-wandb/charts/yace/templates/serviceaccount.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "yace.serviceAccountName" . }} | ||
labels: | ||
{{- include "wandb.commonLabels" . | nindent 4 }} | ||
{{- include "yace.commonLabels" . | nindent 4 }} | ||
{{- include "yace.labels" . | nindent 4 }} | ||
{{- if .Values.serviceAccount.labels -}} | ||
{{- toYaml .Values.serviceAccount.labels | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{- if .Values.serviceAccount.annotations -}} | ||
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }} | ||
{{- end }} |
Oops, something went wrong.