@@ -66,36 +66,80 @@ func init() {
6666
6767// WFSSpec vertegenwoordigt de hoofdstruct voor de YAML-configuratie
6868type WFSSpec struct {
69+ // Optional lifecycle settings
6970 Lifecycle * shared_model.Lifecycle `json:"lifecycle,omitempty"`
7071 // +kubebuilder:validation:Type=object
7172 // +kubebuilder:validation:Schemaless
7273 // +kubebuilder:pruning:PreserveUnknownFields
7374 // Optional strategic merge patch for the pod in the deployment. E.g. to patch the resources or add extra env vars.
75+
7476 PodSpecPatch * corev1.PodSpec `json:"podSpecPatch,omitempty"`
7577 HorizontalPodAutoscalerPatch * autoscalingv2.HorizontalPodAutoscalerSpec `json:"horizontalPodAutoscalerPatch,omitempty"`
7678 Options Options `json:"options,omitempty"`
77- Service WFSService `json:"service"`
79+
80+ // service configuration
81+ // +kubebuilder:validation:Required
82+ Service WFSService `json:"service"`
7883}
7984
8085type WFSService struct {
8186 // Geonovum subdomein
8287 // +kubebuilder:validation:MinLength:=1
83- Prefix string `json:"prefix"`
84- URL string `json:"url"`
85- Inspire * Inspire `json:"inspire,omitempty"`
86- Mapfile * Mapfile `json:"mapfile,omitempty"`
87- OwnerInfoRef string `json:"ownerInfoRef"`
88- Title string `json:"title"`
89- Abstract string `json:"abstract"`
90- Keywords []string `json:"keywords"`
91- Fees * string `json:"fees,omitempty"`
88+ Prefix string `json:"prefix"`
89+
90+ // URL of the service
91+ // +kubebuilder:validation:Pattern:=`^https?://.*$`
92+ URL string `json:"url"`
93+
94+ // check for Inspire services
95+ // +kubebuilder:default="false"
96+ Inspire * Inspire `json:"inspire,omitempty"`
97+
98+ // External Mapfile reference
99+ Mapfile * Mapfile `json:"mapfile,omitempty"`
100+
101+ // Reference to OwnerInfo CR
102+ // TODO no webhook yet?
103+ // +kubebuilder:validation:MinLength:=1
104+ OwnerInfoRef string `json:"ownerInfoRef"`
105+
106+ // Service title
107+ // +kubebuilder:validation:MinLength:=1
108+ Title string `json:"title"`
109+
110+ // Service abstract
111+ // +kubebuilder:validation:MinLength:=1
112+ Abstract string `json:"abstract"`
113+
114+ // Keywords for capabilities
115+ // +kubebuilder:validation:MinItems:=1
116+ Keywords []string `json:"keywords"`
117+
118+ // Optional Fees
119+ Fees * string `json:"fees,omitempty"`
120+
121+ // AccessConstraints URL
122+ // +kubebuilder:validation:Pattern:="https?://"
92123 // +kubebuilder:default="https://creativecommons.org/publicdomain/zero/1.0/deed.nl"
93- AccessConstraints string `json:"accessConstraints"`
94- DefaultCrs string `json:"defaultCrs"`
95- OtherCrs []string `json:"otherCrs,omitempty"`
96- Bbox * Bbox `json:"bbox,omitempty"`
124+ AccessConstraints string `json:"accessConstraints"`
125+
126+ // Default CRS (DataEPSG)
127+ // +kubebuilder:validation:Pattern:="^EPSG:(28992|25831|25832|3034|3035|3857|4258|4326)$"
128+ // +kubebuilder:validation:MinLength:=1
129+ DefaultCrs string `json:"defaultCrs"`
130+
131+ // Other supported CRS
132+ OtherCrs []string `json:"otherCrs,omitempty"`
133+
134+ // Service bounding box
135+ Bbox * Bbox `json:"bbox,omitempty"`
136+
97137 // CountDefault -> wfs_maxfeatures in mapfile
98- CountDefault * string `json:"countDefault,omitempty"`
138+ // +kubebuilder:validation:MinLength:=1
139+ CountDefault * string `json:"countDefault,omitempty"`
140+
141+ // FeatureTypes configurations
142+ // +kubebuilder:validation:MinItems:=1
99143 FeatureTypes []FeatureType `json:"featureTypes"`
100144}
101145
@@ -105,14 +149,37 @@ type Bbox struct {
105149 DefaultCRS shared_model.BBox `json:"defaultCRS"`
106150}
107151
152+ // FeatureType defines a WFS feature
153+ // +kubebuilder:validation:Required
108154type FeatureType struct {
109- Name string `json:"name"`
110- Title string `json:"title"`
111- Abstract string `json:"abstract"`
112- Keywords []string `json:"keywords"`
113- DatasetMetadataURL MetadataURL `json:"datasetMetadataUrl"`
114- Bbox * FeatureBbox `json:"bbox,omitempty"`
115- Data Data `json:"data"`
155+ // Name of the feature
156+ // +kubebuilder:validation:MinLength:=1
157+ Name string `json:"name"`
158+
159+ // Title of the feature
160+ // +kubebuilder:validation:MinLength:=1
161+ Title string `json:"title"`
162+
163+ // Abstract of the feature
164+ // +kubebuilder:validation:MinLength:=1
165+ Abstract string `json:"abstract"`
166+
167+ // Keywords of the feature
168+ // +kubebuilder:validation:MinItems:=1
169+ Keywords []string `json:"keywords"`
170+
171+ // Metadata URL
172+ // +kubebuilder:validation:Type=object
173+ DatasetMetadataURL MetadataURL `json:"datasetMetadataUrl"`
174+
175+ // Optional feature bbox
176+ // +kubebuilder:validation:Optional
177+ // +kubebuilder:validation:Type:=object
178+ Bbox * FeatureBbox `json:"bbox,omitempty"`
179+
180+ // Featuretype data connection
181+ // +kubebuilder:validation:Required
182+ Data Data `json:"data"`
116183}
117184
118185type FeatureBbox struct {
0 commit comments