Compare commits

..

17 Commits

Author SHA1 Message Date
2485365728 split up regex
Some checks failed
Build project / build (push) Has been cancelled
Publish / build (push) Successful in 3m22s
2025-06-27 00:18:05 +02:00
7ce8682ecb match alpha and beta tags
All checks were successful
Build project / build (push) Successful in 2m14s
2025-06-27 00:07:04 +02:00
744e43c1f4 Merge pull request 'Add image url' (#20) from feature/update-image-labels into main
All checks were successful
Publish / build (push) Successful in 3m22s
Reviewed-on: #20
2025-06-26 19:35:12 +00:00
8095723337 Add image url
Some checks failed
Build project / build (push) Has been cancelled
2025-06-26 21:34:42 +02:00
9e7b6123c2 Merge pull request 'Override image labels' (#19) from feature/update-image-labels into main
All checks were successful
Publish / build (push) Successful in 3m15s
Reviewed-on: #19
2025-06-26 19:14:46 +00:00
062b386f7f Override image labels
All checks were successful
Build project / build (push) Successful in 1m54s
2025-06-26 21:14:23 +02:00
aca35507ba Merge pull request 'Override image labels' (#18) from feature/update-image-labels into main
Some checks failed
Publish / build (push) Failing after 1m35s
Reviewed-on: #18
2025-06-26 19:06:58 +00:00
4ede272b70 Override image labels
All checks were successful
Build project / build (push) Successful in 1m58s
2025-06-26 21:06:25 +02:00
5e413a64e8 Merge pull request 'Add ko.yaml' (#17) from feature/update-image-labels into main
All checks were successful
Publish / build (push) Successful in 3m22s
Reviewed-on: #17
2025-06-26 18:22:11 +00:00
1cfd5ef55c Add ko.yaml
All checks were successful
Build project / build (push) Successful in 2m1s
2025-06-26 20:21:45 +02:00
c89dad396b Merge pull request 'feature/generate-manifest' (#16) from feature/generate-manifest into main
All checks were successful
Publish / build (push) Successful in 3m17s
Reviewed-on: #16
2025-06-25 18:30:29 +00:00
cddda7098c generic in the path
All checks were successful
Build project / build (push) Successful in 1m59s
2025-06-25 20:29:15 +02:00
9a186ad190 Add forgotten files
All checks were successful
Build project / build (push) Successful in 1m58s
2025-06-25 17:52:28 +02:00
4ece12d18b Merge pull request 'Upload manifest' (#15) from feature/generate-manifest into main
All checks were successful
Publish / build (push) Successful in 3m15s
Reviewed-on: #15
2025-06-25 15:48:20 +00:00
6d0df79c87 Upload manifest
All checks were successful
Build project / build (push) Successful in 1m27s
2025-06-25 17:45:02 +02:00
445dd7830e Merge pull request 'Use image from gitea' (#14) from feature/use-image-from-gitea into main
All checks were successful
Publish / build (push) Successful in 2m19s
Reviewed-on: #14
2025-06-25 15:26:34 +00:00
a73aef4f9d Use image from gitea
All checks were successful
Build project / build (push) Successful in 1m29s
2025-06-25 17:25:05 +02:00
8 changed files with 44 additions and 10 deletions

View File

@@ -22,3 +22,5 @@ jobs:
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
- name: Build
run: go build cmd/main.go
- name: Build manifest
run: make build-installer

View File

@@ -24,3 +24,5 @@ jobs:
run: go install github.com/google/ko@latest
- name: Build
run: KO_DOCKER_REPO=gitea.engen.priv.no/unifi-network-operator-controller PATH=~/go/bin:$PATH ko build --local ./cmd
- name: Build manifest
run: make build-installer

View File

@@ -3,6 +3,8 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
@@ -37,4 +39,25 @@ jobs:
- name: Build
run: |
export KO_DOCKER_REPO="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller"
ko publish ./cmd --tags "$TAG,latest" --bare
ko publish ./cmd \
--tags "$TAG,latest" \
--image-label 'org.opencontainers.image.authors=Klauvsteinen <vegard@engen.priv.no>' \
--image-label 'org.opencontainers.image.vendor=Klauvsteinen' \
--image-label 'org.opencontainers.image.source=https://gitea.engen.priv.no/klauvsteinen/unifi-network-operator' \
--image-label 'org.opencontainers.image.url=https://gitea.engen.priv.no/klauvsteinen/unifi-network-operator' \
--image-label 'dev.chainguard.package.main=' \
--bare
- name: Build manifest
run: |
make build-installer
curl -X PUT \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/x-yaml" \
--data-binary @./dist/install.yaml \
https://gitea.engen.priv.no/api/packages/klauvsteinen/generic/unifi-network-operator/latest/install.yaml
curl -X PUT \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/x-yaml" \
--data-binary @./dist/install.yaml \
https://gitea.engen.priv.no/api/packages/klauvsteinen/generic/unifi-network-operator/$TAG/install.yaml

View File

@@ -1,5 +1,5 @@
# Image URL to use all building/pushing image targets
IMG ?= registry.engen.priv.no/unifi-network-operator-controller:latest
IMG ?= gitea.engen.priv.no/klauvsteinen/unifi-network-operator-controller:latest
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
@@ -8,7 +8,7 @@ else
GOBIN=$(shell go env GOBIN)
endif
export KO_DOCKER_REPO=registry.engen.priv.no/unifi-network-operator-controller
export KO_DOCKER_REPO=gitea.engen.priv.no/klauvsteinen/unifi-network-operator-controller
# CONTAINER_TOOL defines the container tool to be used for building images.
# Be aware that the target commands are only tested with Docker which is

10
PROJECT
View File

@@ -6,7 +6,7 @@ domain: engen.priv.no
layout:
- go.kubebuilder.io/v4
projectName: unifi-network-operator
repo: github.com/vegardengen/unifi-network-operator
repo: gitea.engen.priv.no/klauvsteinen/unifi-network-operator
resources:
- api:
crdVersion: v1
@@ -15,7 +15,7 @@ resources:
domain: engen.priv.no
group: unifi
kind: Networkconfiguration
path: github.com/vegardengen/unifi-network-operator/api/v1beta1
path: gitea.engen.priv.no/klauvsteinen/unifi-network-operator/api/v1beta1
version: v1beta1
- api:
crdVersion: v1
@@ -24,7 +24,7 @@ resources:
domain: engen.priv.no
group: unifi
kind: FirewallZone
path: github.com/vegardengen/unifi-network-operator/api/v1beta1
path: gitea.engen.priv.no/klauvsteinen/unifi-network-operator/api/v1beta1
version: v1beta1
- api:
crdVersion: v1
@@ -33,7 +33,7 @@ resources:
domain: engen.priv.no
group: unifi
kind: FirewallPolicy
path: github.com/vegardengen/unifi-network-operator/api/v1beta1
path: gitea.engen.priv.no/klauvsteinen/unifi-network-operator/api/v1beta1
version: v1beta1
- api:
crdVersion: v1
@@ -42,6 +42,6 @@ resources:
domain: engen.priv.no
group: unifi
kind: PortForward
path: github.com/vegardengen/unifi-network-operator/api/v1beta1
path: gitea.engen.priv.no/klauvsteinen/unifi-network-operator/api/v1beta1
version: v1beta1
version: "3"

View File

@@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: registry.engen.priv.no/unifi-network-operator-controller
newName: gitea.engen.priv.no/klauvsteinen/unifi-network-operator-controller
newTag: latest

2
dist/install.yaml vendored
View File

@@ -915,7 +915,7 @@ spec:
secretKeyRef:
key: UNIFI_PASSWORD
name: unifi-configuration
image: registry.engen.priv.no/unifi-network-operator-controller:latest
image: gitea.engen.priv.no/klauvsteinen/unifi-network-operator-controller:latest
livenessProbe:
httpGet:
path: /healthz

7
ko.yaml Normal file
View File

@@ -0,0 +1,7 @@
defaultBaseImage: cgr.dev/chainguard/static:latest
labels:
org.opencontainers.image.authors: Vegard Engen <vegard@engen.priv.no>
org.opencontainers.image.source: https://gitea.engen.priv.no/klauvsteinen/unifi-network-operator
org.opencontainers.image.vendor: Klauvsteinen
dev.chainguard.package.main: ""