Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Commit c4f517d

Browse files
committed
Initial commit
0 parents  commit c4f517d

File tree

76 files changed

+5087
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+5087
-0
lines changed

.envrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#shellcheck disable=SC2148,SC2155
2+
export KUBECONFIG=$(expand_path ./kubeconfig)

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sops.* diff=sopsdiffer

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
2+
* @onedr0p

.github/ISSUE_TEMPLATE/bug-report.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: kind/bug
6+
assignees: ''
7+
8+
---
9+
10+
# Details
11+
12+
**What steps did you take and what happened:**
13+
14+
<!-- Note: This should be a clear and concise description of what the bug is. -->
15+
16+
**What did you expect to happen:**
17+
18+
**Anything else you would like to add:**
19+
20+
<!-- Note: Miscellaneous information that will assist in solving the issue. -->
21+
22+
**Additional Information:**
23+
24+
<!-- Note: Anything to give further context to the bug report. -->

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discuss on Discord
4+
url: https://discord.com/invite/sTMX7Vh
5+
about: Join our Discord community
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: kind/enhancement
6+
assignees: ''
7+
8+
---
9+
10+
# Details
11+
12+
**Describe the solution you'd like:**
13+
14+
<!-- Note: A clear and concise description of what you want to happen. -->
15+
16+
**Anything else you would like to add:**
17+
18+
<!-- Note: Miscellaneous information that will assist in solving the issue. -->
19+
20+
**Additional Information:**
21+
22+
<!-- Note: Anything to give further context to the requested new feature. -->

.github/ISSUE_TEMPLATE/question.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Question
3+
about: Ask a question to the maintainer
4+
title: ''
5+
labels: kind/question
6+
assignees: ''
7+
8+
---
9+
10+
# Details
11+
12+
**Ask your question:**
13+
14+
<!-- Note: A clear and concise query of what you want to ask. -->
15+
16+
<!-- Besides asking here, you can also ask in the following Discussion board or Discord -->
17+
18+
<!-- Discussion board: https://github.com/k8s-at-home/charts/discussions -->
19+
<!-- Discord: https://discord.gg/sTMX7Vh -->

.github/PULL_REQUEST_TEMPLATE.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
**Description of the change**
2+
3+
<!-- Describe the scope of your change - i.e. what the change does. -->
4+
5+
**Benefits**
6+
7+
<!-- What benefits will be realized by the code change? -->
8+
9+
**Possible drawbacks**
10+
11+
<!-- Describe any known limitations with your change -->
12+
13+
**Applicable issues**
14+
15+
<!-- Enter any applicable Issues here (You can reference an issue using #) -->
16+
- fixes #
17+
18+
**Additional information**
19+
20+
<!-- If there's anything else that's important and relevant to your pull request, mention that information here.-->

.github/lint/.markdownlint.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
default: true
3+
4+
# MD013/line-length - Line length
5+
MD013:
6+
# Number of characters
7+
line_length: 240
8+
# Number of characters for headings
9+
heading_line_length: 80
10+
# Number of characters for code blocks
11+
code_block_line_length: 80
12+
# Include code blocks
13+
code_blocks: true
14+
# Include tables
15+
tables: true
16+
# Include headings
17+
headings: true
18+
# Include headings
19+
headers: true
20+
# Strict length checking
21+
strict: false
22+
# Stern length checking
23+
stern: false

.github/lint/.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.sops.*
2+
gotk-components.yaml

.github/lint/.prettierrc.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
trailingComma: "es5"
3+
tabWidth: 2
4+
semi: false
5+
singleQuote: false

.github/lint/.yamllint.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ignore: |
2+
*.sops.*
3+
gotk-components.yaml
4+
extends: default
5+
rules:
6+
truthy:
7+
allowed-values: ["true", "false", "on"]
8+
comments:
9+
min-spaces-from-content: 1
10+
line-length: disable
11+
braces:
12+
min-spaces-inside: 0
13+
max-spaces-inside: 1
14+
brackets:
15+
min-spaces-inside: 0
16+
max-spaces-inside: 0
17+
indentation: enable

.github/renovate.json5

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"enabled": true,
3+
"semanticCommits": "enabled",
4+
"dependencyDashboard": true,
5+
"dependencyDashboardTitle": "Renovate Dashboard",
6+
"suppressNotifications": ["prIgnoreNotification"],
7+
"rebaseWhen": "conflicted",
8+
"helm-values": {
9+
"fileMatch": [
10+
"cluster/.+/helm-release\\.yaml$"
11+
]
12+
},
13+
"kubernetes": {
14+
"fileMatch": [
15+
"cluster/.+\\.yaml$"
16+
],
17+
"ignorePaths": [
18+
"cluster/base/"
19+
],
20+
},
21+
"regexManagers": [
22+
// regexManager to read and process HelmReleases and CRDs
23+
{
24+
"fileMatch": [
25+
"cluster/.+\\.yaml$"
26+
],
27+
"matchStrings": [
28+
// helm releases
29+
"registryUrl=(?<registryUrl>.*?)\n *chart: (?<depName>.*?)\n *version: (?<currentValue>.*)\n",
30+
// cert-manager crd
31+
"registryUrl=(?<registryUrl>.*?) chart=(?<depName>.*?)\n.*\\/(?<currentValue>.*?)\\/"
32+
],
33+
"datasourceTemplate": "helm"
34+
},
35+
],
36+
"packageRules": [
37+
// setup datasources
38+
{
39+
"matchDatasources": ["helm"],
40+
"separateMinorPatch": true,
41+
"ignoreDeprecated": true
42+
},
43+
// global docker datasource settings
44+
{
45+
"matchDatasources": ["docker"],
46+
"enabled": true,
47+
"commitMessageTopic": "container image {{depName}}",
48+
"commitMessageExtra": "to {{#if isSingleVersion}}v{{{newVersion}}}{{else}}{{{newValue}}}{{/if}}",
49+
"matchUpdateTypes": ["major", "minor", "patch"],
50+
},
51+
// add labels according to package and update types
52+
{
53+
"matchDatasources": ["docker"],
54+
"matchUpdateTypes": ["major"],
55+
"labels": ["renovate/image", "dep/major"]
56+
},
57+
{
58+
"matchDatasources": ["docker"],
59+
"matchUpdateTypes": ["minor"],
60+
"labels": ["renovate/image", "dep/minor"]
61+
},
62+
{
63+
"matchDatasources": ["docker"],
64+
"matchUpdateTypes": ["patch"],
65+
"labels": ["renovate/image", "dep/patch"]
66+
},
67+
{
68+
"matchDatasources": ["helm"],
69+
"matchUpdateTypes": ["major"],
70+
"labels": ["renovate/helm", "dep/major"]
71+
},
72+
{
73+
"matchDatasources": ["helm"],
74+
"matchUpdateTypes": ["minor"],
75+
"labels": ["renovate/helm", "dep/minor"]
76+
},
77+
{
78+
"matchDatasources": ["helm"],
79+
"matchUpdateTypes": ["patch"],
80+
"labels": ["renovate/helm", "dep/patch"]
81+
}
82+
]
83+
}

.github/workflows/flux-schedule.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Schedule - Update Flux
3+
4+
on: # yamllint disable-line rule:truthy
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 12 * * *"
8+
9+
jobs:
10+
flux-upgrade:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 1
16+
17+
- name: Setup Flux CLI
18+
uses: fluxcd/flux2/action@main
19+
20+
- name: Upgrade Flux
21+
id: upgrade
22+
run: |
23+
CLI_VERSION="$(flux -v)"
24+
VERSION="v${CLI_VERSION#*flux version }"
25+
flux install --version="${VERSION}" \
26+
--network-policy=false \
27+
--export > ./cluster/base/flux-system/gotk-components.yaml
28+
echo "::set-output name=flux_version::$VERSION"
29+
30+
- name: Create pull request for Flux upgrade
31+
uses: peter-evans/create-pull-request@v3
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
branch: "flux/upgrade-${{ steps.upgrade.outputs.flux_version }}"
35+
delete-branch: true
36+
title: "chore(deps): upgrade flux components to ${{ steps.upgrade.outputs.flux_version }}"
37+
signoff: false
38+
committer: GitHub <[email protected]>
39+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
40+
commit-message: "chore(deps): upgrade flux components to ${{ steps.upgrade.outputs.flux_version }}"
41+
body: |
42+
Release notes: https://github.com/fluxcd/flux2/releases/tag/${{ steps.upgrade.outputs.flux_version }}
43+
labels: flux/upgrade
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Invalid Template
3+
4+
on:
5+
issues:
6+
types:
7+
- labeled
8+
- unlabeled
9+
- reopened
10+
11+
jobs:
12+
support:
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- uses: dessant/support-requests@v2
16+
with:
17+
github-token: ${{ github.token }}
18+
support-label: "template-incomplete"
19+
issue-comment: >
20+
:wave: @{issue-author}, please follow the template provided.
21+
close-issue: true
22+
lock-issue: true
23+
issue-lock-reason: "resolved"

.github/workflows/lint-markdown.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Lint Markdown files on Pull Requests
3+
4+
on: # yamllint disable-line rule:truthy
5+
pull_request:
6+
paths:
7+
- "**.md"
8+
9+
jobs:
10+
markdownlint:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Get changes
16+
uses: dorny/paths-filter@v2
17+
id: filter
18+
with:
19+
list-files: shell
20+
filters: |
21+
markdown:
22+
- added|modified: "**.md"
23+
- name: Lint files
24+
if: ${{ steps.filter.outputs.markdown == 'true' }}
25+
uses: reviewdog/action-shellcheck@v1
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
markdownlint_flags: "-c '.github/lint/.markdownlint.yaml' ${{ steps.filter.outputs.markdown_files }}"

.github/workflows/lint-shell.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Lint Shell scripts on Pull Requests
3+
4+
on: # yamllint disable-line rule:truthy
5+
pull_request:
6+
paths:
7+
- "**.sh"
8+
9+
jobs:
10+
shellcheck:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Get changes
16+
uses: dorny/paths-filter@v2
17+
id: filter
18+
with:
19+
list-files: shell
20+
filters: |
21+
shell:
22+
- added|modified: "**.sh"
23+
- name: Lint files
24+
if: ${{ steps.filter.outputs.shell == 'true' }}
25+
uses: reviewdog/action-shellcheck@v1
26+
with:
27+
shellcheck_flags: "${{ steps.filter.outputs.shell_files }}"

.github/workflows/lint.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Lint YAML files on Pull Requests
3+
4+
on: # yamllint disable-line rule:truthy
5+
pull_request:
6+
paths:
7+
- "**.yaml"
8+
- "**.yml"
9+
10+
jobs:
11+
yamllint:
12+
runs-on: ubuntu-20.04
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Get changes
17+
uses: dorny/paths-filter@v2
18+
id: filter
19+
with:
20+
list-files: shell
21+
filters: |
22+
yaml:
23+
- added|modified: "**.yaml"
24+
- added|modified: "**.yml"
25+
- name: Lint files
26+
if: ${{ steps.filter.outputs.yaml == 'true' }}
27+
uses: reviewdog/action-yamllint@v1
28+
with:
29+
yamllint_flags: "-c .github/lint/.yamllint.yaml ${{ steps.filter.outputs.yaml_files }}"

0 commit comments

Comments
 (0)