Compare commits
84 Commits
0.0.3
...
feature/cl
| Author | SHA1 | Date | |
|---|---|---|---|
| 37d8060995 | |||
| 8623d6cbc0 | |||
| 61606e8a7e | |||
| 44d89a5a50 | |||
| 19f24add0a | |||
| 2e95d29373 | |||
| 990140ee1c | |||
| 24c88264c9 | |||
| 938d53fa8f | |||
| 768c61020e | |||
| 8d70a78a50 | |||
| 5885daac55 | |||
| 440dc04e5b | |||
| 22c8df6833 | |||
| 35d95d107c | |||
| 4bb45b0128 | |||
| 9eefd08823 | |||
| d53810b714 | |||
| 33f1fd5eac | |||
| 9ae7d91365 | |||
| 6fe5fdf859 | |||
| 37b5eb830a | |||
| 1834527d43 | |||
| b562c200ba | |||
| 2485365728 | |||
| efeaf521fd | |||
| 7ce8682ecb | |||
| 744e43c1f4 | |||
| 8095723337 | |||
| 9e7b6123c2 | |||
| 062b386f7f | |||
| aca35507ba | |||
| 4ede272b70 | |||
| 5e413a64e8 | |||
| 1cfd5ef55c | |||
| c89dad396b | |||
| cddda7098c | |||
| 9a186ad190 | |||
| 4ece12d18b | |||
| 6d0df79c87 | |||
| 445dd7830e | |||
| a73aef4f9d | |||
| a99de02594 | |||
| 893318ad53 | |||
| 201edb1b82 | |||
| b1c0a4ee11 | |||
| 13677136a7 | |||
| cb296c3881 | |||
| 3c6b48803d | |||
| f71fa2af8e | |||
| 1819ef2b60 | |||
| 74d7ca84a5 | |||
| 0f7ffe3c85 | |||
| 3020510c6f | |||
| 475e226b69 | |||
| a5521013b9 | |||
| 4aa3436f28 | |||
| 6e32555e9e | |||
| 13c23863be | |||
| 918b45c940 | |||
| 3cb65a5a14 | |||
| 4ae70ecf74 | |||
| 3aa4d1a24a | |||
| 1231bc50e5 | |||
| e1847f4cf9 | |||
| 55a206d509 | |||
| 00179595e4 | |||
| f09e008fb7 | |||
| 14a8155dcf | |||
| 93ef66f01d | |||
| 80746321a9 | |||
| 6423ef7d6e | |||
| fdefd05608 | |||
| 760fd3903f | |||
| cda1c7ddff | |||
| 1274fe610f | |||
| f091ec148b | |||
| 66e1d854d3 | |||
| f43c1f3b63 | |||
| 0046157633 | |||
| 56a781a260 | |||
| 29fb9601fd | |||
| c34eea5e13 | |||
| fe90ac7ea4 |
@@ -6,7 +6,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: golang:1.24
|
container: registry.engen.priv.no/gitea-build:0.1.0
|
||||||
steps:
|
steps:
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
@@ -22,3 +22,5 @@ jobs:
|
|||||||
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
|
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build cmd/main.go
|
run: go build cmd/main.go
|
||||||
|
- name: Build manifest
|
||||||
|
run: make build-installer
|
||||||
|
|||||||
@@ -6,21 +6,45 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: golang:1.24
|
container: registry.engen.priv.no/gitea-build:0.1.0
|
||||||
|
env:
|
||||||
|
GITEA_USER: ${{ secrets.GITEAUSER }}
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
|
||||||
|
GITEA_REGISTRY: gitea.engen.priv.no
|
||||||
|
GITEA_ORG: klauvsteinen
|
||||||
steps:
|
steps:
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
ssh-keyscan gitea-ssh.engen.priv.no >> ~/.ssh/known_hosts
|
ssh-keyscan gitea-ssh.engen.priv.no >> ~/.ssh/known_hosts
|
||||||
- name: Install node and go
|
- name: Check out repository code
|
||||||
run: apt update && apt -y install nodejs
|
uses: actions/checkout@v4
|
||||||
- name: Check out repository code
|
- name: ssh repo
|
||||||
uses: actions/checkout@v4
|
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
|
||||||
- name: ssh repo
|
- name: Docker login
|
||||||
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
|
run: echo "${GITEA_TOKEN}" | docker login "${GITEA_REGISTRY}" --username "${GITEA_USER}" --password-stdin
|
||||||
- name: Install ko
|
- name: Build
|
||||||
run: go install github.com/google/ko@latest
|
run: |
|
||||||
- name: Build
|
export KO_DOCKER_REPO="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller"
|
||||||
run: KO_DOCKER_REPO=gitea.engen.priv.no/unifi-network-operator-controller PATH=~/go/bin:$PATH ko build --local ./cmd
|
ko publish ./cmd \
|
||||||
|
--tags "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 IMG="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller:latest" build-installer
|
||||||
|
curl -X DELETE \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: application/x-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/latest/install.yaml
|
||||||
|
|||||||
@@ -3,18 +3,18 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- '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:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: golang:1.24-bookworm
|
container: registry.engen.priv.no/gitea-build:0.1.0
|
||||||
env:
|
env:
|
||||||
GITEA_USER: ${{ secrets.GITEA_USER }}
|
GITEA_USER: ${{ secrets.GITEAUSER }}
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
|
||||||
GITEA_REGISTRY: gitea.engen.priv.no
|
GITEA_REGISTRY: gitea.engen.priv.no
|
||||||
GITEA_ORG: klauvsteinen
|
GITEA_ORG: klauvsteinen
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
|
||||||
run: apt update && apt -y install nodejs bash docker.io
|
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
@@ -25,8 +25,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: ssh repo
|
- name: ssh repo
|
||||||
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
|
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
|
||||||
- name: Install ko
|
|
||||||
run: go install github.com/google/ko@latest
|
|
||||||
- name: Extract tag (outside container)
|
- name: Extract tag (outside container)
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -35,7 +33,22 @@ jobs:
|
|||||||
- name: Docker login
|
- name: Docker login
|
||||||
run: echo "${GITEA_TOKEN}" | docker login "${GITEA_REGISTRY}" --username "${GITEA_USER}" --password-stdin
|
run: echo "${GITEA_TOKEN}" | docker login "${GITEA_REGISTRY}" --username "${GITEA_USER}" --password-stdin
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
|
||||||
KO_DOCKER_REPO: "{$GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller
|
|
||||||
run: |
|
run: |
|
||||||
ko publish ./cmd --tags "$TAG,latest" --bare
|
export KO_DOCKER_REPO="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller"
|
||||||
|
ko publish ./cmd \
|
||||||
|
--tags "$TAG" \
|
||||||
|
--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 IMG="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller:$TAG" 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/$TAG/install.yaml
|
||||||
|
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -1,5 +1,5 @@
|
|||||||
# Image URL to use all building/pushing image targets
|
# 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)
|
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
||||||
ifeq (,$(shell go env GOBIN))
|
ifeq (,$(shell go env GOBIN))
|
||||||
@@ -8,7 +8,7 @@ else
|
|||||||
GOBIN=$(shell go env GOBIN)
|
GOBIN=$(shell go env GOBIN)
|
||||||
endif
|
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.
|
# 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
|
# Be aware that the target commands are only tested with Docker which is
|
||||||
|
|||||||
10
PROJECT
10
PROJECT
@@ -6,7 +6,7 @@ domain: engen.priv.no
|
|||||||
layout:
|
layout:
|
||||||
- go.kubebuilder.io/v4
|
- go.kubebuilder.io/v4
|
||||||
projectName: unifi-network-operator
|
projectName: unifi-network-operator
|
||||||
repo: github.com/vegardengen/unifi-network-operator
|
repo: gitea.engen.priv.no/klauvsteinen/unifi-network-operator
|
||||||
resources:
|
resources:
|
||||||
- api:
|
- api:
|
||||||
crdVersion: v1
|
crdVersion: v1
|
||||||
@@ -15,7 +15,7 @@ resources:
|
|||||||
domain: engen.priv.no
|
domain: engen.priv.no
|
||||||
group: unifi
|
group: unifi
|
||||||
kind: Networkconfiguration
|
kind: Networkconfiguration
|
||||||
path: github.com/vegardengen/unifi-network-operator/api/v1beta1
|
path: gitea.engen.priv.no/klauvsteinen/unifi-network-operator/api/v1beta1
|
||||||
version: v1beta1
|
version: v1beta1
|
||||||
- api:
|
- api:
|
||||||
crdVersion: v1
|
crdVersion: v1
|
||||||
@@ -24,7 +24,7 @@ resources:
|
|||||||
domain: engen.priv.no
|
domain: engen.priv.no
|
||||||
group: unifi
|
group: unifi
|
||||||
kind: FirewallZone
|
kind: FirewallZone
|
||||||
path: github.com/vegardengen/unifi-network-operator/api/v1beta1
|
path: gitea.engen.priv.no/klauvsteinen/unifi-network-operator/api/v1beta1
|
||||||
version: v1beta1
|
version: v1beta1
|
||||||
- api:
|
- api:
|
||||||
crdVersion: v1
|
crdVersion: v1
|
||||||
@@ -33,7 +33,7 @@ resources:
|
|||||||
domain: engen.priv.no
|
domain: engen.priv.no
|
||||||
group: unifi
|
group: unifi
|
||||||
kind: FirewallPolicy
|
kind: FirewallPolicy
|
||||||
path: github.com/vegardengen/unifi-network-operator/api/v1beta1
|
path: gitea.engen.priv.no/klauvsteinen/unifi-network-operator/api/v1beta1
|
||||||
version: v1beta1
|
version: v1beta1
|
||||||
- api:
|
- api:
|
||||||
crdVersion: v1
|
crdVersion: v1
|
||||||
@@ -42,6 +42,6 @@ resources:
|
|||||||
domain: engen.priv.no
|
domain: engen.priv.no
|
||||||
group: unifi
|
group: unifi
|
||||||
kind: PortForward
|
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: v1beta1
|
||||||
version: "3"
|
version: "3"
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
images:
|
images:
|
||||||
- name: controller
|
- name: controller
|
||||||
newName: registry.engen.priv.no/unifi-network-operator-controller
|
newName: gitea.engen.priv.no/klauvsteinen/unifi-network-operator-controller
|
||||||
newTag: latest
|
newTag: latest
|
||||||
|
|||||||
2
dist/install.yaml
vendored
2
dist/install.yaml
vendored
@@ -915,7 +915,7 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
key: UNIFI_PASSWORD
|
key: UNIFI_PASSWORD
|
||||||
name: unifi-configuration
|
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:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /healthz
|
path: /healthz
|
||||||
|
|||||||
@@ -361,10 +361,10 @@ func (r *FirewallGroupReconciler) Reconcile(ctx context.Context, req reconcile.R
|
|||||||
log.Error(err, "Could not list network objects")
|
log.Error(err, "Could not list network objects")
|
||||||
return reconcile.Result{}, err
|
return reconcile.Result{}, err
|
||||||
}
|
}
|
||||||
ipv4_name := "k8s-" + firewallGroup.Spec.Name + "-ipv4"
|
ipv4_name := "k8s-" + firewallGroup.Namespace + "/" + firewallGroup.Name + "-ipv4"
|
||||||
ipv6_name := "k8s-" + firewallGroup.Spec.Name + "-ipv6"
|
ipv6_name := "k8s-" + firewallGroup.Namespace + "/" + firewallGroup.Name + "-ipv6"
|
||||||
tcpports_name := "k8s-" + firewallGroup.Spec.Name + "-tcpports"
|
tcpports_name := "k8s-" + firewallGroup.Namespace + "/" + firewallGroup.Name + "-tcpports"
|
||||||
udpports_name := "k8s-" + firewallGroup.Spec.Name + "-udpports"
|
udpports_name := "k8s-" + firewallGroup.Namespace + "/" + firewallGroup.Name + "-udpports"
|
||||||
ipv4_done := false
|
ipv4_done := false
|
||||||
ipv6_done := false
|
ipv6_done := false
|
||||||
tcpports_done := false
|
tcpports_done := false
|
||||||
@@ -377,7 +377,7 @@ func (r *FirewallGroupReconciler) Reconcile(ctx context.Context, req reconcile.R
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
msg := strings.ToLower(err.Error())
|
msg := strings.ToLower(err.Error())
|
||||||
log.Info(msg)
|
log.Info(msg)
|
||||||
if strings.Contains(msg, "api.err.objectreferredby") || strings.Contains(msg,"invalid character") {
|
if strings.Contains(msg, "api.err.objectreferredby") || strings.Contains(msg, "invalid character") {
|
||||||
log.Info("Firewall group is in use. Invoking workaround...!")
|
log.Info("Firewall group is in use. Invoking workaround...!")
|
||||||
firewall_group.GroupMembers = []string{"127.0.0.1"}
|
firewall_group.GroupMembers = []string{"127.0.0.1"}
|
||||||
firewall_group.Name = firewall_group.Name + "-deleted"
|
firewall_group.Name = firewall_group.Name + "-deleted"
|
||||||
@@ -417,7 +417,7 @@ func (r *FirewallGroupReconciler) Reconcile(ctx context.Context, req reconcile.R
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
msg := strings.ToLower(err.Error())
|
msg := strings.ToLower(err.Error())
|
||||||
log.Info(msg)
|
log.Info(msg)
|
||||||
if strings.Contains(msg, "api.err.objectreferredby") || strings.Contains(msg,"invalid character") {
|
if strings.Contains(msg, "api.err.objectreferredby") || strings.Contains(msg, "invalid character") {
|
||||||
log.Info("Firewall group is in use. Invoking workaround...!")
|
log.Info("Firewall group is in use. Invoking workaround...!")
|
||||||
firewall_group.GroupMembers = []string{"::1"}
|
firewall_group.GroupMembers = []string{"::1"}
|
||||||
firewall_group.Name = firewall_group.Name + "-deleted"
|
firewall_group.Name = firewall_group.Name + "-deleted"
|
||||||
@@ -457,7 +457,7 @@ func (r *FirewallGroupReconciler) Reconcile(ctx context.Context, req reconcile.R
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
msg := strings.ToLower(err.Error())
|
msg := strings.ToLower(err.Error())
|
||||||
log.Info(msg)
|
log.Info(msg)
|
||||||
if strings.Contains(msg, "api.err.objectreferredby") || strings.Contains(msg,"invalid character") {
|
if strings.Contains(msg, "api.err.objectreferredby") || strings.Contains(msg, "invalid character") {
|
||||||
log.Info("Firewall group is in use. Invoking workaround...!")
|
log.Info("Firewall group is in use. Invoking workaround...!")
|
||||||
firewall_group.GroupMembers = []string{"0"}
|
firewall_group.GroupMembers = []string{"0"}
|
||||||
firewall_group.Name = firewall_group.Name + "-deleted"
|
firewall_group.Name = firewall_group.Name + "-deleted"
|
||||||
@@ -497,7 +497,7 @@ func (r *FirewallGroupReconciler) Reconcile(ctx context.Context, req reconcile.R
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
msg := strings.ToLower(err.Error())
|
msg := strings.ToLower(err.Error())
|
||||||
log.Info(msg)
|
log.Info(msg)
|
||||||
if strings.Contains(msg, "api.err.objectreferredby") || strings.Contains(msg,"invalid character") {
|
if strings.Contains(msg, "api.err.objectreferredby") || strings.Contains(msg, "invalid character") {
|
||||||
log.Info("Firewall group is in use. Invoking workaround...!")
|
log.Info("Firewall group is in use. Invoking workaround...!")
|
||||||
firewall_group.GroupMembers = []string{"127.0.0.1"}
|
firewall_group.GroupMembers = []string{"127.0.0.1"}
|
||||||
firewall_group.Name = firewall_group.Name + "-deleted"
|
firewall_group.Name = firewall_group.Name + "-deleted"
|
||||||
|
|||||||
@@ -125,70 +125,72 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
}
|
}
|
||||||
log.Info("Running finalizer logic for FirewallPolicy", "name", firewallPolicy.Name)
|
log.Info("Running finalizer logic for FirewallPolicy", "name", firewallPolicy.Name)
|
||||||
|
|
||||||
if len(firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies) > 0 {
|
if firewallPolicy.Status.ResourcesManaged != nil {
|
||||||
for i, UnifiFirewallPolicy := range firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies {
|
if len(firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies) > 0 {
|
||||||
log.Info(fmt.Sprintf("From: %s to: %s TcpIpv4: %s UdpIpv4: %s TcpIpv6: %s UdpIpv6: %s", UnifiFirewallPolicy.From, UnifiFirewallPolicy.To, UnifiFirewallPolicy.TcpIpv4ID, UnifiFirewallPolicy.UdpIpv4ID, UnifiFirewallPolicy.TcpIpv6ID, UnifiFirewallPolicy.UdpIpv6ID))
|
for i, UnifiFirewallPolicy := range firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies {
|
||||||
if len(UnifiFirewallPolicy.TcpIpv4ID) > 0 {
|
log.Info(fmt.Sprintf("From: %s to: %s TcpIpv4: %s UdpIpv4: %s TcpIpv6: %s UdpIpv6: %s", UnifiFirewallPolicy.From, UnifiFirewallPolicy.To, UnifiFirewallPolicy.TcpIpv4ID, UnifiFirewallPolicy.UdpIpv4ID, UnifiFirewallPolicy.TcpIpv6ID, UnifiFirewallPolicy.UdpIpv6ID))
|
||||||
err := r.UnifiClient.Client.DeleteFirewallPolicy(context.Background(), r.UnifiClient.SiteID, UnifiFirewallPolicy.TcpIpv4ID)
|
if len(UnifiFirewallPolicy.TcpIpv4ID) > 0 {
|
||||||
if err != nil && !strings.Contains(err.Error(), "not found") {
|
err := r.UnifiClient.Client.DeleteFirewallPolicy(context.Background(), r.UnifiClient.SiteID, UnifiFirewallPolicy.TcpIpv4ID)
|
||||||
} else {
|
if err != nil && !strings.Contains(err.Error(), "not found") {
|
||||||
firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies[i].TcpIpv4ID = ""
|
} else {
|
||||||
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies[i].TcpIpv4ID = ""
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
||||||
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if len(UnifiFirewallPolicy.UdpIpv4ID) > 0 {
|
||||||
if len(UnifiFirewallPolicy.UdpIpv4ID) > 0 {
|
err := r.UnifiClient.Client.DeleteFirewallPolicy(context.Background(), r.UnifiClient.SiteID, UnifiFirewallPolicy.UdpIpv4ID)
|
||||||
err := r.UnifiClient.Client.DeleteFirewallPolicy(context.Background(), r.UnifiClient.SiteID, UnifiFirewallPolicy.UdpIpv4ID)
|
if err != nil && !strings.Contains(err.Error(), "not found") {
|
||||||
if err != nil && !strings.Contains(err.Error(), "not found") {
|
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
|
||||||
} else {
|
|
||||||
firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies[i].UdpIpv4ID = ""
|
|
||||||
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
|
} else {
|
||||||
|
firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies[i].UdpIpv4ID = ""
|
||||||
|
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
||||||
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if len(UnifiFirewallPolicy.TcpIpv6ID) > 0 {
|
||||||
if len(UnifiFirewallPolicy.TcpIpv6ID) > 0 {
|
err := r.UnifiClient.Client.DeleteFirewallPolicy(context.Background(), r.UnifiClient.SiteID, UnifiFirewallPolicy.TcpIpv6ID)
|
||||||
err := r.UnifiClient.Client.DeleteFirewallPolicy(context.Background(), r.UnifiClient.SiteID, UnifiFirewallPolicy.TcpIpv6ID)
|
if err != nil && !strings.Contains(err.Error(), "not found") {
|
||||||
if err != nil && !strings.Contains(err.Error(), "not found") {
|
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
|
||||||
} else {
|
|
||||||
firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies[i].TcpIpv6ID = ""
|
|
||||||
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
|
} else {
|
||||||
|
firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies[i].TcpIpv6ID = ""
|
||||||
|
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
||||||
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if len(UnifiFirewallPolicy.UdpIpv6ID) > 0 {
|
||||||
if len(UnifiFirewallPolicy.UdpIpv6ID) > 0 {
|
err := r.UnifiClient.Client.DeleteFirewallPolicy(context.Background(), r.UnifiClient.SiteID, UnifiFirewallPolicy.UdpIpv6ID)
|
||||||
err := r.UnifiClient.Client.DeleteFirewallPolicy(context.Background(), r.UnifiClient.SiteID, UnifiFirewallPolicy.UdpIpv6ID)
|
if err != nil && !strings.Contains(err.Error(), "not found") {
|
||||||
if err != nil && !strings.Contains(err.Error(), "not found") {
|
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
|
||||||
} else {
|
|
||||||
firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies[i].UdpIpv6ID = ""
|
|
||||||
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
|
} else {
|
||||||
|
firewallPolicy.Status.ResourcesManaged.UnifiFirewallPolicies[i].UdpIpv6ID = ""
|
||||||
|
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
||||||
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if len(firewallPolicy.Status.ResourcesManaged.FirewallGroups) > 0 {
|
if len(firewallPolicy.Status.ResourcesManaged.FirewallGroups) > 0 {
|
||||||
for i, firewallGroup := range firewallPolicy.Status.ResourcesManaged.FirewallGroups {
|
for i, firewallGroup := range firewallPolicy.Status.ResourcesManaged.FirewallGroups {
|
||||||
var firewallGroupCRD unifiv1beta1.FirewallGroup
|
var firewallGroupCRD unifiv1beta1.FirewallGroup
|
||||||
if firewallGroup.Name != "" {
|
if firewallGroup.Name != "" {
|
||||||
if err := r.Get(ctx, types.NamespacedName{Name: firewallGroup.Name, Namespace: firewallGroup.Namespace}, &firewallGroupCRD); err != nil {
|
if err := r.Get(ctx, types.NamespacedName{Name: firewallGroup.Name, Namespace: firewallGroup.Namespace}, &firewallGroupCRD); err != nil {
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
}
|
}
|
||||||
if err := r.Delete(ctx, &firewallGroupCRD); err != nil {
|
if err := r.Delete(ctx, &firewallGroupCRD); err != nil {
|
||||||
log.Error(err, "Could not delete firewall group")
|
log.Error(err, "Could not delete firewall group")
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
}
|
}
|
||||||
firewallPolicy.Status.ResourcesManaged.FirewallGroups[i].Name = ""
|
firewallPolicy.Status.ResourcesManaged.FirewallGroups[i].Name = ""
|
||||||
firewallPolicy.Status.ResourcesManaged.FirewallGroups[i].Namespace = ""
|
firewallPolicy.Status.ResourcesManaged.FirewallGroups[i].Namespace = ""
|
||||||
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
if err := r.Status().Update(ctx, &firewallPolicy); err != nil {
|
||||||
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
return ctrl.Result{RequeueAfter: 10 * time.Minute}, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -310,7 +312,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
// Run through all firewall groups. Add them to the myFirewallGroups list if they either have an annotations or is specified in the resource.
|
// Run through all firewall groups. Add them to the myFirewallGroups list if they either have an annotations or is specified in the resource.
|
||||||
|
|
||||||
for _, firewallGroup := range firewallGroupCRDs.Items {
|
for _, firewallGroup := range firewallGroupCRDs.Items {
|
||||||
if val, found := firewallGroup.Annotations["unifi.engen.priv.no/firewall-policy"]; found && ((strings.Contains(val, "/") && val == firewallPolicy.Namespace+"/"+firewallPolicy.Name) || (val == firewallPolicy.Name && firewallPolicy.Namespace == defaultNs)) {
|
if val, found := firewallGroup.Annotations["unifi.engen.priv.no/firewall-policy"]; found && ((strings.Contains(val, "/") && val == firewallPolicy.Namespace+"/"+firewallPolicy.Name) || (val == firewallPolicy.Name && firewallPolicy.Namespace == firewallGroup.Namespace)) {
|
||||||
myFirewallGroups = append(myFirewallGroups, firewallGroup)
|
myFirewallGroups = append(myFirewallGroups, firewallGroup)
|
||||||
} else if _, found := destination_groups[firewallGroup.Namespace+"/"+firewallGroup.Name]; found {
|
} else if _, found := destination_groups[firewallGroup.Namespace+"/"+firewallGroup.Name]; found {
|
||||||
myFirewallGroups = append(myFirewallGroups, firewallGroup)
|
myFirewallGroups = append(myFirewallGroups, firewallGroup)
|
||||||
@@ -340,7 +342,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
skipService = true
|
skipService = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if val, found := service.Annotations["unifi.engen.priv.no/firewall-policy"]; found && ((strings.Contains(val, "/") && val == firewallPolicy.Namespace+"/"+firewallPolicy.Name) || (val == firewallPolicy.Name && firewallPolicy.Namespace == defaultNs)) && !skipService {
|
if val, found := service.Annotations["unifi.engen.priv.no/firewall-policy"]; found && ((strings.Contains(val, "/") && val == firewallPolicy.Namespace+"/"+firewallPolicy.Name) || (val == firewallPolicy.Name && firewallPolicy.Namespace == service.Namespace)) && !skipService {
|
||||||
myServices = append(myServices, service)
|
myServices = append(myServices, service)
|
||||||
} else if _, found := destination_services[service.Namespace+"/"+service.Name]; found && !skipService {
|
} else if _, found := destination_services[service.Namespace+"/"+service.Name]; found && !skipService {
|
||||||
myServices = append(myServices, service)
|
myServices = append(myServices, service)
|
||||||
@@ -468,7 +470,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
|
|
||||||
if len(firewallGroup.Status.ResolvedIPV4Addresses) > 0 {
|
if len(firewallGroup.Status.ResolvedIPV4Addresses) > 0 {
|
||||||
if len(firewallGroup.Status.ResolvedTCPPorts) > 0 {
|
if len(firewallGroup.Status.ResolvedTCPPorts) > 0 {
|
||||||
policyname := "k8s-fw-" + firewallPolicy.Name + "-" + "zone:" + zoneCRDs.Items[zoneIndex].Name + "-" + firewallGroup.Name + "-ipv4-tcp"
|
policyname := "k8s-fw-" + firewallPolicy.Namespace + "/" + firewallPolicy.Name + "-" + "zone:" + zoneCRDs.Items[zoneIndex].Name + "-" + firewallGroup.Name + "-ipv4-tcp"
|
||||||
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
||||||
log.Info(fmt.Sprintf("Creating ipv4 tcp firewallpolicy for %s to %s: %s", zoneCRDs.Items[zoneIndex].Name, firewallGroup.Name, policyname))
|
log.Info(fmt.Sprintf("Creating ipv4 tcp firewallpolicy for %s to %s: %s", zoneCRDs.Items[zoneIndex].Name, firewallGroup.Name, policyname))
|
||||||
unifiFirewallPolicy := fillDefaultPolicy()
|
unifiFirewallPolicy := fillDefaultPolicy()
|
||||||
@@ -503,7 +505,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(firewallGroup.Status.ResolvedUDPPorts) > 0 {
|
if len(firewallGroup.Status.ResolvedUDPPorts) > 0 {
|
||||||
policyname := "k8s-fw-" + firewallPolicy.Name + "-" + "zone:" + zoneCRDs.Items[zoneIndex].Name + "-" + firewallGroup.Name + "-ipv4-udp"
|
policyname := "k8s-fw-" + firewallPolicy.Namespace + "/" + firewallPolicy.Name + "-" + "zone:" + zoneCRDs.Items[zoneIndex].Name + "-" + firewallGroup.Name + "-ipv4-udp"
|
||||||
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
||||||
log.Info(fmt.Sprintf("Creating ipv4 udp firewallpolicy for %s to %s: %s", zoneCRDs.Items[zoneIndex].Name, firewallGroup.Name, policyname))
|
log.Info(fmt.Sprintf("Creating ipv4 udp firewallpolicy for %s to %s: %s", zoneCRDs.Items[zoneIndex].Name, firewallGroup.Name, policyname))
|
||||||
unifiFirewallPolicy := fillDefaultPolicy()
|
unifiFirewallPolicy := fillDefaultPolicy()
|
||||||
@@ -541,7 +543,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
}
|
}
|
||||||
if len(firewallGroup.Status.ResolvedIPV6Addresses) > 0 {
|
if len(firewallGroup.Status.ResolvedIPV6Addresses) > 0 {
|
||||||
if len(firewallGroup.Status.ResolvedTCPPorts) > 0 {
|
if len(firewallGroup.Status.ResolvedTCPPorts) > 0 {
|
||||||
policyname := "k8s-fw-" + firewallPolicy.Name + "-" + "zone:" + zoneCRDs.Items[zoneIndex].Name + "-" + firewallGroup.Name + "-ipv6-tcp"
|
policyname := "k8s-fw-" + firewallPolicy.Namespace + "/" + firewallPolicy.Name + "-" + "zone:" + zoneCRDs.Items[zoneIndex].Name + "-" + firewallGroup.Name + "-ipv6-tcp"
|
||||||
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
||||||
log.Info(fmt.Sprintf("Creating ipv6 tcp firewallpolicy for %s to %s: %s", zoneCRDs.Items[zoneIndex].Name, firewallGroup.Name, policyname))
|
log.Info(fmt.Sprintf("Creating ipv6 tcp firewallpolicy for %s to %s: %s", zoneCRDs.Items[zoneIndex].Name, firewallGroup.Name, policyname))
|
||||||
unifiFirewallPolicy := fillDefaultPolicy()
|
unifiFirewallPolicy := fillDefaultPolicy()
|
||||||
@@ -577,7 +579,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(firewallGroup.Status.ResolvedUDPPorts) > 0 {
|
if len(firewallGroup.Status.ResolvedUDPPorts) > 0 {
|
||||||
policyname := "k8s-fw-" + firewallPolicy.Name + "-" + "zone:" + zoneCRDs.Items[zoneIndex].Name + "-" + firewallGroup.Name + "-ipv6-udp"
|
policyname := "k8s-fw-" + firewallPolicy.Namespace + "/" + firewallPolicy.Name + "-" + "zone:" + zoneCRDs.Items[zoneIndex].Name + "-" + firewallGroup.Name + "-ipv6-udp"
|
||||||
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
||||||
log.Info(fmt.Sprintf("Creating ipv6 udp firewallpolicy for %s to %s: %s", zoneCRDs.Items[zoneIndex].Name, firewallGroup.Name, policyname))
|
log.Info(fmt.Sprintf("Creating ipv6 udp firewallpolicy for %s to %s: %s", zoneCRDs.Items[zoneIndex].Name, firewallGroup.Name, policyname))
|
||||||
unifiFirewallPolicy := fillDefaultPolicy()
|
unifiFirewallPolicy := fillDefaultPolicy()
|
||||||
@@ -640,7 +642,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
}
|
}
|
||||||
if len(firewallGroup.Status.ResolvedIPV4Addresses) > 0 {
|
if len(firewallGroup.Status.ResolvedIPV4Addresses) > 0 {
|
||||||
if len(firewallGroup.Status.ResolvedTCPPorts) > 0 {
|
if len(firewallGroup.Status.ResolvedTCPPorts) > 0 {
|
||||||
policyname := "k8s-fw-" + firewallPolicy.Name + "-" + "network:" + networkCRDs.Items[networkIndex].Name + "-" + firewallGroup.Name + "-ipv4-tcp"
|
policyname := "k8s-fw-" + firewallPolicy.Namespace + "/" + firewallPolicy.Name + "-" + "network:" + networkCRDs.Items[networkIndex].Name + "-" + firewallGroup.Name + "-ipv4-tcp"
|
||||||
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
||||||
log.Info(fmt.Sprintf("Creating ipv4 tcp firewallpolicy for %s to %s: %s", networkCRDs.Items[networkIndex].Name, firewallGroup.Name, policyname))
|
log.Info(fmt.Sprintf("Creating ipv4 tcp firewallpolicy for %s to %s: %s", networkCRDs.Items[networkIndex].Name, firewallGroup.Name, policyname))
|
||||||
unifiFirewallPolicy := fillDefaultPolicy()
|
unifiFirewallPolicy := fillDefaultPolicy()
|
||||||
@@ -677,7 +679,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(firewallGroup.Status.ResolvedUDPPorts) > 0 {
|
if len(firewallGroup.Status.ResolvedUDPPorts) > 0 {
|
||||||
policyname := "k8s-fw-" + firewallPolicy.Name + "-" + "network:" + networkCRDs.Items[networkIndex].Name + "-" + firewallGroup.Name + "-ipv4-udp"
|
policyname := "k8s-fw-" + firewallPolicy.Namespace + "/" + firewallPolicy.Name + "-" + "network:" + networkCRDs.Items[networkIndex].Name + "-" + firewallGroup.Name + "-ipv4-udp"
|
||||||
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
||||||
log.Info(fmt.Sprintf("Creating ipv4 udp firewallpolicy for %s to %s: %s", networkCRDs.Items[networkIndex].Name, firewallGroup.Name, policyname))
|
log.Info(fmt.Sprintf("Creating ipv4 udp firewallpolicy for %s to %s: %s", networkCRDs.Items[networkIndex].Name, firewallGroup.Name, policyname))
|
||||||
unifiFirewallPolicy := fillDefaultPolicy()
|
unifiFirewallPolicy := fillDefaultPolicy()
|
||||||
@@ -716,7 +718,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
}
|
}
|
||||||
if len(firewallGroup.Status.ResolvedIPV6Addresses) > 0 {
|
if len(firewallGroup.Status.ResolvedIPV6Addresses) > 0 {
|
||||||
if len(firewallGroup.Status.ResolvedTCPPorts) > 0 {
|
if len(firewallGroup.Status.ResolvedTCPPorts) > 0 {
|
||||||
policyname := "k8s-fw-" + firewallPolicy.Name + "-" + "network:" + networkCRDs.Items[networkIndex].Name + "-" + firewallGroup.Name + "-ipv6-tcp"
|
policyname := "k8s-fw-" + firewallPolicy.Namespace + "/" + firewallPolicy.Name + "-" + "network:" + networkCRDs.Items[networkIndex].Name + "-" + firewallGroup.Name + "-ipv6-tcp"
|
||||||
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
||||||
log.Info(fmt.Sprintf("Creating ipv6 tcp firewallpolicy for %s to %s: %s", networkCRDs.Items[networkIndex].Name, firewallGroup.Name, policyname))
|
log.Info(fmt.Sprintf("Creating ipv6 tcp firewallpolicy for %s to %s: %s", networkCRDs.Items[networkIndex].Name, firewallGroup.Name, policyname))
|
||||||
unifiFirewallPolicy := fillDefaultPolicy()
|
unifiFirewallPolicy := fillDefaultPolicy()
|
||||||
@@ -753,7 +755,7 @@ func (r *FirewallPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(firewallGroup.Status.ResolvedUDPPorts) > 0 {
|
if len(firewallGroup.Status.ResolvedUDPPorts) > 0 {
|
||||||
policyname := "k8s-fw-" + firewallPolicy.Name + "-" + "network:" + networkCRDs.Items[networkIndex].Name + "-" + firewallGroup.Name + "-ipv6-udp"
|
policyname := "k8s-fw-" + firewallPolicy.Namespace + "/" + firewallPolicy.Name + "-" + "network:" + networkCRDs.Items[networkIndex].Name + "-" + firewallGroup.Name + "-ipv6-udp"
|
||||||
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
if _, found := unifiFirewallpolicyNames[policyname]; !found {
|
||||||
log.Info(fmt.Sprintf("Creating ipv6 udp firewallpolicy for %s to %s: %s", networkCRDs.Items[networkIndex].Name, firewallGroup.Name, policyname))
|
log.Info(fmt.Sprintf("Creating ipv6 udp firewallpolicy for %s to %s: %s", networkCRDs.Items[networkIndex].Name, firewallGroup.Name, policyname))
|
||||||
unifiFirewallPolicy := fillDefaultPolicy()
|
unifiFirewallPolicy := fillDefaultPolicy()
|
||||||
|
|||||||
7
ko.yaml
Normal file
7
ko.yaml
Normal 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: ""
|
||||||
Reference in New Issue
Block a user