Skip to content

Commit

Permalink
Observability - Helm chart releases (#63)
Browse files Browse the repository at this point in the history
* Observability - new Otel and Grafana helm #61
* Observability Helm charts
* GH worklow updates
* Chart dependencies
  • Loading branch information
katriendg authored Sep 29, 2023
1 parent 8bd1fce commit a534e25
Show file tree
Hide file tree
Showing 59 changed files with 4,159 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main - Release Helm Chart DNSMasq
name: Main - Release Helm Charts - DNSMasqAKS
on:
push:
branches:
Expand All @@ -21,12 +21,15 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo main-${GITHUB_SHA})

- name: Echo Docker images tag
run: echo ${{steps.vars.outputs.tag}}
- name: Setup Helm
uses: azure/setup-helm@v3.5
with:
version: v3.9.2

- name: Add Helm chart dependencies
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/Release-helm-edgeobservability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Main - Release Helm Charts - Observability
on:
push:
branches:
- main
paths:
# Only run this when chart file is updated.
- 'deployment/helm/edgeobservability/Chart.yaml'

jobs:
Release-Artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Setup Helm
uses: azure/setup-helm@v3.5
with:
version: v3.9.2

- name: Add Helm chart dependencies
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: deployment/helm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main - Release Helm Chart Envoy Proxy
name: Main - Release Helm Charts - Envoy
on:
push:
branches:
Expand All @@ -21,12 +21,15 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo main-${GITHUB_SHA})

- name: Echo Docker images tag
run: echo ${{steps.vars.outputs.tag}}
- name: Setup Helm
uses: azure/setup-helm@v3.5
with:
version: v3.9.2

- name: Add Helm chart dependencies
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main - Release Helm Chart IoT Edge Accelerator L2
name: Main - Release Helm Charts - L2
on:
push:
branches:
Expand All @@ -21,12 +21,15 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo main-${GITHUB_SHA})

- name: Echo Docker images tag
run: echo ${{steps.vars.outputs.tag}}
- name: Setup Helm
uses: azure/setup-helm@v3.5
with:
version: v3.9.2

- name: Add Helm chart dependencies
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main - Release Helm Chart IoT Edge Accelerator L4
name: Main - Release Helm Charts - L4
on:
push:
branches:
Expand All @@ -21,12 +21,15 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo main-${GITHUB_SHA})

- name: Echo Docker images tag
run: echo ${{steps.vars.outputs.tag}}
- name: Setup Helm
uses: azure/setup-helm@v3.5
with:
version: v3.9.2

- name: Add Helm chart dependencies
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main - Release Helm Chart Mosquitto Broker
name: Main - Release Helm Charts - Mosquitto
on:
push:
branches:
Expand All @@ -21,12 +21,15 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo main-${GITHUB_SHA})

- name: Echo Docker images tag
run: echo ${{steps.vars.outputs.tag}}
- name: Setup Helm
uses: azure/setup-helm@v3.5
with:
version: v3.9.2

- name: Add Helm chart dependencies
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/Release-helm-otelcollection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Main - Release Helm Charts - OtelCollection
on:
push:
branches:
- main
paths:
# Only run this when chart file is updated.
- 'deployment/helm/otelcollection/Chart.yaml'

jobs:
Release-Artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Setup Helm
uses: azure/setup-helm@v3.5
with:
version: v3.9.2

- name: Add Helm chart dependencies
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: deployment/helm
2 changes: 1 addition & 1 deletion deployment/helm/dnsmasqaks/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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.
version: 0.1.0
version: 0.2.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.
Expand Down
3 changes: 3 additions & 0 deletions deployment/helm/dnsmasqaks/templates/dnsmasq/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ data:
{{- range $key, $val := .Values.hostsDomains }}
{{ $dnsServer }} {{ $val }}
{{- end }}
{{- range $key, $val := .Values.customDomains }}
{{ $dnsServer }} {{ $val }}
{{- end }}
3 changes: 3 additions & 0 deletions deployment/helm/dnsmasqaks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ wildcardDomains:
docker_io: "docker.io" # temporary for mosquitto image # TODO remove once usage of connected container registry
azurecr_io: "azurecr.io" # temporary for dev images of this project # TODO remove once usage of connected container registry
githubusercontent_com: "githubusercontent.com" # for flux repo in GitHub
quay_io: "quay.io" # for images for cert-manager and otel operator
pkg_dev: "pkg.dev" # for images from registry.k8s.io - kube-state-metrics # TODO remove once usage of connected container registry
amazonaws_com: "amazonaws.com" # for images from registry.k8s.io - kube-state-metrics # TODO remove once usage of connected container registry

# Provide additional domains that you want to proxy through, pass the whole collection through Values
# customDomains:
Expand Down
1 change: 1 addition & 0 deletions deployment/helm/edgeobservability/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/charts
25 changes: 25 additions & 0 deletions deployment/helm/edgeobservability/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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/
.tgz
index.yaml
12 changes: 12 additions & 0 deletions deployment/helm/edgeobservability/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dependencies:
- name: tempo
repository: https://grafana.github.io/helm-charts
version: 0.16.2
- name: loki
repository: https://grafana.github.io/helm-charts
version: 2.16.0
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 24.3.0
digest: sha256:8dfb27c12c2c334b6ad22253880a1ecdd2f53b93c1afd5ce09b17adb1af2a49e
generated: "2023-09-06T15:50:33.6038669+02:00"
21 changes: 21 additions & 0 deletions deployment/helm/edgeobservability/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v2
name: edgeobservability
description: A Helm chart with observability components for Edge deployments.
version: 0.1.0

dependencies:
- name: tempo
repository: https://grafana.github.io/helm-charts
version: 0.16.2
condition: tempo.enabled

- name: loki
repository: https://grafana.github.io/helm-charts
version: 2.16.0
condition: loki.enabled

- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 24.3.0
condition: prometheus.enabled

42 changes: 42 additions & 0 deletions deployment/helm/edgeobservability/templates/grafana/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "grafana.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}


{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "grafana.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "grafana.labels" -}}
helm.sh/chart: {{ include "grafana.chart" . }}
{{ include "grafana.selectorLabels" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "grafana.selectorLabels" -}}
app.kubernetes.io/name: {{ include "grafana.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "grafana.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default "grafana" .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-config-dashboards
labels:
{{- include "grafana.labels" . | nindent 4 }}
data:
provider.yaml: |
apiVersion: 1
providers:
- allowUiUpdates: false
disableDeletion: false
folder: ""
name: sidecarProvider
options:
foldersFromFilesStructure: false
path: /tmp/dashboards
orgId: 1
type: file
updateIntervalSeconds: 30
Loading

0 comments on commit a534e25

Please sign in to comment.