Skip to content

Commit

Permalink
initial commit, adding helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix24 committed Apr 12, 2024
1 parent 4439f93 commit c648a12
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release

on:
push:
branches:
- main

jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3

- name: Helm Chart Releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
14 changes: 14 additions & 0 deletions charts/temporal-cloud-metrics-datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v2
name: promql-to-dd-go
version: 0.1.0
description: |
A demonstrative Chart for deploying promql-to-dd-go to Kubernetes.
The Chart is provided as-is, without support. They are intended as reference material only.
home: https://github.com/temporalio/samples-server/tree/main/cloud/observability/promql-to-dd-go
keywords:
- temporal
- prometheus
- datadog
maintainers:
- name: taonic
type: application
8 changes: 8 additions & 0 deletions charts/temporal-cloud-metrics-datadog/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Thank you for installing {{ .Chart.Name }}.

Your release is named {{ .Release.Name }}.

To learn more about the release, try:

$ helm status {{ .Release.Name }}
$ helm get all {{ .Release.Name }}
13 changes: 13 additions & 0 deletions charts/temporal-cloud-metrics-datadog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "promql-to-dd-go.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "promql-to-dd-go.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
46 changes: 46 additions & 0 deletions charts/temporal-cloud-metrics-datadog/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "promql-to-dd-go.name" . }}
labels:
app: {{ template "promql-to-dd-go.name" . }}
chart: {{ template "promql-to-dd-go.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "promql-to-dd-go.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "promql-to-dd-go.name" . }}
release: {{ .Release.Name }}
annotations:
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
spec:
containers:
- name: promqltodd
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.imagePullPolicy }}
args:
- --client-cert=/var/run/secrets/ca_cert
- --client-key=/var/run/secrets/ca_key
- --prom-endpoint={{ .Values.prom_endpoint }}
- --query-interval-seconds={{ .Values.query_interval_seconds }}
env:
- name: DD_API_KEY
valueFrom:
secretKeyRef:
name: {{ template "promql-to-dd-go.name" . }}-secrets
key: dd_api_key
volumeMounts:
- name: secrets
mountPath: /var/run/secrets
readOnly: true
volumes:
- name: secrets
secret:
secretName: {{ template "promql-to-dd-go.name" . }}-secrets
17 changes: 17 additions & 0 deletions charts/temporal-cloud-metrics-datadog/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ template "promql-to-dd-go.name" . }}-secrets
labels:
app: {{ template "promql-to-dd-go.name" . }}
chart: {{ template "promql-to-dd-go.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
ca_cert:
{{ .Values.ca_cert | b64enc }}
ca_key:
{{ .Values.ca_key | b64enc }}
dd_api_key:
{{ .Values.dd_api_key | b64enc }}
2 changes: 2 additions & 0 deletions charts/temporal-cloud-metrics-datadog/test.file
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test test
test test
8 changes: 8 additions & 0 deletions charts/temporal-cloud-metrics-datadog/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Default values for promql-to-dd-go.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

image:
repository: ghcr.io/temporalio/promql-to-dd-go
tag: latest
imagePullPolicy: Always

0 comments on commit c648a12

Please sign in to comment.