Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/v1alpha1/ogcapi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ type OGCAPI struct {
Status smoothoperatormodel.OperatorStatus `json:"status,omitempty"`

// +optional
VolumeOperatorSpec VolumeOperatorSpec `json:"volumeOperatorSpec,omitempty"`
VolumeOperatorSpec *VolumeOperatorSpec `json:"volumeOperatorSpec,omitempty"`
}

func (ogcapi *OGCAPI) OperatorStatus() *smoothoperatormodel.OperatorStatus {
Expand Down
6 changes: 5 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ func (in *OGCAPI) DeepCopyInto(out *OGCAPI) {
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
out.VolumeOperatorSpec = in.VolumeOperatorSpec
if in.VolumeOperatorSpec != nil {
in, out := &in.VolumeOperatorSpec, &out.VolumeOperatorSpec
*out = new(VolumeOperatorSpec)
**out = **in
}
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OGCAPI.
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (r *OGCAPIReconciler) mutateDeployment(ogcAPI *pdoknlv1alpha1.OGCAPI, deplo
deployment.Spec.Template = podTemplateSpec

// set annotations for optional volume-operator, volume operator requires blob-prefix to be set
if ogcAPI.VolumeOperatorSpec.BlobPrefix != "" {
if ogcAPI.VolumeOperatorSpec != nil && ogcAPI.VolumeOperatorSpec.BlobPrefix != "" {
deployment = addVolumePopulatorToDeployment(deployment, ogcAPI)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/controller/ogcapi_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ var _ = Describe("OGCAPI Controller", func() {
Spec: pdoknlv1alpha1.OGCAPISpec{
Service: *minimalOGCAPI.Spec.Service.DeepCopy(),
},
VolumeOperatorSpec: pdoknlv1alpha1.VolumeOperatorSpec{
VolumeOperatorSpec: &pdoknlv1alpha1.VolumeOperatorSpec{
BlobPrefix: "test/prefix",
},
}
Expand Down
Loading