Skip to content

Commit

Permalink
Merge 8f12997 into 7e635c2
Browse files Browse the repository at this point in the history
  • Loading branch information
mliner authored Oct 21, 2024
2 parents 7e635c2 + 8f12997 commit 7558ba8
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 7 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/pr-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Pull Request - Release Charts

on:
workflow_dispatch:
pull_request:
branches:
- master
paths:
- 'charts/node-local-dns/**'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
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@v3
with:
version: v3.12.1

- name: Add dependency chart repos
run: |
helm repo add stable https://charts.helm.sh/stable
helm repo add incubator https://charts.helm.sh/incubator
- name: Get version
id: get_version
run: |
version=$(grep 'version: ' charts/node-local-dns/Chart.yaml | awk '{print $2}')
branch=$GITHUB_HEAD_REF
pr_version="${version}-${branch}"
echo "Defining PR version $pr_version for branch $branch"
echo "Updating charts/node-local-dns/Chart.yaml version to ${pr_version}"
sed -i "s/^version:.*/version: ${pr_version}/" charts/node-local-dns/Chart.yaml
echo "pr_version=$pr_version" >> $GITHUB_ENV
- name: Check and remove existing PR release
run: |
echo "Checking release $pr_version existence in $GITHUB_REPOSITORY"
release_id=$( gh api -H "Accept: application/vnd.github.v3+json" /repos/$GITHUB_REPOSITORY/releases/tags/node-local-dns-$pr_version | jq -r .id )
if [ "$release_id" != "null" ]; then
echo "Release node-local-dns-$pr_version exists. Deleting..."
gh api -X DELETE /repos/$GITHUB_REPOSITORY/releases/$release_id
echo "Deleting tag node-local-dns-$pr_version..."
gh api -X DELETE /repos/$GITHUB_REPOSITORY/git/refs/tags/node-local-dns-$pr_version
else
echo "Release $pr_version does not exist. Continuing..."
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore env files
.env
.envrc

# Ignore editors
.DS_Store
.idea/
2 changes: 1 addition & 1 deletion charts/node-local-dns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v2
name: node-local-dns
version: 2.0.0
version: 2.1.0
appVersion: 1.23.0
home: https://github.com/lablabs/k8s-nodelocaldns-helm
description: NodeLocal DNS Cache helm chart
Expand Down
13 changes: 7 additions & 6 deletions charts/node-local-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

NodeLocal DNS Cache helm chart

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

[<img src="https://lablabs.io/static/ll-logo.png" width=350px>](https://lablabs.io/)

Expand Down Expand Up @@ -40,6 +40,7 @@ Latest available `node-local-dns` image can be found at [node-local-dns google c
| config.zones.".:53".plugins.log.format | string | `"combined"` | |
| config.zones.".:53".plugins.prometheus | bool | `true` | |
| config.zones.".:53".plugins.reload | bool | `true` | |
| config.zones.".:53".plugins.template | object | `{}` | |
| config.zones."in-addr.arpa:53".plugins.cache.parameters | int | `30` | |
| config.zones."in-addr.arpa:53".plugins.debug | bool | `false` | |
| config.zones."in-addr.arpa:53".plugins.errors | bool | `true` | |
Expand All @@ -63,22 +64,22 @@ Latest available `node-local-dns` image can be found at [node-local-dns google c
| image.args.healthPort | int | `8080` | |
| image.args.interfaceName | string | `"nodelocaldns"` | |
| image.args.quiet | bool | `false` | |
| image.args.setupIptables | bool | `false` | |
| image.args.setupInterface | bool | `true` | |
| image.args.setupIptables | bool | `false` | |
| image.args.skipTeardown | bool | `true` | |
| image.args.syncInterval | string | `"1ns"` | |
| image.args.upstreamSvc | string | `"kube-dns"` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"registry.k8s.io/dns/k8s-dns-node-cache"` | |
| image.tag | string | `"1.22.24"` | |
| image.tag | string | `"1.23.0"` | |
| imagePullSecrets | list | `[]` | |
| metrics.port | int | `9253` | |
| metrics.prometheusScrape | string | `"true"` | |
| podmonitor.enabled | bool | `false` | Enable or disable the creation of a PodMonitor resource |
| podmonitor.metricRelabelings | array | `[]` | Define metric relabeling configurations for Prometheus |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| podmonitor.enabled | bool | `false` | |
| podmonitor.metricRelabelings | list | `[]` | |
| priorityClassName | string | `"system-node-critical"` | |
| readinessProbe | string | `nil` | |
| resources.requests.cpu | string | `"30m"` | |
Expand Down Expand Up @@ -136,4 +137,4 @@ As this feature heavily depends on the Cluster DNS implementation, for a [Ranche
`udp-53` and `tcp-53` respectively.

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
25 changes: 25 additions & 0 deletions charts/node-local-dns/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,31 @@ data:
serve_stale
{{- end }}
}
{{- if $v.plugins.template }}
template {{ $v.plugins.template.parameters }} {
{{- if $v.plugins.template.match }}
match {{ $v.plugins.template.match }}
{{- end }}
{{- if $v.plugins.template.answer }}
answer {{ $v.plugins.template.answer }}
{{- end }}
{{- if $v.plugins.template.additional }}
additional {{ $v.plugins.template.additional }}
{{- end }}
{{- if $v.plugins.template.authority }}
authority {{ $v.plugins.template.authority }}
{{- end }}
{{- if $v.plugins.template.rcode }}
rcode {{ $v.plugins.template.rcode }}
{{- end }}
{{- if $v.plugins.template.ederror }}
ederror {{ $v.plugins.template.ederror }}
{{- end }}
{{- if $v.plugins.template.fallthrough }}
fallthrough {{ $v.plugins.template.fallthrough }}
{{- end }}
}
{{- end }}
{{- if $v.plugins.reload }}
reload
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions charts/node-local-dns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ config:
log:
format: combined
classes: all
template: {} # https://coredns.io/plugins/template/
# parameters: "ANY AAAA"
# match: ""
# additional: ""
# authority: ""
# rcode: "NOERROR"
# ederror: ""
# fallthrough: ""
cache:
parameters: 30
denial: {}
Expand Down

0 comments on commit 7558ba8

Please sign in to comment.