-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
696 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: PKG | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check-out the repository | ||
uses: actions/checkout@v4 | ||
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: Install Helm | ||
uses: azure/setup-helm@v4.2.0 | ||
with: | ||
version: v3.14.0 | ||
- name: Add dependency Helm chart repositories | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo update | ||
- name: Host charts repository on GitHub Pages | ||
uses: helm/chart-releaser-action@v1.6.0 | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
- name: Setup Go environment | ||
uses: actions/setup-go@v5 | ||
- name: Generate index.html | ||
run: | | ||
go install github.com/halkeye/helm-repo-html@v0.0.8 | ||
/home/runner/go/bin/helm-repo-html | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v1 | ||
- name: Build with Jekyll | ||
uses: actions/jekyll-build-pages@v1 | ||
with: | ||
source: ./ | ||
destination: ./_site | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# local downloaded chart compressed files | ||
/**/charts/*.tgz | ||
|
||
# local temporary files | ||
temp*.yaml | ||
temp.sh | ||
/charts/temp/ | ||
values_*.y*ml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
checks: | ||
addAllBuiltIn: true | ||
exclude: | ||
- "no-read-only-root-fs" | ||
- "unset-cpu-requirements" | ||
- "unset-memory-requirements" | ||
ignorePaths: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Helm Charts | ||
|
||
## Catalog | ||
|
||
* [Cow Demo](cow-demo/README.md) | ||
* [Game 2048](game-2048/README.md) | ||
* [Let's Encrypt](letsencrypt/README.md) | ||
* [WordPress](wordpress/README.md) | ||
|
||
## Developer's guide | ||
|
||
```bash | ||
# lints a chart | ||
helm lint . | ||
|
||
# creates Kubernetes template file from chart (for review/comparison) | ||
helm template myname . -f values.yaml --namespace demo > temp.yaml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v2 | ||
name: cow-demo | ||
description: Helm chart for Cow Demo Application | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "2.0.0" | ||
home: https://github.com/SUSE/lab-setup/tree/main/charts/cow-demo | ||
maintainers: | ||
- name: devpro | ||
email: bertrand.thomas@suse.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Cow Demo Helm Chart | ||
|
||
This chart will install the "Cow Demo" web application in a Kubernetes cluster. | ||
|
||
## Quick start | ||
|
||
Install the app with default settings: | ||
|
||
```bash | ||
# adds the repo | ||
helm repo add devpro https://devpro.github.io/helm-charts | ||
helm repo update | ||
|
||
# installs the chart | ||
helm upgrade --install cow-demo devpro/cow-demo --namespace demo --create-namespace | ||
``` | ||
|
||
Look at [values.yaml](values.yaml) for the configuration. | ||
|
||
Clean-up: | ||
|
||
```bash | ||
helm delete cow-demo | ||
kubectl delete ns demo | ||
``` |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{{- $name := $.Values.name -}} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ $name }} | ||
labels: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
spec: | ||
replicas: {{ $.Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
spec: | ||
containers: | ||
- name: webapp | ||
image: "{{ $.Values.image }}:{{ $.Values.tag }}" | ||
imagePullPolicy: Always | ||
env: | ||
- name: CONTAINER_COLOR | ||
value: {{ $.Values.pet.color }} | ||
- name: PETS | ||
value: {{ $.Values.pet.type }} | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
protocol: TCP | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{{- if $.Values.ingress.enabled -}} | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $.Values.name }} | ||
{{- with $.Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if $.Values.ingress.className }} | ||
ingressClassName: {{ $.Values.ingress.className }} | ||
{{- end }} | ||
rules: | ||
- {{- if $.Values.ingress.host }} | ||
host: {{ $.Values.ingress.host }} | ||
{{- end }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ $.Values.name }} | ||
port: | ||
number: {{ $.Values.port }} | ||
{{- if $.Values.ingress.tls }} | ||
tls: | ||
- hosts: | ||
- {{ $.Values.ingress.host | quote }} | ||
secretName: {{ $.Values.ingress.tls.secretName }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- $name := $.Values.name -}} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ $name }} | ||
labels: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
ports: | ||
- name: http | ||
port: {{ $.Values.port }} | ||
protocol: TCP | ||
targetPort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: cow-demo | ||
image: devprofr/cow-demo | ||
tag: 1.0.8830193847 | ||
replicaCount: 2 | ||
port: 80 | ||
ingress: | ||
enabled: false | ||
className: "nginx" | ||
host: "" | ||
annotations: {} | ||
# nginx.ingress.kubernetes.io/ssl-redirect: "false" | ||
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" | ||
# cert-manager.io/cluster-issuer: letsencrypt-prod | ||
tls: | ||
secretName: "cow-demo-tls" | ||
pet: | ||
# choice: cows, chameleons, cowmeleons | ||
type: cows | ||
# choice: red, orange, yellow, olive, green, teal, blue, violet, purple, pink, black | ||
color: blue | ||
resources: {} | ||
# limits: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
# requests: | ||
# cpu: 100m | ||
# memory: 64Mi |
Oops, something went wrong.