diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index a300786..3ef5d77 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -23,7 +23,7 @@ jobs: echo "Tag: ${tag}" echo "tag=$tag" >> $GITHUB_OUTPUT - name: Checkout Server - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ steps.tag.outputs.tag }} @@ -31,10 +31,10 @@ jobs: run: | docker context create ctx - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 id: buildx with: endpoint: ctx @@ -49,7 +49,7 @@ jobs: echo "Platforms: ${{ steps.buildx.outputs.platforms }}" echo "Build tag ${{ steps.tag.outputs.tag }}" - name: Login to GHRC - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.registry }} username: ${{ github.actor }} diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index f04ee63..2811a52 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -7,21 +7,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Helm - uses: azure/setup-helm@v3 + uses: azure/setup-helm@v4.2.0 with: - version: v3.6.3 + version: v3.17.0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5.3.0 with: - python-version: 3.7 + python-version: '3.x' + check-latest: true - name: Set up chart-testing - uses: helm/chart-testing-action@v2.4.0 + uses: helm/chart-testing-action@v2.7.0 - name: Run chart-testing (list-changed) id: list-changed @@ -34,7 +35,7 @@ jobs: run: ct lint --target-branch main - name: Create kind cluster - uses: helm/kind-action@v1.8.0 + uses: helm/kind-action@v1.12.0 if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 828d647..c076f6a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -19,11 +19,11 @@ jobs: git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Set up Helm - uses: azure/setup-helm@v3 + uses: azure/setup-helm@v4.2.0 with: - version: v3.6.3 + version: v3.17.0 - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.5.0 + uses: helm/chart-releaser-action@v1.7.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/charts/unbound/Chart.yaml b/charts/unbound/Chart.yaml index a70f8dd..8dffded 100644 --- a/charts/unbound/Chart.yaml +++ b/charts/unbound/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 description: Unbound is a fast caching DNS resolver home: https://www.unbound.net/ name: unbound -version: 0.1.4 +version: 0.1.5 appVersion: 1.17.1 sources: - https://github.com/pixelfederation/unbound/ diff --git a/charts/unbound/templates/_helpers.tpl b/charts/unbound/templates/_helpers.tpl index 01afc06..300b2fd 100644 --- a/charts/unbound/templates/_helpers.tpl +++ b/charts/unbound/templates/_helpers.tpl @@ -60,4 +60,13 @@ policy/v1 {{- else -}} policy/v1beta1 {{- end }} -{{- end -}} \ No newline at end of file +{{- end -}} + +{/* +Namespace for all resources to be installed into +If not defined in values file then the helm release namespace is used +By default this is not set so the helm release namespace will be used +*/}} +{{- define "unbound.namespace" -}} + {{ .Values.namespace | default .Release.Namespace }} +{{- end -}} diff --git a/charts/unbound/templates/configmap.yaml b/charts/unbound/templates/configmap.yaml index b09516e..3df8043 100644 --- a/charts/unbound/templates/configmap.yaml +++ b/charts/unbound/templates/configmap.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ template "unbound.fullname" . }} + namespace: {{ include "unbound.namespace" . }} labels: app: {{ template "unbound.name" . }} chart: {{ template "unbound.chart" . }} diff --git a/charts/unbound/templates/deployment.yaml b/charts/unbound/templates/deployment.yaml index 514421e..37cb58e 100644 --- a/charts/unbound/templates/deployment.yaml +++ b/charts/unbound/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "unbound.fullname" . }} + namespace: {{ include "unbound.namespace" . }} labels: {{- include "unbound.labels" . | nindent 4 }} {{- with .Values.labels }} diff --git a/charts/unbound/templates/hpa.yaml b/charts/unbound/templates/hpa.yaml index fd0c07f..040e071 100644 --- a/charts/unbound/templates/hpa.yaml +++ b/charts/unbound/templates/hpa.yaml @@ -3,6 +3,7 @@ apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ template "unbound.fullname" . }} + namespace: {{ include "unbound.namespace" . }} labels: {{- include "unbound.labels" . | nindent 4 }} {{- with .Values.labels }} diff --git a/charts/unbound/templates/pdb.yaml b/charts/unbound/templates/pdb.yaml index 0643371..e6af2e6 100644 --- a/charts/unbound/templates/pdb.yaml +++ b/charts/unbound/templates/pdb.yaml @@ -3,6 +3,7 @@ apiVersion: {{ include "unbound.pdb.apiVersion" . }} kind: PodDisruptionBudget metadata: name: {{ include "unbound.fullname" . }} + namespace: {{ include "unbound.namespace" . }} labels: {{- include "unbound.labels" . | nindent 4 }} {{- with .Values.podDisruptionBudget.annotations }} diff --git a/charts/unbound/templates/service.yaml b/charts/unbound/templates/service.yaml index 52d9798..f74fed9 100644 --- a/charts/unbound/templates/service.yaml +++ b/charts/unbound/templates/service.yaml @@ -3,6 +3,7 @@ kind: Service apiVersion: v1 metadata: name: {{ template "unbound.fullname" . }} + namespace: {{ include "unbound.namespace" . }} labels: {{- include "unbound.labels" . | nindent 4 }} {{- with .Values.labels }} @@ -46,4 +47,4 @@ spec: {{- with .Values.service.topologyKeys }} topologyKeys: {{ toYaml . | nindent 2 }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/unbound/templates/servicemonitor.yaml b/charts/unbound/templates/servicemonitor.yaml index 1c5ede0..3be0a02 100644 --- a/charts/unbound/templates/servicemonitor.yaml +++ b/charts/unbound/templates/servicemonitor.yaml @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "unbound.fullname" . }} + namespace: {{ include "unbound.namespace" . }} labels: {{- include "unbound.labels" . | nindent 4 }} {{- with .Values.serviceMonitor.annotations }} diff --git a/charts/unbound/values.yaml b/charts/unbound/values.yaml index 1ce7661..13ce8e9 100644 --- a/charts/unbound/values.yaml +++ b/charts/unbound/values.yaml @@ -1,8 +1,13 @@ +# This namespace allows you to define where the services are installed into. +# If not set then they use the namespace of the release. +# This is helpful when installing cert manager as a chart dependency (sub chart). +namespace: "" + containers: unbound: image: repository: ghcr.io/pixelfederation/unbound - tag: 1.17.1_3 + tag: 1.17.1_4 pullPolicy: IfNotPresent resources: requests: