Compare commits
7
Commits
3d52eab41d
...
fe2d4de8bf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe2d4de8bf | ||
|
|
e95256daf5 | ||
|
|
7f595b51f2 | ||
|
|
8e7abf411d | ||
|
|
58efc45bf4 | ||
|
|
8f0e97dacf | ||
|
|
7dca7da51d |
@@ -0,0 +1,53 @@
|
|||||||
|
name: build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-push:
|
||||||
|
runs-on: docker
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
REGISTRY: forgejo.riotpiao.com
|
||||||
|
IMAGE_NAME: rock/kmsvc-manage
|
||||||
|
REGISTRY_PAT: ${{ secrets.REGISTRY_PAT }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get commit short SHA
|
||||||
|
id: short_sha
|
||||||
|
run: echo "sha=${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Forgejo Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: rock
|
||||||
|
password: ${{ env.REGISTRY_PAT }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels)
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ steps.short_sha.outputs.sha }}
|
||||||
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
@@ -2,7 +2,7 @@ apiVersion: argoproj.io/v1alpha1
|
|||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: strimzi-operator
|
name: strimzi-operator
|
||||||
namespace: cicd
|
namespace: sqs
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "0"
|
argocd.argoproj.io/sync-wave: "0"
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ apiVersion: argoproj.io/v1alpha1
|
|||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: kafka-cluster
|
name: kafka-cluster
|
||||||
namespace: cicd
|
namespace: sqs
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "1"
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
spec:
|
spec:
|
||||||
project: kmsvc
|
project: kmsvc
|
||||||
source:
|
source:
|
||||||
repoURL: https://forgejo.riotpiao.homelab.com/rock/kafaka-management-service.git
|
repoURL: https://forgejo.riotpiao.com/rock/kmsvc-manage.git
|
||||||
targetRevision: main
|
targetRevision: prod
|
||||||
path: k8s/charts/kafka-cluster
|
path: k8s/charts/kafka-cluster
|
||||||
helm:
|
helm:
|
||||||
values: |
|
values: |
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: argoproj.io/v1alpha1
|
|||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: kmsvc-redis
|
name: kmsvc-redis
|
||||||
namespace: cicd
|
namespace: sqs
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "1"
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ apiVersion: argoproj.io/v1alpha1
|
|||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: queue-crd
|
name: queue-crd
|
||||||
namespace: cicd
|
namespace: sqs
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "2"
|
argocd.argoproj.io/sync-wave: "2"
|
||||||
spec:
|
spec:
|
||||||
project: kmsvc
|
project: kmsvc
|
||||||
source:
|
source:
|
||||||
repoURL: https://forgejo.riotpiao.homelab.com/rock/kafaka-management-service.git
|
repoURL: https://forgejo.riotpiao.com/rock/kmsvc-manage.git
|
||||||
targetRevision: main
|
targetRevision: prod
|
||||||
path: k8s/charts/queue-crd
|
path: k8s/charts/queue-crd
|
||||||
helm:
|
helm:
|
||||||
values: |
|
values: |
|
||||||
|
|||||||
@@ -2,31 +2,31 @@ apiVersion: argoproj.io/v1alpha1
|
|||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: management-service
|
name: management-service
|
||||||
namespace: cicd
|
namespace: sqs
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "2"
|
argocd.argoproj.io/sync-wave: "2"
|
||||||
spec:
|
spec:
|
||||||
project: kmsvc
|
project: kmsvc
|
||||||
source:
|
source:
|
||||||
repoURL: https://forgejo.riotpiao.homelab.com/rock/kafaka-management-service.git
|
repoURL: https://forgejo.riotpiao.com/rock/kmsvc-manage.git
|
||||||
targetRevision: main
|
targetRevision: prod
|
||||||
path: k8s/charts/management-service
|
path: k8s/charts/management-service
|
||||||
helm:
|
helm:
|
||||||
values: |
|
values: |
|
||||||
namespace: sqs
|
namespace: sqs
|
||||||
image:
|
image:
|
||||||
repository: forgejo.riotpiao.homelab.com/rock/kafka-management-service
|
repository: forgejo.riotpiao.com/rock/kmsvc-manage
|
||||||
# CI (.forgejo/workflows/release.yaml) writes the released git tag
|
# On prod branch: built on each commit push via CI workflow
|
||||||
# here and pushes the commit -- ArgoCD picks it up on its next sync.
|
# Tag is set to the git commit SHA for reproducible deployments
|
||||||
tag: latest
|
tag: latest
|
||||||
env:
|
env:
|
||||||
kafkaBrokers: "kmsvc-kafka-bootstrap.sqs.svc.cluster.local:9092"
|
kafkaBrokers: "kmsvc-kafka-bootstrap.sqs.svc.cluster.local:9092"
|
||||||
redisAddr: "kmsvc-redis-master.sqs.svc.cluster.local:6379"
|
redisAddr: "kmsvc-redis-master.sqs.svc.cluster.local:6379"
|
||||||
authentikIssuerURL: "https://authentik.riotpiao.homelab.com/application/o/kafaka/"
|
authentikIssuerURL: ""
|
||||||
authentikAudience: "QI0gPtR99ar8VvhK8Tqox4SDkTKzbNU7lbgwBNSc"
|
authentikAudience: ""
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
host: kmsvc.riotpiao.homelab.com
|
host: kmsvc.riotpiao.com
|
||||||
clusterIssuer: homelab-ca
|
clusterIssuer: homelab-ca
|
||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ spec:
|
|||||||
project: kmsvc
|
project: kmsvc
|
||||||
source:
|
source:
|
||||||
repoURL: https://forgejo.riotpiao.com/rock/kmsvc-manage.git
|
repoURL: https://forgejo.riotpiao.com/rock/kmsvc-manage.git
|
||||||
targetRevision: main
|
targetRevision: prod
|
||||||
path: k8s/argocd/apps
|
path: k8s/argocd/apps
|
||||||
directory:
|
directory:
|
||||||
recurse: false
|
recurse: false
|
||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
namespace: cicd
|
namespace: sqs
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
automated:
|
automated:
|
||||||
prune: true
|
prune: true
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ namespace: sqs
|
|||||||
replicaCount: 2
|
replicaCount: 2
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: forgejo.riotpiao.homelab.com/rock/kafka-management-service
|
repository: forgejo.riotpiao.com/rock/kmsvc-manage
|
||||||
tag: latest
|
tag: latest
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user