Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CCOLLOT authored Jan 30, 2025
0 parents commit 4256536
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# All files are owned by the infrastructure team
* @stacc/platform-infrastructure
1 change: 1 addition & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
titleOnly: true
26 changes: 26 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# config docs: https://github.com/probot/stale#usage
exemptLabels:
- security
- pinned
- rickroll

pulls:
daysUntilStale: 7
markComment: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days if no further activity occurs. Thank you
for your contributions.
daysUntilClose: 7
closeComment: >
This pull request has been automatically closed.
issues:
daysUntilStale: 14
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days if no further activity occurs. Thank you
for your contributions.
daysUntilClose: 7
closeComment: >
This issue has been automatically closed.
9 changes: 9 additions & 0 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: create-tag-release
on: push
jobs:
helm-unittest:
uses: stacc/platform-github-actions/.github/workflows/helm-unittest.yaml@main
create-tag-release:
if: github.ref == 'refs/heads/main'
uses: stacc/platform-github-actions/.github/workflows/tag-release.yaml@main
needs: helm-unittest
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore chart lock file
chart.lock

# Ignore other undesired files
*.tmp
*.bak
rendered
charts/
rendered.yaml
tmp
Chart.lock
8 changes: 8 additions & 0 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v2
name: chartName
version: 0.0.1
description: Helm Chart for chartName
dependencies:
- name: chartName
version: 0.0.1
repository: https://charts.chartName.io
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# helm-chart
git repository template for helm charts
17 changes: 17 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# https://taskfile.dev

version: '3'

env:
CHART_DIR: "."

tasks:
build:
cmds:
- helm dependency build $CHART_DIR
test:
cmds:
- helm unittest $CHART_DIR
template:
cmds:
- helm template ${CHART_DIR} > rendered.yaml
21 changes: 21 additions & 0 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.chartName.createDeployment -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
{{- end }}
16 changes: 16 additions & 0 deletions tests/claim_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
suite: test deployment
templates:
- templates/deployment.yaml
tests:
- it: check deployment creation
set:
chartName.createDeployment: true
asserts:
- hasDocuments:
count: 1
- it: check deployment disabled
values:
- values/values.yaml
asserts:
- hasDocuments:
count: 0
2 changes: 2 additions & 0 deletions tests/values/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
chartName:
createDeployment: false
2 changes: 2 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
chartName:
createDeployment: true

0 comments on commit 4256536

Please sign in to comment.