Skip to content

Commit

Permalink
minimal collabora on Openshift and Kind
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Bigler <nicolas.bigler@vshn.ch>
  • Loading branch information
lukasz.widera@vshn.ch authored and TheBigLee committed Oct 22, 2024
1 parent fe04df7 commit 72b4b09
Show file tree
Hide file tree
Showing 10 changed files with 1,626 additions and 95 deletions.
7 changes: 5 additions & 2 deletions apis/vshn/v1/vshn_nextcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
//go:generate yq -i e ../../generated/vshn.appcat.vshn.io_vshnnextclouds.yaml --expression "with(.spec.versions[]; .schema.openAPIV3Schema.properties.spec.properties.parameters.properties.service.properties.postgreSQLParameters.default={})"
//go:generate yq -i e ../../generated/vshn.appcat.vshn.io_vshnnextclouds.yaml --expression "with(.spec.versions[]; .schema.openAPIV3Schema.properties.spec.properties.parameters.properties.backup.default={})"
//go:generate yq -i e ../../generated/vshn.appcat.vshn.io_vshnnextclouds.yaml --expression "with(.spec.versions[]; .schema.openAPIV3Schema.properties.spec.properties.parameters.properties.security.default={})"
//go:generate yq -i e ../../generated/vshn.appcat.vshn.io_vshnnextclouds.yaml --expression "with(.spec.versions[]; .schema.openAPIV3Schema.properties.spec.properties.parameters.properties.service.collabora.default={})"

// +kubebuilder:object:root=true

Expand Down Expand Up @@ -172,8 +173,10 @@ func (v *VSHNNextcloud) SetInstanceNamespaceStatus() {
}

type CollaboraSpec struct {
FQDN string `json:"fqdn,omitempty"`
Size VSHNSizeSpec `json:"size,omitempty"`
//+kubebuilder:default=false
Enabled bool `json:"enabled"`
//+kubebuilder:validation:Required
FQDN string `json:"fqdn,omitempty"`
}

// +kubebuilder:object:generate=true
Expand Down
1 change: 0 additions & 1 deletion apis/vshn/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 7 additions & 26 deletions crds/vshn.appcat.vshn.io_vshnnextclouds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4853,34 +4853,13 @@ spec:
properties:
collabora:
properties:
enabled:
default: false
type: boolean
fqdn:
type: string
size:
description: VSHNSizeSpec contains settings to control the sizing of a service.
properties:
cpu:
description: CPU defines the amount of Kubernetes CPUs for an instance.
type: string
disk:
description: Disk defines the amount of disk space for an instance.
type: string
memory:
description: Memory defines the amount of memory in units of bytes for an instance.
type: string
plan:
description: Plan is the name of the resource plan that defines the compute resources.
type: string
requests:
description: Requests defines CPU and memory requests for an instance
properties:
cpu:
description: CPU defines the amount of Kubernetes CPUs for an instance.
type: string
memory:
description: Memory defines the amount of memory in units of bytes for an instance.
type: string
type: object
type: object
required:
- enabled
type: object
fqdn:
description: |-
Expand Down Expand Up @@ -9953,6 +9932,8 @@ spec:
required:
- fqdn
type: object
collabora:
default: {}
size:
description: Size contains settings to control the sizing of a service.
properties:
Expand Down
39 changes: 5 additions & 34 deletions crds/vshn.appcat.vshn.io_xvshnnextclouds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5577,42 +5577,13 @@ spec:
properties:
collabora:
properties:
enabled:
default: false
type: boolean
fqdn:
type: string
size:
description: VSHNSizeSpec contains settings to control
the sizing of a service.
properties:
cpu:
description: CPU defines the amount of Kubernetes
CPUs for an instance.
type: string
disk:
description: Disk defines the amount of disk space
for an instance.
type: string
memory:
description: Memory defines the amount of memory in
units of bytes for an instance.
type: string
plan:
description: Plan is the name of the resource plan
that defines the compute resources.
type: string
requests:
description: Requests defines CPU and memory requests
for an instance
properties:
cpu:
description: CPU defines the amount of Kubernetes
CPUs for an instance.
type: string
memory:
description: Memory defines the amount of memory
in units of bytes for an instance.
type: string
type: object
type: object
required:
- enabled
type: object
fqdn:
description: |-
Expand Down
5 changes: 3 additions & 2 deletions pkg/comp-functions/functions/vshnnextcloud/billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package vshnnextcloud
import (
"context"
"fmt"

xfnproto "github.com/crossplane/function-sdk-go/proto/v1beta1"
v1 "github.com/vshn/appcat/v4/apis/vshn/v1"
"github.com/vshn/appcat/v4/pkg/comp-functions/functions/common"
"github.com/vshn/appcat/v4/pkg/comp-functions/runtime"
)

Expand All @@ -16,5 +16,6 @@ func AddServiceBillingLabel(ctx context.Context, comp *v1.VSHNNextcloud, svc *ru
return runtime.NewFatalResult(fmt.Errorf("can't get composite: %w", err))
}

return common.InjectBillingLabelToService(ctx, svc, comp)
//return common.InjectBillingLabelToService(ctx, svc, comp)
return runtime.NewNormalResult("Temporarly disabled")
}
Loading

0 comments on commit 72b4b09

Please sign in to comment.