Skip to content

Commit b852816

Browse files
committed
feat: convert services to new install script template (#1282)
Feature: Refactor Service Installation Scripts to Use Standard Template This PR updates all services install/upgrade script to conform to the standard bash template. Key Changes & Benefits: Standardization: Adopts the robust, array-based command construction (helm_command) for safer execution and argument quoting. Dynamic Values Loading: Switches to the standard loop logic for reliably including all .yaml files from both the base and custom override directories (/opt/genestack/base-helm-configs/redis-sentinel and /etc/genestack/helm-configs/redis-sentinel). Improved Reliability: Ensures consistent extraction of the service chart version using the defined SERVICE_NAME variable. GITHUB ACTIONS: Ensures that a github action exists for each service for pre-commit checking This change reduces technical debt and makes the script easier to audit and maintain.
1 parent 0b07a63 commit b852816

File tree

76 files changed

+4203
-2899
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+4203
-2899
lines changed

.github/workflows/helm-loki.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ jobs:
2828
run: |
2929
${{ steps.helm.outputs.helm-path }} repo add grafana https://grafana.github.io/helm-charts
3030
${{ steps.helm.outputs.helm-path }} repo update
31-
${{ steps.helm.outputs.helm-path }} template --values ${{ github.workspace }}/base-helm-configs/loki/loki-helm-minio-overrides-example.yaml \
31+
${{ steps.helm.outputs.helm-path }} template -f ${{ github.workspace }}/base-helm-configs/loki/loki-helm-minio-overrides-example.yaml \
3232
--set loki.useTestSchema=true \
3333
--namespace grafana \
34+
--set loki.storage.bucketNames.chunks=chunky \
3435
loki grafana/loki > /tmp/rendered.yaml
3536
- name: Return helm Build
3637
uses: actions/upload-artifact@v4

.github/workflows/helm-prometheus-mysql-exporter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
${{ steps.helm.outputs.helm-path }} template prometheus-mysql-exporter prometheus-community/prometheus-mysql-exporter \
3232
--create-namespace \
3333
--namespace=prometheus \
34-
-f ${{ github.workspace }}//base-helm-configs/prometheus-mysql-exporter/values.yaml \
34+
-f ${{ github.workspace }}//base-helm-configs/prometheus-mysql-exporter/prometheus-mysql-exporter-helm-overrides.yaml \
3535
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
3636
--post-renderer-args prometheus-mysql-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
3737
- name: Return helm Build

.github/workflows/helm-prometheus-postgres-exporter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
${{ steps.helm.outputs.helm-path }} template prometheus prometheus-community/prometheus-postgres-exporter \
3232
--create-namespace \
3333
--namespace=prometheus \
34-
-f ${{ github.workspace }}//base-helm-configs/prometheus-postgres-exporter/values.yaml \
34+
-f ${{ github.workspace }}//base-helm-configs/prometheus-postgres-exporter/prometheus-postgres-exporter-helm-overrides.yaml \
3535
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
3636
--post-renderer-args prometheus-postgres-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
3737
- name: Return helm Build

.github/workflows/helm-prometheus-pushgateway.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
${{ steps.helm.outputs.helm-path }} template prometheus-pushgateway prometheus-community/prometheus-pushgateway \
3232
--create-namespace \
3333
--namespace=prometheus \
34-
-f ${{ github.workspace }}//base-helm-configs/prometheus-pushgateway/values.yaml \
34+
-f ${{ github.workspace }}//base-helm-configs/prometheus-pushgateway/prometheus-pushgateway-helm-overrides.yaml \
3535
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
3636
--post-renderer-args prometheus-pushgateway/${{ matrix.overlays }} > /tmp/rendered.yaml
3737
- name: Return helm Build
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Helm GitHub Actions for redis-sentinel
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- base-helm-configs/redis-sentinel/**
7+
- base-kustomize/redis-sentinel/**
8+
- .github/workflows/helm-redis-sentinel.yaml
9+
jobs:
10+
helm:
11+
strategy:
12+
matrix:
13+
overlays:
14+
- base
15+
name: Helm
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- uses: azure/setup-helm@v3
21+
with:
22+
version: latest
23+
token: "${{ secrets.GITHUB_TOKEN }}"
24+
id: helm
25+
- name: Add ot-helm (redis) to helm
26+
run: |
27+
${{ steps.helm.outputs.helm-path }} repo add ot-helm https://ot-container-kit.github.io/helm-charts/
28+
${{ steps.helm.outputs.helm-path }} repo update
29+
- name: Run Helm Template
30+
run: |
31+
${{ steps.helm.outputs.helm-path }} template redis-sentinel ot-helm/redis-sentinel \
32+
--create-namespace \
33+
--namespace=redis-system \
34+
-f ${{ github.workspace }}//base-helm-configs/redis-sentinel/redis-sentinel-helm-overrides.yaml \
35+
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
36+
--post-renderer-args redis-sentinel/${{ matrix.overlays }} > /tmp/rendered.yaml
37+
- name: Return helm Build
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: helm-redis-sentinel-artifact-${{ matrix.overlays }}
41+
path: /tmp/rendered.yaml

base-helm-configs/barbican/barbican-helm-overrides.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
images:
33
tags:
4-
barbican_api: "ghcr.io/rackerlabs/genestack-images/barbican:2024.1-latest"
5-
barbican_db_sync: "ghcr.io/rackerlabs/genestack-images/barbican:2024.1-latest"
6-
bootstrap: "ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest"
7-
db_drop: "ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest"
8-
db_init: "ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest"
9-
dep_check: "ghcr.io/rackerlabs/genestack-images/kubernetes-entrypoint:latest"
10-
image_repo_sync: null
11-
ks_endpoints: "ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest"
12-
ks_service: "ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest"
13-
ks_user: "ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest"
14-
rabbit_init: null
15-
scripted_test: "ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest"
4+
barbican_api: ghcr.io/rackerlabs/genestack-images/barbican:2024.1-latest
5+
barbican_db_sync: ghcr.io/rackerlabs/genestack-images/barbican:2024.1-latest
6+
bootstrap: ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest
7+
db_drop: ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest
8+
db_init: ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest
9+
dep_check: ghcr.io/rackerlabs/genestack-images/kubernetes-entrypoint:latest
10+
image_repo_sync:
11+
ks_endpoints: ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest
12+
ks_service: ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest
13+
ks_user: ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest
14+
rabbit_init:
15+
scripted_test: ghcr.io/rackerlabs/genestack-images/heat:2024.1-latest
1616

1717
# NOTE: (brew) CPU requests values based on a three node
1818
# hyperconverged lab (/scripts/hyperconverged-lab.sh).
@@ -22,8 +22,8 @@ pod:
2222
enabled: true
2323
api:
2424
requests:
25-
memory: "256Mi"
26-
cpu: "100m"
25+
memory: 256Mi
26+
cpu: 100m
2727
limits: {}
2828
lifecycle:
2929
upgrades:
@@ -37,7 +37,7 @@ pod:
3737
dependencies:
3838
static:
3939
db_sync:
40-
jobs: null
40+
jobs:
4141
api:
4242
jobs:
4343
- barbican-db-sync
@@ -47,7 +47,7 @@ dependencies:
4747
conf:
4848
barbican:
4949
DEFAULT:
50-
host_href: "http://barbican-api.openstack.svc.cluster.local:9311"
50+
host_href: http://barbican-api.openstack.svc.cluster.local:9311
5151
database:
5252
connection_debug: 0
5353
connection_recycle_time: 600
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
---

0 commit comments

Comments
 (0)