Skip to content

Commit 6ca1ae8

Browse files
author
Jelle Dijkstra
committed
Running WMS
1 parent 476ab23 commit 6ca1ae8

File tree

9 files changed

+1785
-1874
lines changed

9 files changed

+1785
-1874
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ARG TARGETOS
44
ARG TARGETARCH
55

66
#COPY --from=repos ./smooth-operator /smooth-operator
7+
#COPY --from=repos ./ogc-specifications /ogc-specifications
78

89
WORKDIR /workspace
910
# Copy the Go Modules manifests

api/v3/wms_validation.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ func (wms *WMS) ValidateCreate() ([]string, error) {
2020
validateWMS(wms, &warnings, &reasons)
2121

2222
if len(reasons) > 0 {
23-
//yaml, _ := yaml2.Marshal(wms)
24-
//fmt.Println(yaml)
2523
return warnings, fmt.Errorf("%s", strings.Join(reasons, ". "))
2624
}
2725

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const (
5353
defaultMapfileGeneratorImage = "acrpdokprodman.azurecr.io/pdok/mapfile-generator:1.9.5"
5454
defaultMapserverImage = "acrpdokprodman.azurecr.io/mirror/docker.io/pdok/mapserver:8.4.0-4-nl"
5555
defaultCapabilitiesGeneratorImage = "acrpdokprodman.azurecr.io/mirror/docker.io/pdok/ogc-capabilities-generator:1.0.0-beta7"
56-
defaultFeatureinfoGeneratorImage = "acrpdokprodman.azurecr.io/mirror/docker.io/pdok/featureinfo-generator:v1.4.0-beta1"
56+
defaultFeatureinfoGeneratorImage = "acrpdokprodman.azurecr.io/mirror/docker.io/pdok/featureinfo-generator:1.4.0-beta1"
5757
defaultOgcWebserviceProxyImage = "acrpdokprodman.azurecr.io/pdok/ogc-webservice-proxy:0.1.8"
5858
defaultApacheExporterImage = "acrpdokprodman.azurecr.io/mirror/docker.io/lusotycoon/apache-exporter:v0.7.0"
5959

config/crd/bases/pdok.nl_wms.yaml

Lines changed: 1729 additions & 1804 deletions
Large diffs are not rendered by default.

config/crd/update_openapi.go

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package main
22

33
import (
44
"github.com/pkg/errors"
5+
goyaml "gopkg.in/yaml.v3"
56
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
67
"os"
78
"path/filepath"
8-
"sigs.k8s.io/yaml"
9+
kyaml "sigs.k8s.io/yaml"
910
)
1011

1112
// Usage: go run ./update_layersv3_openapi.go <crd_dir_path>
@@ -24,7 +25,7 @@ func updateWMSV3Layers(crdDir string) {
2425

2526
content, _ := os.ReadFile(path)
2627
crd := &v1.CustomResourceDefinition{}
27-
err := yaml.Unmarshal(content, &crd)
28+
err := kyaml.Unmarshal(content, &crd)
2829
if err != nil {
2930
panic(err)
3031
}
@@ -71,6 +72,19 @@ func updateWMSV3Layers(crdDir string) {
7172
}
7273

7374
crd.Spec.Versions = versions
74-
updatedContent, _ := yaml.Marshal(crd)
75-
os.WriteFile(path, updatedContent, os.ModePerm)
75+
updatedContent, _ := kyaml.Marshal(crd)
76+
77+
// Remove the 'status' field from the yaml
78+
var rawData map[string]interface{}
79+
goyaml.Unmarshal(updatedContent, &rawData)
80+
delete(rawData, "status")
81+
82+
f, _ := os.OpenFile(path, os.O_TRUNC|os.O_WRONLY, 0644)
83+
defer f.Close()
84+
85+
enc := goyaml.NewEncoder(f)
86+
defer enc.Close()
87+
88+
enc.SetIndent(2)
89+
_ = enc.Encode(rawData)
7690
}

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ kind: Kustomization
55
images:
66
- name: controller
77
newName: local-registry:5000/mapserver-operator
8-
newTag: v3.0.26
8+
newTag: v3.0.3

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ require (
1111
github.com/onsi/ginkgo/v2 v2.22.2
1212
github.com/onsi/gomega v1.36.2
1313
github.com/pdok/featureinfo-generator v1.4.0-beta1
14-
github.com/pdok/ogc-capabilities-generator v1.0.0-beta6
15-
github.com/pdok/ogc-specifications v1.0.0-beta5
14+
github.com/pdok/ogc-capabilities-generator v1.0.0-beta7
15+
github.com/pdok/ogc-specifications v1.0.0-beta7
1616
github.com/pdok/smooth-operator v0.0.16
1717
github.com/stretchr/testify v1.10.0
1818
github.com/traefik/traefik/v3 v3.3.4
@@ -96,7 +96,7 @@ require (
9696
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
9797
github.com/modern-go/reflect2 v1.0.2 // indirect
9898
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
99-
github.com/pkg/errors v0.9.1 // indirect
99+
github.com/pkg/errors v0.9.1
100100
github.com/prometheus/client_golang v1.21.1 // indirect
101101
github.com/prometheus/client_model v0.6.1 // indirect
102102
github.com/prometheus/common v0.62.0 // indirect
@@ -132,7 +132,7 @@ require (
132132
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
133133
gopkg.in/inf.v0 v0.9.1 // indirect
134134
gopkg.in/yaml.v3 v3.0.1
135-
k8s.io/apiextensions-apiserver v0.32.3 // indirect
135+
k8s.io/apiextensions-apiserver v0.32.3
136136
k8s.io/apiserver v0.32.3 // indirect
137137
k8s.io/component-base v0.32.3 // indirect
138138
k8s.io/klog/v2 v2.130.1 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaR
149149
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
150150
github.com/pdok/featureinfo-generator v1.4.0-beta1 h1:ZZO5OtK7yW5ozXFrl1OaxKl0MK3XF5YGFh2692JZVN8=
151151
github.com/pdok/featureinfo-generator v1.4.0-beta1/go.mod h1:02Ryu7ZRkeha8SCfS6VYWCdKYZh0llskrfFgp6xRCjk=
152-
github.com/pdok/ogc-capabilities-generator v1.0.0-beta6 h1:yn0ZyMruJ2gmdx7E78LEamtmsxMkFPjFcZYk12mNtcE=
153-
github.com/pdok/ogc-capabilities-generator v1.0.0-beta6/go.mod h1:slk89sAgmWU5NCIKwGyciQWnm0RHmwhJYQ431E2CwSk=
154-
github.com/pdok/ogc-specifications v1.0.0-beta5 h1:j7JrXUeW55mVU9ZmJ67r8V6DhbKdgTDiGE1YKFpRWx4=
155-
github.com/pdok/ogc-specifications v1.0.0-beta5/go.mod h1:YDngwkwrWOfc5MYnEYseiv97K1Y9bZXlVzwi/8EaIl8=
152+
github.com/pdok/ogc-capabilities-generator v1.0.0-beta7 h1:w0dP2RQX0KEEovrq57NCM1w+Hlizg9mQlgdRBEqKX2g=
153+
github.com/pdok/ogc-capabilities-generator v1.0.0-beta7/go.mod h1:slk89sAgmWU5NCIKwGyciQWnm0RHmwhJYQ431E2CwSk=
154+
github.com/pdok/ogc-specifications v1.0.0-beta7 h1:AFSO8iCYbD1MrjOS2q+PGp2PmSqAH+O7cuA7JeePCXE=
155+
github.com/pdok/ogc-specifications v1.0.0-beta7/go.mod h1:YDngwkwrWOfc5MYnEYseiv97K1Y9bZXlVzwi/8EaIl8=
156156
github.com/pdok/smooth-operator v0.0.16 h1:1vurI2TPDHmTaTu0YeG1B9mIIa5MT6GPWhixiZ/styg=
157157
github.com/pdok/smooth-operator v0.0.16/go.mod h1:ohDqrUnmS7wK8TrNHJnFS/mDgf26Yhb8mtRBX3ixdr4=
158158
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=

internal/controller/capabilitiesgenerator/capabilities_generator_test.go

Lines changed: 27 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -241,24 +241,15 @@ services:
241241
- HVD
242242
- Mobiliteit
243243
crs:
244-
- namespace: EPSG
245-
code: 28992
246-
- namespace: EPSG
247-
code: 25831
248-
- namespace: EPSG
249-
code: 25832
250-
- namespace: EPSG
251-
code: 3034
252-
- namespace: EPSG
253-
code: 3035
254-
- namespace: EPSG
255-
code: 3857
256-
- namespace: EPSG
257-
code: 4258
258-
- namespace: EPSG
259-
code: 4326
260-
- namespace: CRS
261-
code: 84
244+
- EPSG:28992
245+
- EPSG:25831
246+
- EPSG:25832
247+
- EPSG:3034
248+
- EPSG:3035
249+
- EPSG:3857
250+
- EPSG:4258
251+
- EPSG:4326
252+
- CRS:84
262253
exGeographicBoundingBox:
263254
westBoundLongitude: 2.52713
264255
eastBoundLongitude: 7.37403
@@ -336,24 +327,15 @@ services:
336327
- Verkeer
337328
- Wegvakken
338329
crs:
339-
- namespace: EPSG
340-
code: 28992
341-
- namespace: EPSG
342-
code: 25831
343-
- namespace: EPSG
344-
code: 25832
345-
- namespace: EPSG
346-
code: 3034
347-
- namespace: EPSG
348-
code: 3035
349-
- namespace: EPSG
350-
code: 3857
351-
- namespace: EPSG
352-
code: 4258
353-
- namespace: EPSG
354-
code: 4326
355-
- namespace: CRS
356-
code: 84
330+
- EPSG:28992
331+
- EPSG:25831
332+
- EPSG:25832
333+
- EPSG:3034
334+
- EPSG:3035
335+
- EPSG:3857
336+
- EPSG:4258
337+
- EPSG:4326
338+
- CRS:84
357339
exGeographicBoundingBox:
358340
westBoundLongitude: 2.52713
359341
eastBoundLongitude: 7.37403
@@ -451,24 +433,15 @@ services:
451433
- Verkeer
452434
- Hectometerpunten
453435
crs:
454-
- namespace: EPSG
455-
code: 28992
456-
- namespace: EPSG
457-
code: 25831
458-
- namespace: EPSG
459-
code: 25832
460-
- namespace: EPSG
461-
code: 3034
462-
- namespace: EPSG
463-
code: 3035
464-
- namespace: EPSG
465-
code: 3857
466-
- namespace: EPSG
467-
code: 4258
468-
- namespace: EPSG
469-
code: 4326
470-
- namespace: CRS
471-
code: 84
436+
- EPSG:28992
437+
- EPSG:25831
438+
- EPSG:25832
439+
- EPSG:3034
440+
- EPSG:3035
441+
- EPSG:3857
442+
- EPSG:4258
443+
- EPSG:4326
444+
- CRS:84
472445
exGeographicBoundingBox:
473446
westBoundLongitude: 2.52713
474447
eastBoundLongitude: 7.37403

0 commit comments

Comments
 (0)