Skip to content

Commit fca412e

Browse files
author
Jelle Dijkstra
committed
Applied changes to WMS
1 parent 359f2c2 commit fca412e

File tree

6 files changed

+14
-19
lines changed

6 files changed

+14
-19
lines changed

api/v2beta1/wms_conversion.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func V3HubFromV2(src *WMS, target *pdoknlv3.WMS) {
7474
dst.Spec.PodSpecPatch = ConvertResources(*src.Spec.Kubernetes.Resources)
7575
}
7676

77-
dst.Spec.Options = ConvertOptionsV2ToV3(src.Spec.Options)
77+
dst.Spec.Options = *ConvertOptionsV2ToV3(src.Spec.Options)
7878

7979
service := pdoknlv3.WMSService{
8080
URL: CreateBaseURL("https://service.pdok.nl", "wms", src.Spec.General),
@@ -153,9 +153,7 @@ func (dst *WMS) ConvertFrom(srcRaw conversion.Hub) error {
153153

154154
dst.Spec.Kubernetes = NewV2KubernetesObject(src.Spec.Lifecycle, src.Spec.PodSpecPatch, src.Spec.HorizontalPodAutoscalerPatch)
155155

156-
if src.Spec.Options != nil {
157-
dst.Spec.Options = ConvertOptionsV3ToV2(src.Spec.Options)
158-
}
156+
dst.Spec.Options = ConvertOptionsV3ToV2(&src.Spec.Options)
159157

160158
service := WMSService{
161159
Title: src.Spec.Service.Title,

api/v3/wms_types.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,18 @@ type WMSSpec struct {
5454
// Optional strategic merge patch for the pod in the deployment. E.g. to patch the resources or add extra env vars.
5555
PodSpecPatch *corev1.PodSpec `json:"podSpecPatch,omitempty"`
5656
HorizontalPodAutoscalerPatch *autoscalingv2.HorizontalPodAutoscalerSpec `json:"horizontalPodAutoscalerPatch"`
57-
Options *Options `json:"options"`
57+
Options Options `json:"options,omitempty"`
5858
Service WMSService `json:"service"`
5959
}
6060

6161
type WMSService struct {
62-
URL string `json:"url"`
63-
Title string `json:"title"`
64-
Abstract string `json:"abstract"`
65-
Keywords []string `json:"keywords"`
66-
OwnerInfoRef string `json:"ownerInfoRef"`
67-
Fees *string `json:"fees,omitempty"`
62+
URL string `json:"url"`
63+
Title string `json:"title"`
64+
Abstract string `json:"abstract"`
65+
Keywords []string `json:"keywords"`
66+
OwnerInfoRef string `json:"ownerInfoRef"`
67+
Fees *string `json:"fees,omitempty"`
68+
// +kubebuilder:default="https://creativecommons.org/publicdomain/zero/1.0/deed.nl"
6869
AccessConstraints string `json:"accessConstraints"`
6970
MaxSize *int32 `json:"maxSize,omitempty"`
7071
Inspire *Inspire `json:"inspire,omitempty"`

api/v3/zz_generated.deepcopy.go

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/samples/v3_wfs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
csw:
4646
metadataIdentifier: 68a42961-ed55-436b-a412-cc7424fd2a6e
4747
spatialDatasetIdentifier: ""
48-
language: "nl"
48+
language: "dut"
4949
ownerInfoRef: pdok
5050
title: "Dataset"
5151
abstract: "Dataset beschrijving ..."

config/samples/v3_wms.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
csw:
5656
metadataIdentifier: 1234abcd-1234-abcd-1234-abcd1234abcd
5757
spatialDatasetIdentifier: abcd1234-abcd-1234-abcd-1234abcd1234
58-
language: "nl"
58+
language: "dut"
5959
dataEPSG: EPSG:28992
6060
resolution:
6161
defResolution:

internal/controller/test_manifests/v3_wfs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
csw:
4646
metadataIdentifier: 68a42961-ed55-436b-a412-cc7424fd2a6e
4747
spatialDatasetIdentifier: ""
48-
language: "nl"
48+
language: "dut"
4949
ownerInfoRef: pdok
5050
title: "Dataset"
5151
abstract: "Dataset beschrijving ..."

0 commit comments

Comments
 (0)