Skip to content

Commit 403d5a4

Browse files
authored
Release 2.1.2 (#77)
1 parent 74dcdbc commit 403d5a4

File tree

11 files changed

+17
-22
lines changed

11 files changed

+17
-22
lines changed

api/v1alpha1/nat_types.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ type NatSpec struct {
5959
// +kubebuilder:validation:Pattern=`(^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[12]\d|3[0-2]))?$)|(^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?(\/([1-9]|[1-5][0-9]|6[0-4]))?$)`
6060
DnatToIP string `json:"dnatToIp,omitempty"`
6161

62-
// +kubebuilder:validation:Minimum=1
63-
// +kubebuilder:validation:Maximum=65535
64-
DnatToPort int `json:"dnatToPort,omitempty"`
62+
DnatToPort string `json:"dnatToPort,omitempty"`
6563
}
6664

6765
// NatStatus defines the observed state of Nat
@@ -85,7 +83,7 @@ type NatStatus struct {
8583
// +kubebuilder:printcolumn:name="SNATToIP",type=string,JSONPath=`.spec.snatToIp`,priority=1
8684
// +kubebuilder:printcolumn:name="SNATToPool",type=string,JSONPath=`.spec.snatToPool`,priority=1
8785
// +kubebuilder:printcolumn:name="DNATToIP",type=string,JSONPath=`.spec.dnatToIp`,priority=1
88-
// +kubebuilder:printcolumn:name="DNATToPort",type=integer,JSONPath=`.spec.dnatToPort`,priority=1
86+
// +kubebuilder:printcolumn:name="DNATToPort",type=string,JSONPath=`.spec.dnatToPort`,priority=1
8987
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`
9088
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
9189

api/v1alpha1/natmeta_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type NatMetaSpec struct {
4545
SnatToIP string `json:"snatToIp,omitempty"`
4646
SnatToPool string `json:"snatToPool,omitempty"`
4747
DnatToIP string `json:"dnatToIp,omitempty"`
48-
DnatToPort int `json:"dnatToPort,omitempty"`
48+
DnatToPort string `json:"dnatToPort,omitempty"`
4949
}
5050

5151
// NatMetaStatus defines the observed state of NatMeta

config/crd/bases/k8s.netris.ai_natmeta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
dnatToIp:
4444
type: string
4545
dnatToPort:
46-
type: integer
46+
type: string
4747
dstAddress:
4848
type: string
4949
dstPort:

config/crd/bases/k8s.netris.ai_nats.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ spec:
5656
- jsonPath: .spec.dnatToPort
5757
name: DNATToPort
5858
priority: 1
59-
type: integer
59+
type: string
6060
- jsonPath: .status.status
6161
name: Status
6262
type: string
@@ -96,9 +96,7 @@ spec:
9696
pattern: (^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[12]\d|3[0-2]))?$)|(^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?(\/([1-9]|[1-5][0-9]|6[0-4]))?$)
9797
type: string
9898
dnatToPort:
99-
maximum: 65535
100-
minimum: 1
101-
type: integer
99+
type: string
102100
dstAddress:
103101
pattern: (^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[12]\d|3[0-2]))?$)|(^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?(\/([1-9]|[1-5][0-9]|6[0-4]))?$)
104102
type: string

controllers/nat_translations.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package controllers
1818

1919
import (
2020
"fmt"
21-
"strconv"
2221
"strings"
2322

2423
k8sv1alpha1 "github.com/netrisai/netris-operator/api/v1alpha1"
@@ -135,7 +134,7 @@ func NatMetaToNetris(natMeta *k8sv1alpha1.NatMeta) (*nat.NATw, error) {
135134
SnatToIP: natMeta.Spec.SnatToIP,
136135
SnatToPool: natMeta.Spec.SnatToPool,
137136
DnatToIP: natMeta.Spec.DnatToIP,
138-
DnatToPort: strconv.Itoa(natMeta.Spec.DnatToPort),
137+
DnatToPort: natMeta.Spec.DnatToPort,
139138
}
140139

141140
return natAdd, nil
@@ -157,7 +156,7 @@ func NatMetaToNetrisUpdate(natMeta *k8sv1alpha1.NatMeta) (*nat.NATw, error) {
157156
SnatToIP: natMeta.Spec.SnatToIP,
158157
SnatToPool: natMeta.Spec.SnatToPool,
159158
DnatToIP: natMeta.Spec.DnatToIP,
160-
DnatToPort: strconv.Itoa(natMeta.Spec.DnatToPort),
159+
DnatToPort: natMeta.Spec.DnatToPort,
161160
}
162161

163162
return natAdd, nil

deploy/charts/netris-operator/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.1.1
18+
version: 1.1.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: v2.1.1
23+
appVersion: v2.1.2
2424
home: https://github.com/netrisai/netris-operator
2525
icon: https://www.netris.ai/wp-content/uploads/2021/01/logo-300.png # [todo] Change url to permalink
2626
keywords:

deploy/charts/netris-operator/crds/k8s.netris.ai_natmeta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
dnatToIp:
4444
type: string
4545
dnatToPort:
46-
type: integer
46+
type: string
4747
dstAddress:
4848
type: string
4949
dstPort:

deploy/charts/netris-operator/crds/k8s.netris.ai_nats.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ spec:
5656
- jsonPath: .spec.dnatToPort
5757
name: DNATToPort
5858
priority: 1
59-
type: integer
59+
type: string
6060
- jsonPath: .status.status
6161
name: Status
6262
type: string
@@ -96,9 +96,7 @@ spec:
9696
pattern: (^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[12]\d|3[0-2]))?$)|(^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?(\/([1-9]|[1-5][0-9]|6[0-4]))?$)
9797
type: string
9898
dnatToPort:
99-
maximum: 65535
100-
minimum: 1
101-
type: integer
99+
type: string
102100
dstAddress:
103101
pattern: (^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[12]\d|3[0-2]))?$)|(^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?(\/([1-9]|[1-5][0-9]|6[0-4]))?$)
104102
type: string

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.17
55
require (
66
github.com/go-logr/logr v0.1.0
77
github.com/kelseyhightower/envconfig v1.4.0
8-
github.com/netrisai/netriswebapi v0.0.0-20230404043848-3cf45f0ba07d
8+
github.com/netrisai/netriswebapi v0.0.0-20231227220649-64aa510b4db1
99
github.com/onsi/ginkgo v1.16.4
1010
github.com/onsi/gomega v1.19.0
1111
github.com/r3labs/diff/v2 v2.9.1

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
242242
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
243243
github.com/netrisai/netriswebapi v0.0.0-20230404043848-3cf45f0ba07d h1:w3bDLlD+UWOgn+AF1Qt/GN/XtpH1dZSyceVouvVeGVY=
244244
github.com/netrisai/netriswebapi v0.0.0-20230404043848-3cf45f0ba07d/go.mod h1:GLLz33Jc07/hIPwEYZDWEtNtHjX/QZjVzf9xLnfSiqs=
245+
github.com/netrisai/netriswebapi v0.0.0-20231227220649-64aa510b4db1 h1:ET2jCGf2QrNLMvVV9S5kYOv/7YDROgYisfsgzZKB5Tw=
246+
github.com/netrisai/netriswebapi v0.0.0-20231227220649-64aa510b4db1/go.mod h1:GLLz33Jc07/hIPwEYZDWEtNtHjX/QZjVzf9xLnfSiqs=
245247
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
246248
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
247249
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=

samples/nat.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
dstAddress: 203.0.113.193/32
2929
dstPort: "8080"
3030
dnatToIp: 100.71.56.150/32
31-
dnatToPort: 80
31+
dnatToPort: "80"
3232
---
3333
apiVersion: k8s.netris.ai/v1alpha1
3434
kind: Nat

0 commit comments

Comments
 (0)