Skip to content

Commit

Permalink
prepare helm/chart-releaser-action integration
Browse files Browse the repository at this point in the history
  • Loading branch information
majodev committed Oct 29, 2024
1 parent 3fee28c commit c23838a
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4

- name: setup@kindconfig
run: |
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand All @@ -99,3 +99,27 @@ jobs:
${{ steps.meta.outputs.tags }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}

release:
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'push' && github.ref == 'refs/heads/main')

needs:
- build-test
permissions:
contents: write
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 "[email protected]"
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ go-format: ##- (opt) Runs go format.

.PHONY: helm
helm:
helm template ./deploy/backup-ns > ./deploy/backup-ns.tmp.yaml
helm template ./deploy/backup-ns -n customer-namespace -f deploy/samples/customer-namespace-backup.values.yaml > ./deploy/samples/customer-namespace-backup.rendered.yaml
helm package ./deploy/backup-ns -d ./deploy
helm template ./charts/backup-ns -n customer-namespace -f deploy/backup-ns/customer-namespace-backup-ns.values.yaml > ./deploy/backup-ns/customer-namespace-backup-ns.rendered.yaml

.PHONY: go-build
go-build: ##- (opt) Runs go build.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ version: 0.1.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "a728d01c0a"
appVersion: "v0.1.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 7 additions & 5 deletions deploy/backup-ns/values.yaml → charts/backup-ns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
image:
repository: eu.gcr.io/a3cloud-192413/aw/backup-ns
repository: ghcr.io/allaboutapps/backup-ns
# This sets the pull policy for images.
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
Expand Down Expand Up @@ -84,18 +84,21 @@ podAnnotations: {}
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podLabels: {}

podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000

securityContext: {}
securityContext:
{}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

resources: {}
resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
Expand All @@ -107,7 +110,6 @@ resources: {}
# cpu: 100m
# memory: 128Mi


additionalContainers: []

nodeSelector: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
helm.sh/chart: backup-ns-0.1.0
app.kubernetes.io/name: backup-ns
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "a728d01c0a"
app.kubernetes.io/version: "v0.1.0"
app.kubernetes.io/managed-by: Helm
automountServiceAccountToken: true
---
Expand All @@ -23,7 +23,7 @@ metadata:
helm.sh/chart: backup-ns-0.1.0
app.kubernetes.io/name: backup-ns
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "a728d01c0a"
app.kubernetes.io/version: "v0.1.0"
app.kubernetes.io/managed-by: Helm
data:
BAK_DB_POSTGRES: "true"
Expand All @@ -45,7 +45,7 @@ metadata:
helm.sh/chart: backup-ns-0.1.0
app.kubernetes.io/name: backup-ns
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "a728d01c0a"
app.kubernetes.io/version: "v0.1.0"
app.kubernetes.io/managed-by: Helm
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -66,7 +66,7 @@ metadata:
helm.sh/chart: backup-ns-0.1.0
app.kubernetes.io/name: backup-ns
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "a728d01c0a"
app.kubernetes.io/version: "v0.1.0"
app.kubernetes.io/managed-by: Helm
annotations:
a3c-validate-prefer-explicit-pod-strategy: Recreate
Expand All @@ -86,7 +86,7 @@ spec:
helm.sh/chart: backup-ns-0.1.0
app.kubernetes.io/name: backup-ns
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "a728d01c0a"
app.kubernetes.io/version: "v0.1.0"
app.kubernetes.io/managed-by: Helm
app: backup
spec:
Expand All @@ -111,7 +111,7 @@ spec:
- name: backup-ns
securityContext:
{}
image: "eu.gcr.io/a3cloud-192413/aw/backup-ns:2231cf7214"
image: "ghcr.io/allaboutapps/backup-ns:2231cf7214"
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
Expand Down

0 comments on commit c23838a

Please sign in to comment.