Skip to content

Commit

Permalink
feat: release helm
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Dec 13, 2023
1 parent 41b9ce3 commit 2b5d4bf
Show file tree
Hide file tree
Showing 33 changed files with 902 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ env:
DOCKER_CACHE_BUCKET: "ci-cache"
DOCKER_CACHE_REGION: "APAC"

# Helm

jobs:
precommit:
name: Pre-commit Check
Expand Down Expand Up @@ -76,6 +74,28 @@ jobs:
S3_REGION: ${{ env.DOCKER_CACHE_REGION }}

LATEST_BRANCH: ${{ env.DOCKER_LATEST_BRANCH}}
publish:
name: Publish Helm
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: rlespinasse/github-slug-action@v3.x

- name: Publish
env:
GITHUB_REPO_REF: ${{ github.repository }}
GITHUB_SHA: ${{ github.sha }}
GITHUB_BRANCH: ${{ env.GITHUB_REF_SLUG_URL }}

DOMAIN: ${{ env.DOCKER_DOMAIN }}

DOCKER_PASSWORD: ${{ env.DOCKER_PASSWORD }}
DOCKER_USER: ${{ env.DOCKER_USER }}

run: nix develop .#ci -c scripts/ci/publish-helm.sh

release:
name: Semantic Release
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.task
.pre-commit-config.yaml

debug.yaml

.DS_Store
node_modules
/build
Expand Down
48 changes: 48 additions & 0 deletions Taskfile.helm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: "3"

includes:
lapras:
taskfile: tasks/Taskfile.helm.yml
vars:
LANDSCAPE: ".lapras"
tauros:
taskfile: tasks/Taskfile.helm.yml
vars:
LANDSCAPE: ".tauros"
pinsir:
taskfile: tasks/Taskfile.helm.yml
vars:
LANDSCAPE: ".pinsir"
absol:
taskfile: tasks/Taskfile.helm.yml
vars:
LANDSCAPE: ".absol"
raichu:
taskfile: tasks/Taskfile.helm.yml
vars:
LANDSCAPE: ".raichu"
pichu:
taskfile: tasks/Taskfile.helm.yml
vars:
LANDSCAPE: ".pichu"
pikachu:
taskfile: tasks/Taskfile.helm.yml
vars:
LANDSCAPE: ".pikachu"

tasks:
latest:
desc: Get latest helm chart dependency versions
cmds:
- >-
echo "sulfoxide-bromine: $(skopeo list-tags docker://ghcr.io/atomicloud/sulfoxide.bromine/sulfoxide-bromine
| jq -r '.Tags[]' | sort -V | tail -n 1)"
- >-
echo "postgresql: $(skopeo list-tags docker://registry-1.docker.io/bitnamicharts/postgresql
| jq -r '.Tags[]' | sort -V | tail -n 1)"
- >-
echo "minio: $(skopeo list-tags docker://registry-1.docker.io/bitnamicharts/minio
| jq -r '.Tags[]' | sort -V | tail -n 1)"
- >-
echo "dragonfly: $(skopeo list-tags docker://ghcr.io/dragonflydb/dragonfly/helm/dragonfly
| jq -r '.Tags[]' | sort -V | tail -n 1)"
4 changes: 4 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ vars:
SERVICE: helium
USER: kirinnee/

CHART_PATH: infra/root_chart
RELEASE_NAME: nitroso-helium

includes:
docker: tasks/Taskfile.docker.yaml
helm: Taskfile.helm.yml

tasks:
setup:
Expand Down
3 changes: 3 additions & 0 deletions atomi_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ plugins:
- module: "@semantic-release/exec"
config:
prepareCmd: scripts/ci/publish.sh ${nextRelease.version}
- module: "@semantic-release/exec"
config:
prepareCmd: scripts/ci/publish-helm.sh ${nextRelease.version}
- module: "@semantic-release/github"

# Angular Conventional Commit Example: https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines
Expand Down
33 changes: 33 additions & 0 deletions config/app/pichu.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=./schema.json
$schema: ./schema.json

app:
landscape: pichu
caches:
live:
endpoints:
0: tin-livecache:6379
tls: false
otel:
logging:
enabled: true
level: info
prettify: false
safe: true
metrics:
exporter:
interval: 1000
use: otlp
otlp:
compression: gzip
headers: {}
timeout: 3000
url: "http://silicon-otlp-collector.sulfoxide.svc:4318"
trace:
exporter:
use: otlp
otlp:
compression: gzip
headers: {}
timeout: 3000
url: "http://silicon-otlp-collector.sulfoxide.svc:4318"
33 changes: 33 additions & 0 deletions config/app/pikachu.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=./schema.json
$schema: ./schema.json

app:
landscape: pikachu
caches:
live:
endpoints:
0: tin-livecache:6379
tls: false
otel:
logging:
enabled: true
level: info
prettify: false
safe: true
metrics:
exporter:
interval: 1000
use: otlp
otlp:
compression: gzip
headers: {}
timeout: 3000
url: "http://silicon-otlp-collector.sulfoxide.svc:4318"
trace:
exporter:
use: otlp
otlp:
compression: gzip
headers: {}
timeout: 3000
url: "http://silicon-otlp-collector.sulfoxide.svc:4318"
33 changes: 33 additions & 0 deletions config/app/raichu.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=./schema.json
$schema: ./schema.json

app:
landscape: raichu
caches:
live:
endpoints:
0: tin-livecache:6379
tls: false
otel:
logging:
enabled: true
level: info
prettify: false
safe: true
metrics:
exporter:
interval: 1000
use: otlp
otlp:
compression: gzip
headers: {}
timeout: 3000
url: "http://silicon-otlp-collector.sulfoxide.svc:4318"
trace:
exporter:
use: otlp
otlp:
compression: gzip
headers: {}
timeout: 3000
url: "http://silicon-otlp-collector.sulfoxide.svc:4318"
23 changes: 23 additions & 0 deletions infra/root_chart/.helmignore
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/
6 changes: 6 additions & 0 deletions infra/root_chart/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: sulfoxide-bromine
repository: oci://ghcr.io/atomicloud/sulfoxide.bromine
version: 1.3.0
digest: sha256:87f9a17135d9751b34e6a250be4165aa0cc36d15390f9efef5d657fc777f9bc6
generated: "2023-12-13T23:06:50.21722+08:00"
14 changes: 14 additions & 0 deletions infra/root_chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v2
name: root-chart
description: Root Chart to a single Service

type: application
version: 0.1.0
appVersion: "1.16.0"

dependencies:
- name: sulfoxide-bromine
version: 1.3.0
condition: bromine.enable
alias: bromine
repository: oci://ghcr.io/atomicloud/sulfoxide.bromine
31 changes: 31 additions & 0 deletions infra/root_chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# root-chart

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

Root Chart to a single Service

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| oci://ghcr.io/atomicloud/sulfoxide.bromine | bromine(sulfoxide-bromine) | 1.3.0 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| appSettings | object | `{}` | |
| bromine.annotations."argocd.argoproj.io/sync-wave" | string | `"1"` | |
| bromine.enable | bool | `true` | |
| bromine.rootSecret | object | `{"ref":"NITROSO_HELIUM"}` | Secret of Secrets reference |
| bromine.rootSecret.ref | string | `"NITROSO_HELIUM"` | DOPPLER Token Reference |
| bromine.storeName | string | `"nitroso-helium"` | Store name to create |
| bromine.target | string | `"nitroso-helium"` | |
| serviceTree.landscape | string | `"lapras"` | |
| serviceTree.layer | string | `"2"` | |
| serviceTree.module | string | `"pollee"` | |
| serviceTree.platform | string | `"nitroso"` | |
| serviceTree.service | string | `"helium"` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
33 changes: 33 additions & 0 deletions infra/root_chart/app/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=./schema.json
$schema: ./schema.json

app:
landscape: lapras
platform: nitroso
service: helium
module: pollee
caches:
live:
autoResubscribe: true
commandTimeout: 3000
connectTimeout: 3000
enableAutoPipelining: true
endpoints:
0: tin-livecache:6379
keyPrefix: ""
password: supersecret
readOnly: false
tls: false
otel:
logging:
enabled: true
level: info
prettify: false
safe: true
metrics:
exporter:
interval: 1000
use: none
trace:
exporter:
use: none
17 changes: 17 additions & 0 deletions infra/root_chart/app/lapras.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=./schema.json
$schema: ./schema.json

app:
landscape: lapras
caches:
live:
endpoints:
0: localhost:6379
password: supersecret
tls: false
otel:
logging:
enabled: true
level: info
prettify: true
safe: true
33 changes: 33 additions & 0 deletions infra/root_chart/app/pichu.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=./schema.json
$schema: ./schema.json

app:
landscape: pichu
caches:
live:
endpoints:
0: tin-livecache:6379
tls: false
otel:
logging:
enabled: true
level: info
prettify: false
safe: true
metrics:
exporter:
interval: 1000
use: otlp
otlp:
compression: gzip
headers: {}
timeout: 3000
url: "http://silicon-otlp-collector.sulfoxide.svc:4318"
trace:
exporter:
use: otlp
otlp:
compression: gzip
headers: {}
timeout: 3000
url: "http://silicon-otlp-collector.sulfoxide.svc:4318"
Loading

0 comments on commit 2b5d4bf

Please sign in to comment.