Skip to content

Commit 44897fa

Browse files
authored
Merge branch 'main' into test
2 parents 8d5cc61 + 1fbce41 commit 44897fa

File tree

23 files changed

+705
-4
lines changed

23 files changed

+705
-4
lines changed

.github/workflow-extras/ct.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ validate-yaml: true
1212
debug: true
1313
upgrade: true
1414
helm-extra-set-args: "--set=replicaCount=1"
15-
excluded-charts: []
15+
excluded-charts: []
16+

.github/workflow-extras/helm-docs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -euo pipefail
33

4+
45
HELM_DOCS_VERSION="1.11.3"
56

67
# Function to install helm-docs
@@ -46,4 +47,4 @@ if ! git diff --exit-code; then
4647
exit 1
4748
fi
4849

49-
echo "✅ Documentation is up to date."
50+
echo "✅ Documentation is up to date."

.github/workflow-extras/kubeval.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/master -- charts | grep '[cC]hart.yaml' | sed -e 's#/[Cc]hart.yaml##g')"
5+
KUBEVAL_VERSION="0.15.0"
6+
SCHEMA_LOCATION="https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/"
7+
8+
# install kubeval
9+
curl --silent --show-error --fail --location --output /tmp/kubeval.tar.gz https://github.com/instrumenta/kubeval/releases/download/"${KUBEVAL_VERSION}"/kubeval-linux-amd64.tar.gz
10+
tar -xf /tmp/kubeval.tar.gz kubeval
11+
12+
# validate charts
13+
for CHART_DIR in ${CHART_DIRS}; do
14+
helm template "${CHART_DIR}" | ./kubeval --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}"
15+
done

.github/workflows/ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
KUBECONFORM_VERSION: "0.6.4"
1313
HELM_DOCS_VERSION: "1.11.3"
1414

15+
1516
jobs:
1617
lint-chart:
1718
runs-on: ubuntu-latest
@@ -150,4 +151,4 @@ jobs:
150151
uses: helm/chart-testing-action@v2.6.1
151152
with:
152153
command: install
153-
config: .github/workflow-extras/ct.yaml
154+
config: .github/workflow-extras/ct.yaml

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
if: success()
5252
steps:
5353
- name: Notify success
54-
run: echo "Charts released successfully"
54+
run: echo "Charts released successfully"

incubator/homer/.helmignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
.vscode/

incubator/homer/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v1
2+
appVersion: "20.07.2"
3+
description: A Helm chart for Homer https://github.com/bastienwirtz/homer
4+
name: homer
5+
version: 0.0.1
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
1. Get the application URL by running these commands:
2+
{{- if .Values.ingress.enabled }}
3+
{{- range $host := .Values.ingress.hosts }}
4+
{{- range .paths }}
5+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
6+
{{- end }}
7+
{{- end }}
8+
{{- else if contains "NodePort" .Values.service.type }}
9+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "jenkins-relay.fullname" . }})
10+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11+
echo http://$NODE_IP:$NODE_PORT
12+
{{- else if contains "LoadBalancer" .Values.service.type }}
13+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "jenkins-relay.fullname" . }}'
15+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "jenkins-relay.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16+
echo http://$SERVICE_IP:{{ .Values.service.port }}
17+
{{- else if contains "ClusterIP" .Values.service.type }}
18+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "jenkins-relay.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19+
echo "Visit http://127.0.0.1:8080 to use your application"
20+
kubectl port-forward $POD_NAME 8080:80
21+
{{- end }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "homer.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "homer.fullname" -}}
15+
{{- if .Values.fullnameOverride -}}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17+
{{- else -}}
18+
{{- $name := default .Chart.Name .Values.nameOverride -}}
19+
{{- if contains $name .Release.Name -}}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21+
{{- else -}}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23+
{{- end -}}
24+
{{- end -}}
25+
{{- end -}}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "homer.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32+
{{- end -}}
33+
34+
{{/*
35+
Common labels
36+
*/}}
37+
{{- define "homer.labels" -}}
38+
app.kubernetes.io/name: {{ include "homer.name" . }}
39+
helm.sh/chart: {{ include "homer.chart" . }}
40+
app.kubernetes.io/instance: {{ .Release.Name }}
41+
{{- if .Chart.AppVersion }}
42+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
43+
{{- end }}
44+
app.kubernetes.io/managed-by: {{ .Release.Service }}
45+
{{- end -}}
46+
47+
{{/*
48+
Create the name of the service account to use
49+
*/}}
50+
{{- define "homer.serviceAccountName" -}}
51+
{{- if .Values.serviceAccount.create -}}
52+
{{ default (include "homer.fullname" .) .Values.serviceAccount.name }}
53+
{{- else -}}
54+
{{ default "default" .Values.serviceAccount.name }}
55+
{{- end -}}
56+
{{- end -}}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: "{{ template "homer.fullname" . }}-conf"
5+
data:
6+
config.yml: |
7+
title: {{ .Values.title.text }}
8+
icon: {{ .Values.title.icon }}
9+
header: {{ .Values.header }}
10+
footer: {{ .Values.footer }}
11+
12+
{{- if .Values.message }}
13+
message:
14+
style: {{ .Values.message.style }}
15+
title: {{ .Values.message.title }}
16+
content: {{ .Values.message.content }}
17+
{{- end }}
18+
19+
{{- if .Values.links }}
20+
links:
21+
{{- range .Values.links }}
22+
- name: "{{ .name }}"
23+
icon: "{{ .icon }}"
24+
url: "{{ .url }}"
25+
target: "{{ .target }}"
26+
{{- end }}
27+
{{- end }}
28+
29+
columns: {{ .Values.columns }}
30+
connectivityCheck: {{ .Values.connectivityCheck }}
31+
theme: {{ .Values.theme }}
32+
33+
colors:
34+
light:
35+
highlight-primary: {{ .Values.colors.light.highlight_primary }}
36+
highlight-secondary: {{ .Values.colors.light.highlight_secondary }}
37+
highlight-hover: {{ .Values.colors.light.highlight_hover }}
38+
background: {{ .Values.colors.light.background }}
39+
card-background: {{ .Values.colors.light.card_background }}
40+
text: {{ .Values.colors.light.text }}
41+
text-header: {{ .Values.colors.light.text_header }}
42+
text-title: {{ .Values.colors.light.text_title }}
43+
text-subtitle: {{ .Values.colors.light.text_subtitle }}
44+
card-shadow: {{ .Values.colors.light.card_shadow }}
45+
link-hover: {{ .Values.colors.light.link_hover }}
46+
background-image: {{ .Values.colors.light.background_image }}
47+
dark:
48+
highlight-primary: {{ .Values.colors.dark.highlight_primary }}
49+
highlight-secondary: {{ .Values.colors.dark.highlight_secondary }}
50+
highlight-hover: {{ .Values.colors.dark.highlight_hover }}
51+
background: {{ .Values.colors.dark.background }}
52+
card-background: {{ .Values.colors.dark.card_background }}
53+
text: {{ .Values.colors.dark.text }}
54+
text-header: {{ .Values.colors.dark.text_header }}
55+
text-title: {{ .Values.colors.dark.text_title }}
56+
text-subtitle: {{ .Values.colors.dark.text_subtitle }}
57+
card-shadow: {{ .Values.colors.dark.card_shadow }}
58+
link-hover: {{ .Values.colors.dark.link_hover }}
59+
background-image: {{ .Values.colors.dark.background_image }}
60+
services:
61+
{{- range .Values.services }}
62+
- name: {{ .name}}
63+
icon: {{ .icon }}
64+
items: {{- if .items }}{{- else }}[]{{- end }}
65+
{{- range .items }}
66+
- name: {{ .name }}
67+
icon: {{ .icon }}
68+
url: {{ .url }}
69+
target: {{ .target }}
70+
{{- end }}
71+
{{- end }}
72+
73+

0 commit comments

Comments
 (0)