Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Helm for DB config, MariaDB configurable storage #531

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
3 changes: 3 additions & 0 deletions .github/chart-testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
helm-extra-args: --timeout 600
check-version-increment: true
debug: true
36 changes: 36 additions & 0 deletions .github/workflows/helm-charts-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint Charts

on:
workflow_dispatch:
pull_request:
paths:
- 'helm-charts/**'
- .github/workflows/hehelm-helm-charts-lint.yaml
merge_group:
types: [checks_requested]

jobs:
lint-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Run chart-testing (lint)
uses: helm/[email protected]
with:
command: lint
config: .github/chart-testing.yaml
- name: Install helm-docs
uses: gabe565/[email protected]
- name: Generate documentation
uses: losisin/[email protected]
id: generate
with:
chart-search-root: "helm-charts/"
# ensures that no value changes are committed without updating the
# documentation.
fail-on-diff: true
- name: Show diff
if: ${{ failure() && steps.generate.conclusion == 'failure' }}
run:
git diff
40 changes: 40 additions & 0 deletions .github/workflows/helm-charts-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Charts

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'helm-charts/**'
- .github/workflows/helm-charts-release.yaml
merge_group:
types: [checks_requested]

jobs:
release:
strategy:
matrix:
charts: [understackdb]

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Read Helm chart
run: |
VERSION=$(yq .version helm-charts/${{ matrix.charts }}/Chart.yaml)
echo "helm_chart_version=${VERSION}" >> "$GITHUB_OUTPUT"
id: read_helm_chart

- name: Push Helm chart
uses: appany/[email protected]
with:
name: ${{ matrix.charts }}
repository: rackerlabs/understack
tag: ${{ steps.read_helm_chart.outputs['helm_chart_version'] }}
path: helm-charts/${{ matrix.charts }}/
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
7 changes: 0 additions & 7 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ on:
types: [checks_requested]

jobs:
lint-yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: pip install yamllint
- run: yamllint -c .yamllint.yaml --format github .

kustomize:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-yaml
args:
- --allow-multiple-documents
exclude: mkdocs.yml
exclude: "^(helm-charts\/.*/templates/.*|mkdocs.yml)"
- id: check-yaml
name: check-yaml-mkdocs
# --unsafe is a workaround for the use of !! in mkdocs.yml
Expand All @@ -24,6 +24,7 @@ repos:
hooks:
- id: yamllint
args: [-c, .yamllint.yaml]
exclude: "^helm-charts\/.*/templates/.*"
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.4
hooks:
Expand Down Expand Up @@ -85,3 +86,8 @@ repos:
- "requests"
- "sushy"
- "types-requests"
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.24
hooks:
- id: helmlint
files: "^helm-charts\/"
20 changes: 20 additions & 0 deletions apps/appsets/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,26 @@ spec:
targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}'
ref: deploy
path: '{{.name}}/manifests/dex'
- component: understackdb
skipComponent: '{{has "understackdb" ((default "[]" (index .metadata.annotations "uc_skip_components") | fromJson))}}'
sources:
- repoURL: ghcr.io
chart: rackerlabs/understack/understackdb
targetRevision: 0.1.0
helm:
releaseName: understackdb
valueFiles:
- $understack/components/understackdb/values.yaml
- $deploy/{{.name}}/helm-configs/understackdb.yaml
ignoreMissingValueFiles: true
- repoURL: '{{index .metadata.annotations "uc_repo_git_url"}}'
targetRevision: '{{index .metadata.annotations "uc_repo_ref"}}'
path: 'components/understackdb'
ref: understack
- repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}'
targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}'
ref: deploy
path: '{{.name}}/manifests/understackdb'
- component: openstack
skipComponent: '{{has "openstack" ((default "[]" (index .metadata.annotations "uc_skip_components") | fromJson))}}'
sources:
Expand Down
52 changes: 0 additions & 52 deletions components/glance/glance-mariadb-db.yaml

This file was deleted.

1 change: 0 additions & 1 deletion components/glance/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- glance-mariadb-db.yaml
- glance-rabbitmq-queue.yaml
52 changes: 0 additions & 52 deletions components/horizon/horizon-mariadb-db.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions components/horizon/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- horizon-mariadb-db.yaml
resources: []
52 changes: 0 additions & 52 deletions components/ironic/ironic-mariadb-db.yaml

This file was deleted.

1 change: 0 additions & 1 deletion components/ironic/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ironic-mariadb-db.yaml
- ironic-rabbitmq-queue.yaml
- dnsmasq-pvc.yaml
- dnsmasq-cm.yaml
Expand Down
52 changes: 0 additions & 52 deletions components/keystone/keystone-mariadb-db.yaml

This file was deleted.

1 change: 0 additions & 1 deletion components/keystone/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- keystone-mariadb-db.yaml
- keystone-rabbitmq-queue.yaml
- external-secret-keystone-sso.yaml
1 change: 0 additions & 1 deletion components/neutron/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- neutron-mariadb-db.yaml
- neutron-rabbitmq-queue.yaml
Loading
Loading